david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Automatically updated using

perl -pi -0777 -e 's/^(\s*)dev->disable(\s*)=\s*(\w+)_disable;\s*nic->poll\s*=\s*(\w+);\s*nic->transmit\s*=\s*(\w+);\s*nic->irq\s*=\s*(\w+);/static struct nic_operations ${3}_operations;\nstatic struct nic_operations ${3}_operations = {\n\t.connect\t= dummy_connect,\n\t.poll\t\t= $4,\n\t.transmit\t= $5,\n\t.irq\t\t= $6,\n\t.disable\t= ${3}_disable,\n};${1}nic->nic_op\t= &${3}_operations;/msg' *.c
This commit is contained in:
Michael Brown 2005-04-13 00:02:40 +00:00
parent d9c64c9422
commit 91e46ed588
31 changed files with 272 additions and 144 deletions

View File

@ -627,11 +627,15 @@ static int t509_probe(struct dev *dev, unsigned short *probe_addrs __unused)
nic->irqno = 0;
nic->ioaddr = eth_nic_base;
dev->disable = t509_disable;
nic->poll = t509_poll;
nic->transmit = t509_transmit;
nic->irq = t509_irq;
static struct nic_operations t509_operations;
static struct nic_operations t509_operations = {
.connect = dummy_connect,
.poll = t509_poll,
.transmit = t509_transmit,
.irq = t509_irq,
.disable = t509_disable,
};
nic->nic_op = &t509_operations;
/* Based on PnP ISA map */
dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

View File

@ -686,11 +686,15 @@ static int t515_probe(struct dev *dev,
nic->irqno = 0;
nic->ioaddr = BASE;
dev->disable = t515_disable;
nic->poll = t515_poll;
nic->transmit = t515_transmit;
nic->irq = t515_irq;
static struct nic_operations t515_operations;
static struct nic_operations t515_operations = {
.connect = dummy_connect,
.poll = t515_poll,
.transmit = t515_transmit,
.irq = t515_irq,
.disable = t515_disable,
};
nic->nic_op = &t515_operations;
/* Based on PnP ISA map */
dev->devid.vendor_id = htons(ISAPNP_VENDOR('T', 'C', 'M'));

View File

@ -508,10 +508,14 @@ static int t595_probe ( struct dev *dev ) {
printf("Ethernet address: %!\n", nic->node_addr);
t595_reset(nic);
dev->disable = t595_disable;
nic->poll = t595_poll;
nic->transmit = t595_transmit;
nic->irq = t595_irq;
static struct nic_operations t595_operations;
static struct nic_operations t595_operations = {
.connect = dummy_connect,
.poll = t595_poll,
.transmit = t595_transmit,
.irq = t595_irq,
.disable = t595_disable,
}; nic->nic_op = &t595_operations;
return 1;
}

View File

@ -951,10 +951,14 @@ static int a3c90x_probe ( struct dev *dev ) {
cmdAcknowledgeInterrupt, 0x661);
/** Set our exported functions **/
dev->disable = a3c90x_disable;
nic->poll = a3c90x_poll;
nic->transmit = a3c90x_transmit;
nic->irq = a3c90x_irq;
static struct nic_operations a3c90x_operations;
static struct nic_operations a3c90x_operations = {
.connect = dummy_connect,
.poll = a3c90x_poll,
.transmit = a3c90x_transmit,
.irq = a3c90x_irq,
.disable = a3c90x_disable,
}; nic->nic_op = &a3c90x_operations;
return 1;
}

View File

@ -691,11 +691,15 @@ static int cs89x0_probe(struct dev *dev, unsigned short *probe_addrs __unused)
nic->irqno = 0;
nic->ioaddr = ioaddr;
dev->disable = cs89x0_disable;
nic->poll = cs89x0_poll;
nic->transmit = cs89x0_transmit;
nic->irq = cs89x0_irq;
static struct nic_operations cs89x0_operations;
static struct nic_operations cs89x0_operations = {
.connect = dummy_connect,
.poll = cs89x0_poll,
.transmit = cs89x0_transmit,
.irq = cs89x0_irq,
.disable = cs89x0_disable,
};
nic->nic_op = &cs89x0_operations;
/* Based on PnP ISA map */
dev->devid.vendor_id = htons(ISAPNP_VENDOR('C','S','C'));

View File

