From cee678de7c204c10deb5b8627327688c0b238181 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 14 Apr 2005 15:09:28 +0000 Subject: [PATCH] Fixed up automatic modifications by hand. --- src/drivers/net/davicom.c | 6 ++-- src/drivers/net/e1000.c | 2 +- src/drivers/net/eepro100.c | 2 +- src/drivers/net/natsemi.c | 2 +- src/drivers/net/rtl8139.c | 2 +- src/drivers/net/tg3.c | 68 +++++++++++++++++++------------------- src/drivers/net/tulip.c | 5 ++- src/drivers/net/w89c840.c | 2 +- 8 files changed, 44 insertions(+), 45 deletions(-) diff --git a/src/drivers/net/davicom.c b/src/drivers/net/davicom.c index 8ab697b9..4fef8f66 100644 --- a/src/drivers/net/davicom.c +++ b/src/drivers/net/davicom.c @@ -157,7 +157,7 @@ static int TxPtr; /*********************************************************************/ static void whereami(const char *str); static int read_eeprom(unsigned long ioaddr, int location, int addr_len); -static int davicom_probe(struct dev *dev); +static int davicom_probe(struct dev *dev,struct pci_device *pci); static void davicom_init_chain(struct nic *nic); /* Sten 10/9 */ static void davicom_reset(struct nic *nic); static void davicom_transmit(struct nic *nic, const char *d, unsigned int t, @@ -178,7 +178,7 @@ static void davicom_media_chk(struct nic *); /*********************************************************************/ /* Utility Routines */ /*********************************************************************/ -static inline void whereami(const char *str, struct pci_device *pci) +static inline void whereami(const char *str) { printf("%s\n", str); /* sleep(2); */ @@ -655,7 +655,7 @@ static void davicom_irq(struct nic *nic __unused, irq_action_t action __unused) /*********************************************************************/ /* eth_probe - Look for an adapter */ /*********************************************************************/ -static int davicom_probe ( struct dev *dev ) { +static int davicom_probe ( struct dev *dev, struct pci_device *pci ) { struct nic *nic = nic_device ( dev ); unsigned int i; diff --git a/src/drivers/net/e1000.c b/src/drivers/net/e1000.c index 2144fdeb..5332565f 100644 --- a/src/drivers/net/e1000.c +++ b/src/drivers/net/e1000.c @@ -3582,7 +3582,7 @@ static void e1000_irq(struct nic *nic __unused, irq_action_t action) PROBE - Look for an adapter, this routine's visible to the outside You should omit the last argument struct pci_device * for a non-PCI NIC ***************************************************************************/ -static int e1000_probe ( struct dev *dev, struct pci_device *pci ) { +static int e1000_probe ( struct dev *dev, struct pci_device *p ) { struct nic *nic = nic_device ( dev ); unsigned long mmio_start, mmio_len; int ret_val, i; diff --git a/src/drivers/net/eepro100.c b/src/drivers/net/eepro100.c index 1e1b38c4..92053d5e 100644 --- a/src/drivers/net/eepro100.c +++ b/src/drivers/net/eepro100.c @@ -603,7 +603,7 @@ static void eepro100_disable ( struct nic *nic __unused ) { * leaves the 82557 initialized, and ready to recieve packets. */ -static int eepro100_probe ( struct dev *dev, struct pci_device *pci ) { +static int eepro100_probe ( struct dev *dev, struct pci_device *p ) { struct nic *nic = nic_device ( dev ); unsigned short sum = 0; int i; diff --git a/src/drivers/net/natsemi.c b/src/drivers/net/natsemi.c index a2ddbdc0..a8b6a0dc 100644 --- a/src/drivers/net/natsemi.c +++ b/src/drivers/net/natsemi.c @@ -213,7 +213,7 @@ static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE] __attribute__ ((aligned(4))) /* Function Prototypes */ -static int natsemi_probe(struct dev *dev); +static int natsemi_probe(struct dev *dev,struct pci_device *pci); static int eeprom_read(long addr, int location); static int mdio_read(int phy_id, int location); static void natsemi_init(struct nic *nic); diff --git a/src/drivers/net/rtl8139.c b/src/drivers/net/rtl8139.c index 590225dc..9e52fecc 100644 --- a/src/drivers/net/rtl8139.c +++ b/src/drivers/net/rtl8139.c @@ -172,7 +172,7 @@ static unsigned int cur_rx,cur_tx; static unsigned char tx_buffer[TX_BUF_SIZE] __attribute__((aligned(4))); static unsigned char rx_ring[RX_BUF_LEN+16] __attribute__((aligned(4))); -static int rtl8139_probe(struct dev *dev); +static int rtl8139_probe(struct dev *dev,struct pci_device *pci); static int read_eeprom(struct nic *nic, int location, int addr_len); static void rtl_reset(struct nic *nic); static void rtl_transmit(struct nic *nic, const char *destaddr, diff --git a/src/drivers/net/tg3.c b/src/drivers/net/tg3.c index 4ed8ce00..96829c0d 100644 --- a/src/drivers/net/tg3.c +++ b/src/drivers/net/tg3.c @@ -3227,44 +3227,11 @@ static struct nic_operations tg3_operations = { .disable = tg3_disable, }; - -static struct pci_id tg3_nics[] = { -PCI_ROM(0x14e4, 0x1644, "tg3-5700", "Broadcom Tigon 3 5700"), -PCI_ROM(0x14e4, 0x1645, "tg3-5701", "Broadcom Tigon 3 5701"), -PCI_ROM(0x14e4, 0x1646, "tg3-5702", "Broadcom Tigon 3 5702"), -PCI_ROM(0x14e4, 0x1647, "tg3-5703", "Broadcom Tigon 3 5703"), -PCI_ROM(0x14e4, 0x1648, "tg3-5704", "Broadcom Tigon 3 5704"), -PCI_ROM(0x14e4, 0x164d, "tg3-5702FE", "Broadcom Tigon 3 5702FE"), -PCI_ROM(0x14e4, 0x1653, "tg3-5705", "Broadcom Tigon 3 5705"), -PCI_ROM(0x14e4, 0x1654, "tg3-5705_2", "Broadcom Tigon 3 5705_2"), -PCI_ROM(0x14e4, 0x165d, "tg3-5705M", "Broadcom Tigon 3 5705M"), -PCI_ROM(0x14e4, 0x165e, "tg3-5705M_2", "Broadcom Tigon 3 5705M_2"), -PCI_ROM(0x14e4, 0x1677, "tg3-5751", "Broadcom Tigon 3 5751"), -PCI_ROM(0x14e4, 0x1696, "tg3-5782", "Broadcom Tigon 3 5782"), -PCI_ROM(0x14e4, 0x169c, "tg3-5788", "Broadcom Tigon 3 5788"), -PCI_ROM(0x14e4, 0x16a6, "tg3-5702X", "Broadcom Tigon 3 5702X"), -PCI_ROM(0x14e4, 0x16a7, "tg3-5703X", "Broadcom Tigon 3 5703X"), -PCI_ROM(0x14e4, 0x16a8, "tg3-5704S", "Broadcom Tigon 3 5704S"), -PCI_ROM(0x14e4, 0x16c6, "tg3-5702A3", "Broadcom Tigon 3 5702A3"), -PCI_ROM(0x14e4, 0x16c7, "tg3-5703A3", "Broadcom Tigon 3 5703A3"), -PCI_ROM(0x14e4, 0x170d, "tg3-5901", "Broadcom Tigon 3 5901"), -PCI_ROM(0x14e4, 0x170e, "tg3-5901_2", "Broadcom Tigon 3 5901_2"), -PCI_ROM(0x1148, 0x4400, "tg3-9DXX", "Syskonnect 9DXX"), -PCI_ROM(0x1148, 0x4500, "tg3-9MXX", "Syskonnect 9MXX"), -PCI_ROM(0x173b, 0x03e8, "tg3-ac1000", "Altima AC1000"), -PCI_ROM(0x173b, 0x03e9, "tg3-ac1001", "Altima AC1001"), -PCI_ROM(0x173b, 0x03ea, "tg3-ac9100", "Altima AC9100"), -PCI_ROM(0x173b, 0x03eb, "tg3-ac1003", "Altima AC1003"), -}; - -static struct pci_driver tg3_driver = - PCI_DRIVER ( "TG3", tg3_nics, PCI_NO_CLASS ); - /************************************************************************** PROBE - Look for an adapter, this routine's visible to the outside You should omit the last argument struct pci_device * for a non-PCI NIC ***************************************************************************/ -static int tg3_probe ( struct dev *dev, struct pci_device *pci ) { +static int tg3_probe ( struct dev *dev, struct pci_device *pdev ) { struct nic *nic = nic_device ( dev ); struct tg3 *tp = &tg3; unsigned long tg3reg_base, tg3reg_len; @@ -3386,4 +3353,37 @@ static int tg3_probe ( struct dev *dev, struct pci_device *pci ) { return 0; } + +static struct pci_id tg3_nics[] = { +PCI_ROM(0x14e4, 0x1644, "tg3-5700", "Broadcom Tigon 3 5700"), +PCI_ROM(0x14e4, 0x1645, "tg3-5701", "Broadcom Tigon 3 5701"), +PCI_ROM(0x14e4, 0x1646, "tg3-5702", "Broadcom Tigon 3 5702"), +PCI_ROM(0x14e4, 0x1647, "tg3-5703", "Broadcom Tigon 3 5703"), +PCI_ROM(0x14e4, 0x1648, "tg3-5704", "Broadcom Tigon 3 5704"), +PCI_ROM(0x14e4, 0x164d, "tg3-5702FE", "Broadcom Tigon 3 5702FE"), +PCI_ROM(0x14e4, 0x1653, "tg3-5705", "Broadcom Tigon 3 5705"), +PCI_ROM(0x14e4, 0x1654, "tg3-5705_2", "Broadcom Tigon 3 5705_2"), +PCI_ROM(0x14e4, 0x165d, "tg3-5705M", "Broadcom Tigon 3 5705M"), +PCI_ROM(0x14e4, 0x165e, "tg3-5705M_2", "Broadcom Tigon 3 5705M_2"), +PCI_ROM(0x14e4, 0x1677, "tg3-5751", "Broadcom Tigon 3 5751"), +PCI_ROM(0x14e4, 0x1696, "tg3-5782", "Broadcom Tigon 3 5782"), +PCI_ROM(0x14e4, 0x169c, "tg3-5788", "Broadcom Tigon 3 5788"), +PCI_ROM(0x14e4, 0x16a6, "tg3-5702X", "Broadcom Tigon 3 5702X"), +PCI_ROM(0x14e4, 0x16a7, "tg3-5703X", "Broadcom Tigon 3 5703X"), +PCI_ROM(0x14e4, 0x16a8, "tg3-5704S", "Broadcom Tigon 3 5704S"), +PCI_ROM(0x14e4, 0x16c6, "tg3-5702A3", "Broadcom Tigon 3 5702A3"), +PCI_ROM(0x14e4, 0x16c7, "tg3-5703A3", "Broadcom Tigon 3 5703A3"), +PCI_ROM(0x14e4, 0x170d, "tg3-5901", "Broadcom Tigon 3 5901"), +PCI_ROM(0x14e4, 0x170e, "tg3-5901_2", "Broadcom Tigon 3 5901_2"), +PCI_ROM(0x1148, 0x4400, "tg3-9DXX", "Syskonnect 9DXX"), +PCI_ROM(0x1148, 0x4500, "tg3-9MXX", "Syskonnect 9MXX"), +PCI_ROM(0x173b, 0x03e8, "tg3-ac1000", "Altima AC1000"), +PCI_ROM(0x173b, 0x03e9, "tg3-ac1001", "Altima AC1001"), +PCI_ROM(0x173b, 0x03ea, "tg3-ac9100", "Altima AC9100"), +PCI_ROM(0x173b, 0x03eb, "tg3-ac1003", "Altima AC1003"), +}; + +static struct pci_driver tg3_driver = + PCI_DRIVER ( "TG3", tg3_nics, PCI_NO_CLASS ); + BOOT_DRIVER ( "TG3", find_pci_boot_device, tg3_driver, tg3_probe ); diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c index 57f130eb..ecd5b017 100644 --- a/src/drivers/net/tulip.c +++ b/src/drivers/net/tulip.c @@ -486,7 +486,7 @@ static int mdio_read(struct nic *nic, int phy_id, int location); static void mdio_write(struct nic *nic, int phy_id, int location, int value); static int read_eeprom(unsigned long ioaddr, int location, int addr_len); static void parse_eeprom(struct nic *nic); -static int tulip_probe(struct dev *dev); +static int tulip_probe(struct dev *dev,struct pci_device *pci); static void tulip_init_ring(struct nic *nic); static void tulip_reset(struct nic *nic); static void tulip_transmit(struct nic *nic, const char *d, unsigned int t, @@ -1220,12 +1220,11 @@ static struct nic_operations tulip_operations = { .irq = tulip_irq, .disable = tulip_disable, }; -static struct pci_driver tulip_driver; /*********************************************************************/ /* eth_probe - Look for an adapter */ /*********************************************************************/ -static int tulip_probe ( struct dev *dev ) { +static int tulip_probe ( struct dev *dev, struct pci_device *pci ) { struct nic *nic = nic_device ( dev ); u32 i; u8 chip_rev; diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c index 0e80890a..88f68bb6 100644 --- a/src/drivers/net/w89c840.c +++ b/src/drivers/net/w89c840.c @@ -623,7 +623,7 @@ static struct pci_driver w89c840_driver = /************************************************************************** w89c840_probe - Look for an adapter, this routine's visible to the outside ***************************************************************************/ -static int w89c840_probe ( struct dev *dev, struct pci_device *pci ) { +static int w89c840_probe ( struct dev *dev, struct pci_device *p ) { struct nic *nic = nic_device ( dev ); u16 sum = 0;