diff options
author | Michael Brown <mcb30@etherboot.org> | 2005-04-12 23:24:39 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2005-04-12 23:24:39 +0000 |
commit | bd9ae7cc7073cb17d51255c1b3b59def5843b170 (patch) | |
tree | 415142c23bb18e9b1b27fe84cde0bb302eb4ed6c /src/drivers/net | |
parent | 35e6f3e58abd8addc19113f7e00e3cafea315846 (diff) | |
download | ipxe-bd9ae7cc7073cb17d51255c1b3b59def5843b170.zip ipxe-bd9ae7cc7073cb17d51255c1b3b59def5843b170.tar.gz ipxe-bd9ae7cc7073cb17d51255c1b3b59def5843b170.tar.bz2 |
Automatically updated using
perl -pi -0777 -e 's/_probe\s*\(\s*struct dev \*dev,\s*struct pci_device \*(\w+?)\s*\)\s*{(\s*)struct nic \*nic.*?$/_probe ( struct dev *dev ) {\n${2}struct nic *nic = nic_device ( dev );\n${2}struct pci_device *$1 = pci_device ( dev );/ms' *.c
Diffstat (limited to 'src/drivers/net')
-rw-r--r-- | src/drivers/net/3c595.c | 8 | ||||
-rw-r--r-- | src/drivers/net/3c90x.c | 8 | ||||
-rw-r--r-- | src/drivers/net/davicom.c | 8 | ||||
-rw-r--r-- | src/drivers/net/dmfe.c | 8 | ||||
-rw-r--r-- | src/drivers/net/e1000.c | 8 | ||||
-rw-r--r-- | src/drivers/net/eepro100.c | 8 | ||||
-rw-r--r-- | src/drivers/net/epic100.c | 8 | ||||
-rw-r--r-- | src/drivers/net/forcedeth.c | 8 | ||||
-rw-r--r-- | src/drivers/net/mtd80x.c | 8 | ||||
-rw-r--r-- | src/drivers/net/natsemi.c | 8 | ||||
-rwxr-xr-x | src/drivers/net/ns83820.c | 8 | ||||
-rw-r--r-- | src/drivers/net/pcnet32.c | 8 | ||||
-rw-r--r-- | src/drivers/net/r8169.c | 8 | ||||
-rw-r--r-- | src/drivers/net/rtl8139.c | 8 | ||||
-rw-r--r-- | src/drivers/net/sis900.c | 8 | ||||
-rw-r--r-- | src/drivers/net/skel.c | 8 | ||||
-rw-r--r-- | src/drivers/net/sundance.c | 8 | ||||
-rw-r--r-- | src/drivers/net/tg3.c | 8 | ||||
-rw-r--r-- | src/drivers/net/tlan.c | 8 | ||||
-rw-r--r-- | src/drivers/net/tulip.c | 8 | ||||
-rw-r--r-- | src/drivers/net/via-rhine.c | 8 | ||||
-rw-r--r-- | src/drivers/net/w89c840.c | 8 |
22 files changed, 110 insertions, 66 deletions
diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c index 489e882..9093e59 100644 --- a/src/drivers/net/3c595.c +++ b/src/drivers/net/3c595.c @@ -467,9 +467,11 @@ static void t595_irq(struct nic *nic __unused, irq_action_t action __unused) /************************************************************************** ETH_PROBE - Look for an adapter ***************************************************************************/ -static int t595_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +static int t595_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); int i; unsigned short *p; diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c index 7919c9e..1b10088 100644 --- a/src/drivers/net/3c90x.c +++ b/src/drivers/net/3c90x.c @@ -688,9 +688,11 @@ static void a3c90x_irq(struct nic *nic __unused, irq_action_t action __unused) *** initialization. If this routine is called, the pci functions did find the *** card. We just have to init it here. ***/ -static int a3c90x_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +static int a3c90x_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); int i, c; unsigned short eeprom[0x21]; unsigned int cfg; diff --git a/src/drivers/net/davicom.c b/src/drivers/net/davicom.c index c885628..07f8dc7 100644 --- a/src/drivers/net/davicom.c +++ b/src/drivers/net/davicom.c @@ -654,9 +654,11 @@ 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, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +static int davicom_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); unsigned int i; whereami("davicom_probe\n"); diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c index 9545ee9..dacf156 100644 --- a/src/drivers/net/dmfe.c +++ b/src/drivers/net/dmfe.c @@ -461,9 +461,11 @@ PROBE - Look for an adapter, this routine's visible to the outside #define board_found 1 #define valid_link 0 -static int dmfe_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *) dev; +static int dmfe_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); uint32_t dev_rev, pci_pmr; int i; diff --git a/src/drivers/net/e1000.c b/src/drivers/net/e1000.c index 4def9e4..8e4668a 100644 --- a/src/drivers/net/e1000.c +++ b/src/drivers/net/e1000.c @@ -3580,9 +3580,11 @@ 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 *p) -{ - struct nic *nic = (struct nic *)dev; +static int e1000_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *p = pci_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 3028e81..8699d2e 100644 --- a/src/drivers/net/eepro100.c +++ b/src/drivers/net/eepro100.c @@ -601,9 +601,11 @@ static void eepro100_disable(struct dev *dev __unused) * leaves the 82557 initialized, and ready to recieve packets. */ -static int eepro100_probe(struct dev *dev, struct pci_device *p) -{ - struct nic *nic = (struct nic *)dev; +static int eepro100_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *p = pci_device ( dev ); unsigned short sum = 0; int i; int read_cmd, ee_size; diff --git a/src/drivers/net/epic100.c b/src/drivers/net/epic100.c index 3f96f04..7a37986 100644 --- a/src/drivers/net/epic100.c +++ b/src/drivers/net/epic100.c @@ -95,9 +95,11 @@ static unsigned char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; static int -epic100_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +epic100_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); int i; unsigned short* ap; unsigned int phy, phy_idx; diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c index e5db3e7..989e5cd 100644 --- a/src/drivers/net/forcedeth.c +++ b/src/drivers/net/forcedeth.c @@ -925,9 +925,11 @@ PROBE - Look for an adapter, this routine's visible to the outside #define IORESOURCE_MEM 0x00000200 #define board_found 1 #define valid_link 0 -static int forcedeth_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *) dev; +static int forcedeth_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); unsigned long addr; int sz; u8 *base; diff --git a/src/drivers/net/mtd80x.c b/src/drivers/net/mtd80x.c index 941fb16..3e385cf 100644 --- a/src/drivers/net/mtd80x.c +++ b/src/drivers/net/mtd80x.c @@ -663,9 +663,11 @@ static void mtd_disable(struct dev *dev) PROBE - Look for an adapter, this routine's visible to the outside ***************************************************************************/ -static int mtd_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +static int mtd_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); int i; if (pci->ioaddr == 0) diff --git a/src/drivers/net/natsemi.c b/src/drivers/net/natsemi.c index 0074a1d..2873461 100644 --- a/src/drivers/net/natsemi.c +++ b/src/drivers/net/natsemi.c @@ -240,9 +240,11 @@ static void natsemi_irq(struct nic *nic, irq_action_t action); */ static int -natsemi_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +natsemi_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); int i; int prev_eedata; u32 tmp; diff --git a/src/drivers/net/ns83820.c b/src/drivers/net/ns83820.c index 14f5080..a81730b 100755 --- a/src/drivers/net/ns83820.c +++ b/src/drivers/net/ns83820.c @@ -811,9 +811,11 @@ PROBE - Look for an adapter, this routine's visible to the outside #define board_found 1 #define valid_link 0 -static int ns83820_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *) dev; +static int ns83820_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); int sz; long addr; int using_dac = 0; diff --git a/src/drivers/net/pcnet32.c b/src/drivers/net/pcnet32.c index 2747033..24425aa 100644 --- a/src/drivers/net/pcnet32.c +++ b/src/drivers/net/pcnet32.c @@ -665,9 +665,11 @@ static void pcnet32_irq(struct nic *nic __unused, irq_action_t action __unused) 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 pcnet32_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *) dev; +static int pcnet32_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); int i, media; int fdx, mii, fset, dxsuflo, ltint; int chip_version; diff --git a/src/drivers/net/r8169.c b/src/drivers/net/r8169.c index 516d306..0e245c3 100644 --- a/src/drivers/net/r8169.c +++ b/src/drivers/net/r8169.c @@ -709,9 +709,11 @@ PROBE - Look for an adapter, this routine's visible to the outside #define board_found 1 #define valid_link 0 -static int r8169_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *) dev; +static int r8169_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); static int board_idx = -1; static int printed_version = 0; int i, rc; diff --git a/src/drivers/net/rtl8139.c b/src/drivers/net/rtl8139.c index 485e39e..fc87ccc 100644 --- a/src/drivers/net/rtl8139.c +++ b/src/drivers/net/rtl8139.c @@ -182,9 +182,11 @@ static void rtl_disable(struct dev *); static void rtl_irq(struct nic *nic, irq_action_t action); -static int rtl8139_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +static int rtl8139_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); int i; int speed10, fullduplex; int addr_len; diff --git a/src/drivers/net/sis900.c b/src/drivers/net/sis900.c index 822c632..e6afd16 100644 --- a/src/drivers/net/sis900.c +++ b/src/drivers/net/sis900.c @@ -307,9 +307,11 @@ static int sis635_get_mac_addr(struct pci_device * pci_dev __unused, struct nic * Returns: struct nic *: pointer to NIC data structure */ -static int sis900_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +static int sis900_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); int i; int found=0; int phy_addr; diff --git a/src/drivers/net/skel.c b/src/drivers/net/skel.c index f020bcb..781b65d 100644 --- a/src/drivers/net/skel.c +++ b/src/drivers/net/skel.c @@ -134,9 +134,11 @@ PROBE - Look for an adapter, this routine's visible to the outside #define board_found 1 #define valid_link 0 -static int skel_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +static int skel_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); if (board_found && valid_link) { diff --git a/src/drivers/net/sundance.c b/src/drivers/net/sundance.c index d25848a..4806509 100644 --- a/src/drivers/net/sundance.c +++ b/src/drivers/net/sundance.c @@ -577,9 +577,11 @@ static void sundance_disable(struct dev *dev __unused) /************************************************************************** PROBE - Look for an adapter, this routine's visible to the outside ***************************************************************************/ -static int sundance_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *) dev; +static int sundance_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); u8 ee_data[EEPROM_SIZE]; u16 mii_ctl; int i; diff --git a/src/drivers/net/tg3.c b/src/drivers/net/tg3.c index 288d394..0644d7f 100644 --- a/src/drivers/net/tg3.c +++ b/src/drivers/net/tg3.c @@ -3224,9 +3224,11 @@ static void tg3_irq(struct nic *nic __unused, irq_action_t action __unused) 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 *pdev) -{ - struct nic *nic = (struct nic *)dev; +static int tg3_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pdev = pci_device ( dev ); struct tg3 *tp = &tg3; unsigned long tg3reg_base, tg3reg_len; int i, err, pm_cap; diff --git a/src/drivers/net/tlan.c b/src/drivers/net/tlan.c index 5478de5..e5373ec 100644 --- a/src/drivers/net/tlan.c +++ b/src/drivers/net/tlan.c @@ -771,9 +771,11 @@ PROBE - Look for an adapter, this routine's visible to the outside #define board_found 1 #define valid_link 0 -static int tlan_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *) dev; +static int tlan_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); u16 data = 0; int err; int i; diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c index 570726f..8525222 100644 --- a/src/drivers/net/tulip.c +++ b/src/drivers/net/tulip.c @@ -1218,9 +1218,11 @@ static void tulip_irq(struct nic *nic __unused, irq_action_t action __unused) /*********************************************************************/ /* eth_probe - Look for an adapter */ /*********************************************************************/ -static int tulip_probe(struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +static int tulip_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); u32 i; u8 chip_rev; u8 ee_data[EEPROM_SIZE]; diff --git a/src/drivers/net/via-rhine.c b/src/drivers/net/via-rhine.c index 2f5878b..97a0989 100644 --- a/src/drivers/net/via-rhine.c +++ b/src/drivers/net/via-rhine.c @@ -951,9 +951,11 @@ void rhine_irq ( struct nic *nic, irq_action_t action ) { } static int -rhine_probe (struct dev *dev, struct pci_device *pci) -{ - struct nic *nic = (struct nic *)dev; +rhine_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *pci = pci_device ( dev ); struct rhine_private *tp = (struct rhine_private *) nic->priv_data; if (!pci->ioaddr) return 0; diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c index f7dc288..ab5b0ac 100644 --- a/src/drivers/net/w89c840.c +++ b/src/drivers/net/w89c840.c @@ -609,9 +609,11 @@ static void w89c840_irq(struct nic *nic __unused, irq_action_t action __unused) /************************************************************************** w89c840_probe - Look for an adapter, this routine's visible to the outside ***************************************************************************/ -static int w89c840_probe(struct dev *dev, struct pci_device *p) -{ - struct nic *nic = (struct nic *)dev; +static int w89c840_probe ( struct dev *dev ) { + + struct nic *nic = nic_device ( dev ); + + struct pci_device *p = pci_device ( dev ); u16 sum = 0; int i, j; unsigned short value; |