@ -694,11 +694,15 @@ static int davicom_probe ( struct dev *dev ) {
/* initialize device */
davicom_reset(nic);
dev->disable = davicom_disable;
nic->poll = davicom_poll;
nic->transmit = davicom_transmit;
nic->irq = davicom_irq;
static struct nic_operations davicom_operations;
static struct nic_operations davicom_operations = {
.connect = dummy_connect,
.poll = davicom_poll,
.transmit = davicom_transmit,
.irq = davicom_irq,
.disable = davicom_disable,
};
nic->nic_op = &davicom_operations;
return 1;
}

View File

@ -773,10 +773,14 @@ static int depca_probe(struct dev *dev, unsigned short *probe_addrs)
depca_reset(nic);
/* point to NIC specific routines */
dev->disable = depca_disable;
nic->poll = depca_poll;
nic->transmit = depca_transmit;
nic->irq = depca_irq;
static struct nic_operations depca_operations;
static struct nic_operations depca_operations = {
.connect = dummy_connect,
.poll = depca_poll,
.transmit = depca_transmit,
.irq = depca_irq,
.disable = depca_disable,
}; nic->nic_op = &depca_operations;
/* Based on PnP ISA map */
dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

View File

@ -515,10 +515,14 @@ static int dmfe_probe ( struct dev *dev ) {
nic->ioaddr = pci->ioaddr;
/* point to NIC specific routines */
dev->disable = dmfe_disable;
nic->poll = dmfe_poll;
nic->transmit = dmfe_transmit;
nic->irq = dmfe_irq;
static struct nic_operations dmfe_operations;
static struct nic_operations dmfe_operations = {
.connect = dummy_connect,
.poll = dmfe_poll,
.transmit = dmfe_transmit,
.irq = dmfe_irq,
.disable = dmfe_disable,
}; nic->nic_op = &dmfe_operations;
return 1;
}

View File

@ -3663,10 +3663,14 @@ static int e1000_probe ( struct dev *dev ) {
init_descriptor();
/* point to NIC specific routines */
dev->disable = e1000_disable;
nic->poll = e1000_poll;
nic->transmit = e1000_transmit;
nic->irq = e1000_irq;
static struct nic_operations e1000_operations;
static struct nic_operations e1000_operations = {
.connect = dummy_connect,
.poll = e1000_poll,
.transmit = e1000_transmit,
.irq = e1000_irq,
.disable = e1000_disable,
}; nic->nic_op = &e1000_operations;
return 1;
}

View File

@ -606,10 +606,14 @@ static int eepro_probe(struct dev *dev, unsigned short *probe_addrs)
eepro_reset(nic);
/* point to NIC specific routines */
dev->disable = eepro_disable;
nic->poll = eepro_poll;
nic->transmit = eepro_transmit;
nic->irq = eepro_irq;
static struct nic_operations eepro_operations;
static struct nic_operations eepro_operations = {
.connect = dummy_connect,
.poll = eepro_poll,
.transmit = eepro_transmit,
.irq = eepro_irq,
.disable = eepro_disable,
}; nic->nic_op = &eepro_operations;
/* Based on PnP ISA map */
dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);
dev->devid.device_id = htons(0x828a);

View File

@ -767,11 +767,15 @@ static int eepro100_probe ( struct dev *dev ) {
eepro100_disable(dev);
return 0;
}
dev->disable = eepro100_disable;
nic->poll = eepro100_poll;
nic->transmit = eepro100_transmit;
nic->irq = eepro100_irq;
static struct nic_operations eepro100_operations;
static struct nic_operations eepro100_operations = {
.connect = dummy_connect,
.poll = eepro100_poll,
.transmit = eepro100_transmit,
.irq = eepro100_irq,
.disable = eepro100_disable,
};
nic->nic_op = &eepro100_operations;
return 1;
}

View File

@ -202,11 +202,15 @@ epic100_probe ( struct dev *dev ) {
}
epic100_open();
dev->disable = epic100_disable;
nic->poll = epic100_poll;
nic->transmit = epic100_transmit;
nic->irq = epic100_irq;
static struct nic_operations epic100_operations;
static struct nic_operations epic100_operations = {
.connect = dummy_connect,
.poll = epic100_poll,
.transmit = epic100_transmit,
.irq = epic100_irq,
.disable = epic100_disable,
};
nic->nic_op = &epic100_operations;
return 1;
}

View File

