From: Joshua Wise Date: Thu, 2 Oct 2008 23:23:10 +0000 (-0400) Subject: merge X-Git-Url: http://git.joshuawise.com/netwatch.git/commitdiff_plain/d6f56afa7470cf4c29f4f9fa4bf2dd1bd0ba9193?hp=4d898e0be101cef5e2a09fe78a04c695c44cdb6b merge --- diff --git a/aseg/counter.c b/aseg/counter.c index bf60ffd..4876acf 100644 --- a/aseg/counter.c +++ b/aseg/counter.c @@ -4,7 +4,7 @@ #include #include #include -#include "3c905.h" +#include "../net/net.h" #include "vga-overlay.h" #include "packet.h" diff --git a/aseg/firstrun.c b/aseg/firstrun.c index d45bc81..6df8d7d 100644 --- a/aseg/firstrun.c +++ b/aseg/firstrun.c @@ -5,7 +5,7 @@ #include #include "vga-overlay.h" #include -#include "3c905.h" +#include "../net/net.h" extern int _bss, _bssend; diff --git a/net/3c90x.c b/net/3c90x.c index e7b95e9..37fd34d 100644 --- a/net/3c90x.c +++ b/net/3c90x.c @@ -689,7 +689,6 @@ void a3c90x_disable(struct dev *dev) ***/ static int a3c90x_probe(struct pci_dev * pci, void * data) { - struct nic *nic = (struct nic *)data; INF_3C90X.is3c556 = (pci->did == 0x6055); int i, c; diff --git a/net/net.c b/net/net.c index 488f52b..18eaddf 100644 --- a/net/net.c +++ b/net/net.c @@ -3,6 +3,8 @@ #include #include "net.h" +struct nic nic; + static int bother_3c905(pci_dev_t *dev, void *nutrinus) { if (dev->vid == 0x10B7 || dev->did == 0x9200) diff --git a/net/net.h b/net/net.h index 708069b..f10e304 100644 --- a/net/net.h +++ b/net/net.h @@ -1,6 +1,8 @@ #ifndef _3C905_H #define _3C905_H +#include "etherboot-compat.h" + extern void eth_init(); extern void eth_poll(); diff --git a/pci/pci-bother.c b/pci/pci-bother.c index 0c3c0ec..dd1ff21 100644 --- a/pci/pci-bother.c +++ b/pci/pci-bother.c @@ -1,4 +1,5 @@ #include +#include struct pci_bother { int bus, dev, fn; @@ -29,7 +30,7 @@ void pci_bother_all() int i; for (i = 0; i < nbothers; i++) - pci_write16(bothers[i].bus, bothers[i].dev, bothers[i].fn, 0x0); + pci_write16(bothers[i].bus, bothers[i].dev, bothers[i].fn, 0x04, 0x0); } void pci_unbother_all() @@ -37,5 +38,5 @@ void pci_unbother_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, bothers[i].origstate); }