]> Joshua Wise's Git repositories - netwatch.git/commitdiff
merge
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Thu, 2 Oct 2008 23:23:10 +0000 (19:23 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Thu, 2 Oct 2008 23:23:10 +0000 (19:23 -0400)
1  2 
aseg/counter.c
net/net.c
pci/pci-bother.c

diff --cc aseg/counter.c
index bf60ffda0d1e568964b65d58d12d17c9bf921b8f,868ec459984ce8069f5f0d5e8ba2b53844cfaf07..4876acf354535a4cd00db8c45a8a8684fca0bdea
@@@ -3,8 -3,7 +3,8 @@@
  #include <video_defines.h>
  #include <minilib.h>
  #include <smi.h>
- #include "3c905.h"
 +#include <pci-bother.h>
+ #include "../net/net.h"
  #include "vga-overlay.h"
  #include "packet.h"
  
diff --cc net/net.c
index 488f52b1f1be5c072559a69376d5c1348c94cee7,7f1932f3ba848d9e119cda80662053a4804b6956..18eaddf2dc625729b5af87d7d9ee55c339d93cb9
+++ b/net/net.c
@@@ -3,6 -2,10 +3,8 @@@
  #include <output.h>
  #include "net.h"
  
 -static int found = 0, _bus, _dev, _fn;
 -
+ struct nic nic;
  static int bother_3c905(pci_dev_t *dev, void *nutrinus)
  {
        if (dev->vid == 0x10B7 || dev->did == 0x9200)
index 0c3c0ec4d80703a2c19a68e325ea1414550e0be4,0000000000000000000000000000000000000000..dd1ff2133048cbd7071b0ce37a076098d95c5738
mode 100644,000000..100644
--- /dev/null
@@@ -1,41 -1,0 +1,42 @@@
-               pci_write16(bothers[i].bus, bothers[i].dev, bothers[i].fn, 0x0);
 +#include <pci.h>
++#include <pci-bother.h>
 +
 +struct pci_bother {
 +      int bus, dev, fn;
 +      unsigned short origstate;
 +};
 +
 +static struct pci_bother bothers[MAX_BOTHERS];
 +static int nbothers = 0;
 +
 +int pci_bother_add(pci_dev_t *dev)
 +{
 +      if (nbothers == MAX_BOTHERS)
 +              return -1;
 +      
 +      bothers[nbothers].bus = dev->bus;
 +      bothers[nbothers].dev = dev->dev;
 +      bothers[nbothers].fn = dev->fn;
 +      
 +      bothers[nbothers].origstate = pci_read16(dev->bus, dev->dev, dev->fn, 0x04);
 +      
 +      nbothers++;
 +      
 +      return 0;
 +}
 +
 +void pci_bother_all()
 +{
 +      int i;
 +      
 +      for (i = 0; i < nbothers; i++)
-               pci_write16(bothers[i].bus, bothers[i].dev, bothers[i].fn, bothers[i].origstate);
++              pci_write16(bothers[i].bus, bothers[i].dev, bothers[i].fn, 0x04, 0x0);
 +}
 +
 +void pci_unbother_all()
 +{
 +      int i;
 +      
 +      for (i = 0; i < nbothers; i++)
++              pci_write16(bothers[i].bus, bothers[i].dev, bothers[i].fn, 0x04, bothers[i].origstate);
 +}
This page took 0.031997 seconds and 4 git commands to generate.