@ -1015,10 +1015,14 @@ static int forcedeth_probe ( struct dev *dev ) {
forcedeth_reset(nic);
// if (board_found && valid_link)
/* point to NIC specific routines */
dev->disable = forcedeth_disable;
nic->poll = forcedeth_poll;
nic->transmit = forcedeth_transmit;
nic->irq = forcedeth_irq;
static struct nic_operations forcedeth_operations;
static struct nic_operations forcedeth_operations = {
.connect = dummy_connect,
.poll = forcedeth_poll,
.transmit = forcedeth_transmit,
.irq = forcedeth_irq,
.disable = forcedeth_disable,
}; nic->nic_op = &forcedeth_operations;
return 1;
// }
/* else */

View File

@ -763,10 +763,14 @@ static int mtd_probe ( struct dev *dev ) {
mtd_reset( nic );
/* point to NIC specific routines */
dev->disable = mtd_disable;
nic->poll = mtd_poll;
nic->transmit = mtd_transmit;
nic->irq = dummy_irq;
static struct nic_operations mtd_operations;
static struct nic_operations mtd_operations = {
.connect = dummy_connect,
.poll = mtd_poll,
.transmit = mtd_transmit,
.irq = dummy_irq,
.disable = mtd_disable,
}; nic->nic_op = &mtd_operations;
return 1;
}

View File

@ -316,11 +316,15 @@ natsemi_probe ( struct dev *dev ) {
/* initialize device */
natsemi_init(nic);
dev->disable = natsemi_disable;
nic->poll = natsemi_poll;
nic->transmit = natsemi_transmit;
nic->irq = natsemi_irq;
static struct nic_operations natsemi_operations;
static struct nic_operations natsemi_operations = {
.connect = dummy_connect,
.poll = natsemi_poll,
.transmit = natsemi_transmit,
.irq = natsemi_irq,
.disable = natsemi_disable,
};
nic->nic_op = &natsemi_operations;
return 1;
}

View File

@ -1000,10 +1000,14 @@ static int ns83820_probe ( struct dev *dev ) {
ns83820_reset(nic);
/* point to NIC specific routines */
dev->disable = ns83820_disable;
nic->poll = ns83820_poll;
nic->transmit = ns83820_transmit;
nic->irq = ns83820_irq;
static struct nic_operations ns83820_operations;
static struct nic_operations ns83820_operations = {
.connect = dummy_connect,
.poll = ns83820_poll,
.transmit = ns83820_transmit,
.irq = ns83820_irq,
.disable = ns83820_disable,
}; nic->nic_op = &ns83820_operations;
return 1;
}

View File

@ -930,11 +930,15 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
if (eth_vendor != VENDOR_3COM)
eth_rmem = eth_bmem;
ns8390_reset(nic);
dev->disable = ns8390_disable;
nic->poll = ns8390_poll;
nic->transmit = ns8390_transmit;
nic->irq = ns8390_irq;
static struct nic_operations ns8390_operations;
static struct nic_operations ns8390_operations = {
.connect = dummy_connect,
.poll = ns8390_poll,
.transmit = ns8390_transmit,
.irq = ns8390_irq,
.disable = ns8390_disable,
};
nic->nic_op = &ns8390_operations;
/* Based on PnP ISA map */
#ifdef INCLUDE_WD

View File

@ -945,11 +945,15 @@ static int pcnet32_probe ( struct dev *dev ) {
else
printf("\n");
}
dev->disable = pcnet32_disable;
nic->poll = pcnet32_poll;
nic->transmit = pcnet32_transmit;
nic->irq = pcnet32_irq;
static struct nic_operations pcnet32_operations;
static struct nic_operations pcnet32_operations = {
.connect = dummy_connect,
.poll = pcnet32_poll,
.transmit = pcnet32_transmit,
.irq = pcnet32_irq,
.disable = pcnet32_disable,
};
nic->nic_op = &pcnet32_operations;
return 1;
}

View File

@ -856,10 +856,14 @@ static int prism2_pci_probe(struct dev *dev, struct pci_device *p)
printf ( "Link connected (BSSID %! - MAC address %!)\n", hw->bssid, nic->node_addr );
/* point to NIC specific routines */
dev->disable = prism2_disable;
nic->poll = prism2_poll;
nic->transmit = prism2_transmit;
nic->irq = prism2_irq;
static struct nic_operations prism2_operations;
static struct nic_operations prism2_operations = {
.connect = dummy_connect,
.poll = prism2_poll,
.transmit = prism2_transmit,
.irq = prism2_irq,
.disable = prism2_disable,
}; nic->nic_op = &prism2_operations;
return 1;
}

