From 1a867bfb3949ff4131834cddd491428a056b63ce Mon Sep 17 00:00:00 2001 From: Marty Connor Date: Thu, 13 Dec 2007 11:08:40 -0500 Subject: [PATCH] Remove *_fill_nic() calls, and directly set nic->ioaddr and nic->irqno . This needs to be done manually because if the irq() routine is implemented then we want something like "nic->irqno = pci->irqno;", else we do "nic->irqno = 0;" nic->ioaddr may also need to be set carefully. Also added local variables to end of many files, for emacs indentation to match kernel style (tab does 8 space indent). --- src/drivers/net/3c509-eisa.c | 14 ++++++++++++-- src/drivers/net/3c515.c | 2 -- src/drivers/net/3c529.c | 9 ++++++++- src/drivers/net/3c595.c | 4 ++-- src/drivers/net/3c90x.c | 10 ++++++++-- src/drivers/net/amd8111e.c | 11 ++++++++++- src/drivers/net/cs89x0.c | 9 +++++---- src/drivers/net/davicom.c | 11 ++++++++++- src/drivers/net/depca.c | 9 ++++++++- src/drivers/net/dmfe.c | 9 ++++++++- src/drivers/net/eepro.c | 9 ++++++++- src/drivers/net/eepro100.c | 20 ++++++++++++++++---- src/drivers/net/epic100.c | 10 +++++++++- src/drivers/net/forcedeth.c | 11 ++++++++++- src/drivers/net/mtd80x.c | 4 +++- src/drivers/net/ns83820.c | 9 ++++++++- src/drivers/net/ns8390.c | 7 ++++--- src/drivers/net/pcnet32.c | 9 ++++++++- src/drivers/net/prism2_pci.c | 10 +++++++++- src/drivers/net/prism2_plx.c | 11 ++++++++--- src/drivers/net/r8169.c | 17 +++++++++++++---- src/drivers/net/sis900.c | 10 +++++++++- src/drivers/net/smc9000.c | 5 +++-- src/drivers/net/sundance.c | 12 ++++++++++-- src/drivers/net/tg3.c | 10 +++++++++- src/drivers/net/tlan.c | 9 ++++++++- src/drivers/net/tulip.c | 9 ++++++++- src/drivers/net/via-rhine.c | 14 +++++++++++++- src/drivers/net/w89c840.c | 11 +++++++++-- 29 files changed, 236 insertions(+), 49 deletions(-) diff --git a/src/drivers/net/3c509-eisa.c b/src/drivers/net/3c509-eisa.c index f0ffdaf6..d57c05b4 100644 --- a/src/drivers/net/3c509-eisa.c +++ b/src/drivers/net/3c509-eisa.c @@ -15,9 +15,11 @@ */ static int el3_eisa_probe ( struct nic *nic, struct eisa_device *eisa ) { - enable_eisa_device ( eisa ); - eisa_fill_nic ( nic, eisa ); + nic->ioaddr = eisa->ioaddr; + nic->irqno = 0; + enable_eisa_device ( eisa ); + /* Hand off to generic t5x9 probe routine */ return t5x9_probe ( nic, ISA_PROD_ID ( PROD_ID ), ISA_PROD_ID_MASK ); } @@ -37,3 +39,11 @@ DRIVER ( "3c509 (EISA)", nic_driver, eisa_driver, el3_eisa_driver, el3_eisa_probe, el3_eisa_disable ); ISA_ROM ( "3c509-eisa","3c509 (EISA)" ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/3c515.c b/src/drivers/net/3c515.c index d82accdc..d0bf3189 100644 --- a/src/drivers/net/3c515.c +++ b/src/drivers/net/3c515.c @@ -614,8 +614,6 @@ static int t515_probe ( struct nic *nic, struct isapnp_device *isapnp ) { /* Direct copy from Beckers 3c515.c removing any ISAPNP sections */ - isapnp_fill_nic ( nic, isapnp ); - nic->ioaddr = isapnp->ioaddr; nic->irqno = isapnp->irqno; activate_isapnp_device ( isapnp ); diff --git a/src/drivers/net/3c529.c b/src/drivers/net/3c529.c index bcdd765e..31931048 100644 --- a/src/drivers/net/3c529.c +++ b/src/drivers/net/3c529.c @@ -23,7 +23,6 @@ static int t529_probe ( struct nic *nic, struct mca_device *mca ) { /* Retrieve NIC parameters from MCA device parameters */ - mca_fill_nic ( nic, mca ); nic->ioaddr = ( ( mca->pos[4] & 0xfc ) | 0x02 ) << 8; nic->irqno = mca->pos[5] & 0x0f; printf ( "3c529 board found on MCA at %#hx IRQ %d -", @@ -51,3 +50,11 @@ DRIVER ( "3c529", nic_driver, mca_driver, t529_driver, t529_probe, t529_disable ); ISA_ROM( "3c529", "3c529 == MCA 3c509" ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c index 3553fa61..572a99e0 100644 --- a/src/drivers/net/3c595.c +++ b/src/drivers/net/3c595.c @@ -479,7 +479,6 @@ static int t595_probe ( struct nic *nic, struct pci_device *pci ) { eth_nic_base = pci->ioaddr; nic->irqno = 0; - pci_fill_nic ( nic, pci ); nic->ioaddr = pci->ioaddr; GO_WINDOW(0); @@ -547,6 +546,7 @@ DRIVER ( "3C595", nic_driver, pci_driver, t595_driver, /* * Local variables: * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 * End: */ - diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c index 08594437..4f836b95 100644 --- a/src/drivers/net/3c90x.c +++ b/src/drivers/net/3c90x.c @@ -713,8 +713,6 @@ static int a3c90x_probe ( struct nic *nic, struct pci_device *pci ) { adjust_pci_device(pci); - pci_fill_nic ( nic, pci ); - nic->ioaddr = pci->ioaddr; nic->irqno = 0; @@ -1016,3 +1014,11 @@ PCI_DRIVER ( a3c90x_driver, a3c90x_nics, PCI_NO_CLASS ); DRIVER ( "3C90X", nic_driver, pci_driver, a3c90x_driver, a3c90x_probe, a3c90x_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/amd8111e.c b/src/drivers/net/amd8111e.c index 196ee50e..c26c07cf 100644 --- a/src/drivers/net/amd8111e.c +++ b/src/drivers/net/amd8111e.c @@ -653,7 +653,8 @@ static int amd8111e_probe(struct nic *nic, struct pci_device *pdev) struct amd8111e_priv *lp = &amd8111e; unsigned long mmio_start, mmio_len; - pci_fill_nic ( nic, pdev ); + nic->ioaddr = pdev->ioaddr; + nic->irqno = pdev->irq; mmio_start = pci_bar_start(pdev, PCI_BASE_ADDRESS_0); mmio_len = pci_bar_size(pdev, PCI_BASE_ADDRESS_0); @@ -681,3 +682,11 @@ PCI_DRIVER ( amd8111e_driver, amd8111e_nics, PCI_NO_CLASS ); DRIVER ( "AMD8111E", nic_driver, pci_driver, amd8111e_driver, amd8111e_probe, amd8111e_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/cs89x0.c b/src/drivers/net/cs89x0.c index ce1eef5d..274faea5 100644 --- a/src/drivers/net/cs89x0.c +++ b/src/drivers/net/cs89x0.c @@ -477,14 +477,12 @@ static int cs89x0_probe_addr ( isa_probe_addr_t ioaddr ) { return 1; } -static int cs89x0_probe ( struct nic *nic, struct isa_device *isa ) { +static int cs89x0_probe ( struct nic *nic, struct isa_device *isa __unused ) { int i, result = -1; unsigned rev_type = 0, isa_cnf, cs_revision; unsigned short eeprom_buff[CHKSUM_LEN]; - isa_fill_nic ( nic, isa ); nic->ioaddr &= ~1; /* LSB = 1 indicates a more aggressive probe */ - eth_nic_base = nic->ioaddr; /* get the chip type */ @@ -552,6 +550,8 @@ static int cs89x0_probe ( struct nic *nic, struct isa_device *isa ) { else printf("\ncs: BUG: isa_config is %d\n", i); } eth_irqno = i; } + nic->irqno = eth_irqno; + /* Retrieve and print the ethernet address. */ for (i=0; inode_addr[i] = ((unsigned char *)eeprom_buff)[i]; @@ -712,6 +712,7 @@ ISA_ROM ( "cs89x0", "Crystal Semiconductor CS89x0" ); /* * Local variables: * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 * End: */ - diff --git a/src/drivers/net/davicom.c b/src/drivers/net/davicom.c index 7d5361e1..079e647e 100644 --- a/src/drivers/net/davicom.c +++ b/src/drivers/net/davicom.c @@ -666,7 +666,8 @@ static int davicom_probe ( struct nic *nic, struct pci_device *pci ) { dev_id = pci->device; ioaddr = pci->ioaddr; - pci_fill_nic ( nic, pci ); + nic->ioaddr = pci->ioaddr; + nic->irqno = 0; /* wakeup chip */ pci_write_config_dword(pci, 0x40, 0x00000000); @@ -714,3 +715,11 @@ PCI_DRIVER ( davicom_driver, davicom_nics, PCI_NO_CLASS ); DRIVER ( "DAVICOM", nic_driver, pci_driver, davicom_driver, davicom_probe, davicom_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/depca.c b/src/drivers/net/depca.c index 2e788267..7372e604 100644 --- a/src/drivers/net/depca.c +++ b/src/drivers/net/depca.c @@ -742,7 +742,6 @@ static int depca_probe ( struct nic *nic, struct isa_device *isa ) { long sum, chksum; nic->irqno = 0; - isa_fill_nic ( nic, isa ); nic->ioaddr = isa->ioaddr; for (i = 0, j = 0, sum = 0; j < 3; j++) { @@ -794,3 +793,11 @@ DRIVER ( "depce", nic_driver, isa_driver, depca_driver, ISA_ROM ( "depca", "Digital DE100 and DE200" ); #endif + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c index cc140010..34e211d4 100644 --- a/src/drivers/net/dmfe.c +++ b/src/drivers/net/dmfe.c @@ -496,7 +496,6 @@ static int dmfe_probe ( struct nic *nic, struct pci_device *pci ) { dmfe_reset(nic); nic->irqno = 0; - pci_fill_nic ( nic, pci ); nic->ioaddr = pci->ioaddr; /* point to NIC specific routines */ @@ -1216,3 +1215,11 @@ PCI_DRIVER ( dmfe_driver, dmfe_nics, PCI_NO_CLASS ); DRIVER ( "DMFE/PCI", nic_driver, pci_driver, dmfe_driver, dmfe_probe, dmfe_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/eepro.c b/src/drivers/net/eepro.c index 4d5a798e..0a9c95e6 100644 --- a/src/drivers/net/eepro.c +++ b/src/drivers/net/eepro.c @@ -562,7 +562,6 @@ static int eepro_probe ( struct nic *nic, struct isa_device *isa ) { const char *name; nic->irqno = 0; - isa_fill_nic ( nic, isa ); nic->ioaddr = isa->ioaddr; station_addr.saddr[2] = read_eeprom(nic->ioaddr,2); @@ -627,3 +626,11 @@ DRIVER ( "eepro", nic_driver, isa_driver, eepro_driver, eepro_probe, eepro_disable ); ISA_ROM ( "eepro", "Intel Etherexpress Pro/10" ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/eepro100.c b/src/drivers/net/eepro100.c index aa99b591..bb46d163 100644 --- a/src/drivers/net/eepro100.c +++ b/src/drivers/net/eepro100.c @@ -599,7 +599,7 @@ static void eepro100_disable ( struct nic *nic __unused ) { * leaves the 82557 initialized, and ready to recieve packets. */ -static int eepro100_probe ( struct nic *nic, struct pci_device *p ) { +static int eepro100_probe ( struct nic *nic, struct pci_device *pci ) { unsigned short sum = 0; int i; @@ -611,10 +611,14 @@ static int eepro100_probe ( struct nic *nic, struct pci_device *p ) { be careful not to access beyond this array */ unsigned short eeprom[16]; - if (p->ioaddr == 0) + if (pci->ioaddr == 0) return 0; - pci_fill_nic ( nic, p ); - adjust_pci_device(p); + + adjust_pci_device(pci); + + nic->ioaddr = pci->ioaddr; + nic->irqno = pci->irq; + ioaddr = nic->ioaddr; if ((do_eeprom_cmd(EE_READ_CMD << 24, 27) & 0xffe0000) @@ -834,3 +838,11 @@ PCI_DRIVER ( eepro100_driver, eepro100_nics, PCI_NO_CLASS ); DRIVER ( "EEPRO100", nic_driver, pci_driver, eepro100_driver, eepro100_probe, eepro100_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/epic100.c b/src/drivers/net/epic100.c index d8cbf995..e79da2b9 100644 --- a/src/drivers/net/epic100.c +++ b/src/drivers/net/epic100.c @@ -120,8 +120,8 @@ epic100_probe ( struct nic *nic, struct pci_device *pci ) { Epic cards in slot order. */ ioaddr = pci->ioaddr; + nic->irqno = 0; - pci_fill_nic ( nic, pci ); nic->ioaddr = pci->ioaddr & ~3; /* compute all used static epic100 registers address */ @@ -525,3 +525,11 @@ PCI_DRIVER ( epic100_driver, epic100_nics, PCI_NO_CLASS ); DRIVER ( "EPIC100", nic_driver, pci_driver, epic100_driver, epic100_probe, epic100_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c index 2008c39a..9ef1dd79 100644 --- a/src/drivers/net/forcedeth.c +++ b/src/drivers/net/forcedeth.c @@ -1248,7 +1248,8 @@ static int forcedeth_probe ( struct nic *nic, struct pci_device *pci ) { printf("forcedeth.c: Found %s, vendor=0x%hX, device=0x%hX\n", pci->driver_name, pci->vendor, pci->device); - pci_fill_nic ( nic, pci ); + nic->ioaddr = pci->ioaddr; + nic->irqno = 0; /* point to private storage */ np = &npx; @@ -1426,3 +1427,11 @@ PCI_DRIVER ( forcedeth_driver, forcedeth_nics, PCI_NO_CLASS ); DRIVER ( "forcedeth", nic_driver, pci_driver, forcedeth_driver, forcedeth_probe, forcedeth_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/mtd80x.c b/src/drivers/net/mtd80x.c index 5d8987c7..7cc8ce2f 100644 --- a/src/drivers/net/mtd80x.c +++ b/src/drivers/net/mtd80x.c @@ -674,9 +674,11 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) { if (pci->ioaddr == 0) return 0; - pci_fill_nic ( nic, pci ); adjust_pci_device(pci); + nic->ioaddr = pci->ioaddr; + nic->irqno = 0; + mtdx.nic_name = pci->driver_name; mtdx.dev_id = pci->device; mtdx.ioaddr = nic->ioaddr; diff --git a/src/drivers/net/ns83820.c b/src/drivers/net/ns83820.c index 3262ba6c..36091c0a 100755 --- a/src/drivers/net/ns83820.c +++ b/src/drivers/net/ns83820.c @@ -837,7 +837,6 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) { return 0; nic->irqno = 0; - pci_fill_nic ( nic, pci ); nic->ioaddr = pci->ioaddr & ~3; /* disable interrupts */ @@ -1003,3 +1002,11 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) { DRIVER ( "NS83820/PCI", nic_driver, pci_driver, ns83820_driver, ns83820_probe, ns83820_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/ns8390.c b/src/drivers/net/ns8390.c index 19825974..c57ed7a4 100644 --- a/src/drivers/net/ns8390.c +++ b/src/drivers/net/ns8390.c @@ -1018,11 +1018,12 @@ DRIVER ( "NE2000/PCI", nic_driver, pci_driver, nepci_driver, #endif /* INCLUDE_NS8390 */ +#endif + /* * Local variables: * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 * End: */ - - -#endif diff --git a/src/drivers/net/pcnet32.c b/src/drivers/net/pcnet32.c index 63353e3f..e4318429 100644 --- a/src/drivers/net/pcnet32.c +++ b/src/drivers/net/pcnet32.c @@ -681,7 +681,6 @@ static int pcnet32_probe ( struct nic *nic, struct pci_device *pci ) { pci->driver_name, pci->vendor, pci->device); nic->irqno = 0; - pci_fill_nic ( nic, pci ); nic->ioaddr = pci->ioaddr & ~3; /* reset the chip */ @@ -1017,3 +1016,11 @@ PCI_DRIVER ( pcnet32_driver, pcnet32_nics, PCI_NO_CLASS ); DRIVER ( "PCNET32/PCI", nic_driver, pci_driver, pcnet32_driver, pcnet32_probe, pcnet32_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/prism2_pci.c b/src/drivers/net/prism2_pci.c index 918a66df..63cc22e3 100644 --- a/src/drivers/net/prism2_pci.c +++ b/src/drivers/net/prism2_pci.c @@ -24,12 +24,13 @@ static int prism2_pci_probe ( struct nic *nic, struct pci_device *pci ) { hfa384x_t *hw = &hw_global; uint32_t membase = 0; /* Prism2.5 Memory Base */ - pci_fill_nic ( nic, pci ); pci_read_config_dword( pci, PRISM2_PCI_MEM_BASE, &membase); membase &= PCI_BASE_ADDRESS_MEM_MASK; hw->membase = (uint32_t) phys_to_virt(membase); printf ( "Prism2.5 has registers at %#lx\n", hw->membase ); + nic->ioaddr = hw->membase; + nic->irqno = 0; return prism2_probe ( nic, hw ); } @@ -49,3 +50,10 @@ PCI_DRIVER ( prism2_pci_driver, prism2_pci_nics, PCI_NO_CLASS ); DRIVER ( "Prism2/PCI", nic_driver, pci_driver, prism2_pci_driver, prism2_pci_probe, prism2_pci_disable ); +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/prism2_plx.c b/src/drivers/net/prism2_plx.c index 07460356..150bbe69 100644 --- a/src/drivers/net/prism2_plx.c +++ b/src/drivers/net/prism2_plx.c @@ -81,12 +81,10 @@ static int prism2_find_plx ( hfa384x_t *hw, struct pci_device *p ) static int prism2_plx_probe ( struct nic *nic, struct pci_device *pci ) { hfa384x_t *hw = &hw_global; - pci_fill_nic ( nic, pci ); - /* Find and intialise PLX Prism2 card */ if ( ! prism2_find_plx ( hw, pci ) ) return 0; nic->ioaddr = hw->iobase; - + nic->irqno = 0; return prism2_probe ( nic, hw ); } @@ -114,3 +112,10 @@ PCI_DRIVER ( prism2_plx_driver, prism2_plx_nics, PCI_NO_CLASS ); DRIVER ( "Prism2/PLX", nic_driver, pci_driver, prism2_plx_driver, prism2_plx_probe, prism2_plx_disable ); +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/r8169.c b/src/drivers/net/r8169.c index 90dd2c3b..52cb0d0e 100644 --- a/src/drivers/net/r8169.c +++ b/src/drivers/net/r8169.c @@ -1024,13 +1024,14 @@ static int r8169_probe ( struct nic *nic, struct pci_device *pci ) { } r8169_reset(nic); + /* point to NIC specific routines */ - nic->nic_op = &r8169_operations; - pci_fill_nic ( nic, pci ); - nic->irqno = pci->irq; + nic->nic_op = &r8169_operations; + + nic->irqno = pci->irq; nic->ioaddr = ioaddr; - return 1; + return 1; } //====================================================================================================== @@ -1174,3 +1175,11 @@ static void rtl8169_hw_PHY_config(struct nic *nic __unused) DRIVER ( "r8169/PCI", nic_driver, pci_driver, r8169_driver, r8169_probe, r8169_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/sis900.c b/src/drivers/net/sis900.c index 870bdf44..cf9b2ce6 100644 --- a/src/drivers/net/sis900.c +++ b/src/drivers/net/sis900.c @@ -344,8 +344,8 @@ static int sis900_probe ( struct nic *nic, struct pci_device *pci ) { return 0; nic->irqno = 0; - pci_fill_nic ( nic, pci ); nic->ioaddr = pci->ioaddr; + ioaddr = pci->ioaddr; vendor = pci->vendor; dev_id = pci->device; @@ -1287,3 +1287,11 @@ PCI_DRIVER ( sis900_driver, sis900_nics, PCI_NO_CLASS ); DRIVER ( "SIS900", nic_driver, pci_driver, sis900_driver, sis900_probe, sis900_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/smc9000.c b/src/drivers/net/smc9000.c index a623b77e..c6219ee7 100644 --- a/src/drivers/net/smc9000.c +++ b/src/drivers/net/smc9000.c @@ -841,7 +841,6 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) { int i; nic->irqno = 0; - isa_fill_nic ( nic, isa ); nic->ioaddr = isa->ioaddr; /* @@ -947,6 +946,8 @@ ISA_ROM ( "smc9000", "SMC9000" ); /* * Local variables: - * c-basic-offset: 3 + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 * End: */ diff --git a/src/drivers/net/sundance.c b/src/drivers/net/sundance.c index 32c9453e..3bbfbfbb 100644 --- a/src/drivers/net/sundance.c +++ b/src/drivers/net/sundance.c @@ -728,8 +728,8 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) { /* point to NIC specific routines */ nic->nic_op = &sundance_operations; - pci_fill_nic ( nic, pci ); - nic->irqno = pci->irq; + + nic->irqno = pci->irq; nic->ioaddr = BASE; return 1; @@ -876,3 +876,11 @@ PCI_DRIVER ( sundance_driver, sundance_nics, PCI_NO_CLASS ); DRIVER ( "SUNDANCE/PCI", nic_driver, pci_driver, sundance_driver, sundance_probe, sundance_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/tg3.c b/src/drivers/net/tg3.c index 1b4d793b..2188def4 100644 --- a/src/drivers/net/tg3.c +++ b/src/drivers/net/tg3.c @@ -3242,8 +3242,8 @@ static int tg3_probe ( struct nic *nic, struct pci_device *pdev ) { adjust_pci_device(pdev); - pci_fill_nic ( nic, pdev ); nic->irqno = 0; + nic->ioaddr = pdev->ioaddr; /* Find power-management capability. */ pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); @@ -3390,3 +3390,11 @@ PCI_DRIVER ( tg3_driver, tg3_nics, PCI_NO_CLASS ); DRIVER ( "TG3", nic_driver, pci_driver, tg3_driver, tg3_probe, tg3_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/tlan.c b/src/drivers/net/tlan.c index dd374cdf..60ca182e 100644 --- a/src/drivers/net/tlan.c +++ b/src/drivers/net/tlan.c @@ -784,7 +784,6 @@ static int tlan_probe ( struct nic *nic, struct pci_device *pci ) { return 0; nic->irqno = 0; - pci_fill_nic ( nic, pci ); nic->ioaddr = pci->ioaddr; BASE = pci->ioaddr; @@ -1712,3 +1711,11 @@ PCI_DRIVER ( tlan_driver, tlan_nics, PCI_NO_CLASS ); DRIVER ( "TLAN/PCI", nic_driver, pci_driver, tlan_driver, tlan_probe, tlan_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c index 4222e0ba..53cfb85f 100644 --- a/src/drivers/net/tulip.c +++ b/src/drivers/net/tulip.c @@ -1243,7 +1243,6 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) { return 0; ioaddr = pci->ioaddr; - pci_fill_nic ( nic, pci ); nic->ioaddr = pci->ioaddr & ~3; nic->irqno = 0; @@ -2088,3 +2087,11 @@ PCI_DRIVER ( tulip_driver, tulip_nics, PCI_NO_CLASS ); DRIVER ( "Tulip", nic_driver, pci_driver, tulip_driver, tulip_probe, tulip_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/via-rhine.c b/src/drivers/net/via-rhine.c index b96825e6..0c955fab 100644 --- a/src/drivers/net/via-rhine.c +++ b/src/drivers/net/via-rhine.c @@ -966,14 +966,18 @@ rhine_probe ( struct nic *nic, struct pci_device *pci ) { if (!pci->ioaddr) return 0; + rhine_probe1 (nic, pci, pci->ioaddr, pci->device, -1); adjust_pci_device ( pci ); + rhine_reset (nic); + nic->nic_op = &rhine_operations; - pci_fill_nic ( nic, pci ); + nic->irqno = pci->irq; nic->ioaddr = tp->ioaddr; + return 1; } @@ -1426,3 +1430,11 @@ DRIVER ( "VIA 86C100", nic_driver, pci_driver, rhine_driver, rhine_probe, rhine_disable ); /* EOF via-rhine.c */ + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c index cb40e447..2f141aa9 100644 --- a/src/drivers/net/w89c840.c +++ b/src/drivers/net/w89c840.c @@ -630,10 +630,9 @@ static int w89c840_probe ( struct nic *nic, struct pci_device *p ) { if (p->ioaddr == 0) return 0; - pci_fill_nic ( nic, p ); + nic->ioaddr = p->ioaddr; nic->irqno = 0; - #if defined(W89C840_DEBUG) printf("winbond-840: PCI bus %hhX device function %hhX: I/O address: %hX\n", p->bus, p->devfn, ioaddr); #endif @@ -954,3 +953,11 @@ static void init_ring(void) DRIVER ( "W89C840F", nic_driver, pci_driver, w89c840_driver, w89c840_probe, w89c840_disable ); + +/* + * Local variables: + * c-basic-offset: 8 + * c-indent-level: 8 + * tab-width: 8 + * End: + */ -- 2.11.4.GIT