View File

@ -831,10 +831,14 @@ static int r8169_probe ( struct dev *dev ) {
r8169_reset(nic);
/* point to NIC specific routines */
dev->disable = r8169_disable;
nic->poll = r8169_poll;
nic->transmit = r8169_transmit;
nic->irq = r8169_irq;
static struct nic_operations r8169_operations;
static struct nic_operations r8169_operations = {
.connect = dummy_connect,
.poll = r8169_poll,
.transmit = r8169_transmit,
.irq = r8169_irq,
.disable = r8169_disable,
}; nic->nic_op = &r8169_operations;
nic->irqno = pci->irq;
nic->ioaddr = ioaddr;
return 1;

View File

@ -223,11 +223,15 @@ static int rtl8139_probe ( struct dev *dev ) {
printf("Cable not connected or other link failure\n");
return(0);
}
dev->disable = rtl_disable;
nic->poll = rtl_poll;
nic->transmit = rtl_transmit;
nic->irq = rtl_irq;
static struct nic_operations rtl_operations;
static struct nic_operations rtl_operations = {
.connect = dummy_connect,
.poll = rtl_poll,
.transmit = rtl_transmit,
.irq = rtl_irq,
.disable = rtl_disable,
};
nic->nic_op = &rtl_operations;
return 1;
}

View File

@ -409,11 +409,15 @@ static int sis900_probe ( struct dev *dev ) {
/* initialize device */
sis900_init(nic);
dev->disable = sis900_disable;
nic->poll = sis900_poll;
nic->transmit = sis900_transmit;
nic->irq = sis900_irq;
static struct nic_operations sis900_operations;
static struct nic_operations sis900_operations = {
.connect = dummy_connect,
.poll = sis900_poll,
.transmit = sis900_transmit,
.irq = sis900_irq,
.disable = sis900_disable,
};
nic->nic_op = &sis900_operations;
return 1;
}

View File

@ -782,10 +782,14 @@ static int SK_probe(struct dev *dev, unsigned short *probe_addrs)
nic->ioaddr = ioaddr & ~3;
nic->irqno = 0;
/* point to NIC specific routines */
dev->disable = SK_disable;
nic->poll = SK_poll;
nic->transmit = SK_transmit;
nic->irq = SK_irq;
static struct nic_operations SK_operations;
static struct nic_operations SK_operations = {
.connect = dummy_connect,
.poll = SK_poll,
.transmit = SK_transmit,
.irq = SK_irq,
.disable = SK_disable,
}; nic->nic_op = &SK_operations;
/* FIXME set dev->devid */
return 1;
}

View File

@ -145,10 +145,14 @@ static int skel_probe ( struct dev *dev ) {
nic->ioaddr = pci->ioaddr & ~3;
nic->irqno = pci->irq;
/* point to NIC specific routines */
dev->disable = skel_disable;
nic->poll = skel_poll;
nic->transmit = skel_transmit;
nic->irq = skel_irq;
static struct nic_operations skel_operations;
static struct nic_operations skel_operations = {
.connect = dummy_connect,
.poll = skel_poll,
.transmit = skel_transmit,
.irq = skel_irq,
.disable = skel_disable,
}; nic->nic_op = &skel_operations;
return 1;
}
/* else */
@ -174,10 +178,14 @@ static int skel_isa_probe(struct dev *dev, unsigned short *probe_addrs)
if (board_found && valid_link)
{
/* point to NIC specific routines */
dev->disable = skel_disable;
nic->poll = skel_poll;
nic->transmit = skel_transmit;
nic->irq = skel_irq;
static struct nic_operations skel_operations;
static struct nic_operations skel_operations = {
.connect = dummy_connect,
.poll = skel_poll,
.transmit = skel_transmit,
.irq = skel_irq,
.disable = skel_disable,
}; nic->nic_op = &skel_operations;
/* Report the ISA pnp id of the board */
dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

View File

@ -514,11 +514,15 @@ static int smc9000_probe(struct dev *dev, unsigned short *probe_addrs)
_outw( inw( smc9000_base + CONFIG ) | CFG_AUI_SELECT,
smc9000_base + CONFIG );
}
dev->disable = smc9000_disable;
nic->poll = smc9000_poll;
nic->transmit = smc9000_transmit;
nic->irq = smc9000_irq;
static struct nic_operations smc9000_operations;
static struct nic_operations smc9000_operations = {
.connect = dummy_connect,
.poll = smc9000_poll,
.transmit = smc9000_transmit,
.irq = smc9000_irq,
.disable = smc9000_disable,
};
nic->nic_op = &smc9000_operations;
/* Based on PnP ISA map */
dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

View File

@ -735,10 +735,14 @@ static int sundance_probe ( struct dev *dev ) {
sdc->mii_if.full_duplex ? "Full" : "Half");
/* point to NIC specific routines */
dev->disable = sundance_disable;
nic->poll = sundance_poll;
nic->transmit = sundance_transmit;
nic->irq = sundance_irq;
static struct nic_operations sundance_operations;
static struct nic_operations sundance_operations = {
.connect = dummy_connect,
.poll = sundance_poll,
.transmit = sundance_transmit,
.irq = sundance_irq,
.disable = sundance_disable,
}; nic->nic_op = &sundance_operations;
nic->irqno = pci->irq;
nic->ioaddr = BASE;

View File

@ -3340,11 +3340,15 @@ static int tg3_probe ( struct dev *dev ) {
printf("Valid link not established\n");
goto err_out_disable;
}
dev->disable = tg3_disable;
nic->poll = tg3_poll;
nic->transmit = tg3_transmit;
nic->irq = tg3_irq;
static struct nic_operations tg3_operations;
static struct nic_operations tg3_operations = {
.connect = dummy_connect,
.poll = tg3_poll,
.transmit = tg3_transmit,
.irq = tg3_irq,
.disable = tg3_disable,
};
nic->nic_op = &tg3_operations;
return 1;

View File

@ -844,11 +844,15 @@ static int tlan_probe ( struct dev *dev ) {
/* if (board_found && valid_link)
{*/
/* point to NIC specific routines */
dev->disable = tlan_disable;
nic->poll = tlan_poll;
nic->transmit = tlan_transmit;
nic->irq = tlan_irq;
static struct nic_operations tlan_operations;
static struct nic_operations tlan_operations = {
.connect = dummy_connect,
.poll = tlan_poll,
.transmit = tlan_transmit,
.irq = tlan_irq,
.disable = tlan_disable,
};
nic->nic_op = &tlan_operations;
return 1;
}

View File

@ -1422,11 +1422,15 @@ static int tulip_probe ( struct dev *dev ) {
/* reset the device and make ready for tx and rx of packets */
tulip_reset(nic);
dev->disable = tulip_disable;
nic->poll = tulip_poll;
nic->transmit = tulip_transmit;
nic->irq = tulip_irq;
static struct nic_operations tulip_operations;
static struct nic_operations tulip_operations = {
.connect = dummy_connect,
.poll = tulip_poll,
.transmit = tulip_transmit,
.irq = tulip_irq,
.disable = tulip_disable,
};
nic->nic_op = &tulip_operations;
/* give the board a chance to reset before returning */
tulip_wait(4*TICKS_PER_SEC);

View File

@ -963,11 +963,15 @@ rhine_probe ( struct dev *dev ) {
adjust_pci_device(pci);
rhine_reset (nic);
dev->disable = rhine_disable;
nic->poll = rhine_poll;
nic->transmit = rhine_transmit;
nic->irq = rhine_irq;
static struct nic_operations rhine_operations;
static struct nic_operations rhine_operations = {
.connect = dummy_connect,
.poll = rhine_poll,
.transmit = rhine_transmit,
.irq = rhine_irq,
.disable = rhine_disable,
};
nic->nic_op = &rhine_operations;
nic->irqno = pci->irq;
nic->ioaddr = tp->ioaddr;

View File

@ -698,10 +698,14 @@ static int w89c840_probe ( struct dev *dev ) {
}
/* point to NIC specific routines */
dev->disable = w89c840_disable;
nic->poll = w89c840_poll;
nic->transmit = w89c840_transmit;
nic->irq = w89c840_irq;
static struct nic_operations w89c840_operations;
static struct nic_operations w89c840_operations = {
.connect = dummy_connect,
.poll = w89c840_poll,
.transmit = w89c840_transmit,
.irq = w89c840_irq,
.disable = w89c840_disable,
}; nic->nic_op = &w89c840_operations;
w89c840_reset(nic);