diff options
author | Michael Brown | 2005-04-21 21:20:39 +0200 |
---|---|---|
committer | Michael Brown | 2005-04-21 21:20:39 +0200 |
commit | 614c39a8a40a32146793bd25906964659d90f95b (patch) | |
tree | 9acc979cce4658905d1bffd26d03058435c5d4c5 /src/drivers/net/3c515.c | |
parent | Tweaked API to minimise changes to existing drivers even further. (diff) | |
download | ipxe-614c39a8a40a32146793bd25906964659d90f95b.tar.gz ipxe-614c39a8a40a32146793bd25906964659d90f95b.tar.xz ipxe-614c39a8a40a32146793bd25906964659d90f95b.zip |
Automatically updated with the program
#!/usr/bin/perl -w -pi -0777
use strict;
( my $type ) = /find_(\w+?)_boot_device/ or die "Could not find type\n";
( my $disable ) = /\.disable\s*=\s*(\w+)/ or die "Could not locate disable\n";
s/(${disable}\s*\(\s*struct\s+nic\s+\*nic)(\s*\)\s*\{)(\s*)/${1}, struct ${type}_device \*${type} __unused${2}${3}nic_disable ( nic );${3}/s;
s/(${disable}\s*\(\s*struct\s+nic\s+\*nic)(\s*\)\s*;)/${1}, struct ${type}_device \*${type}${2}/g;
s/^\s*.disable\s*=\s*${disable}\s*,\s*?$//m;
s/(_probe\s*\(\s*)struct\s+dev\s+\*dev/${1}struct nic \*nic/g;
s/^\s*struct\s+nic\s+\*nic\s*=\s*nic_device\s*\(\s*dev\s*\)\s*;\s*?$//m;
s/^(\s*)(nic->(ioaddr|irqno)\s*=\s*${type})/${1}${type}_fill_nic ( nic, ${type} );\n${1}${2}/m;
Diffstat (limited to 'src/drivers/net/3c515.c')
-rw-r--r-- | src/drivers/net/3c515.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/drivers/net/3c515.c b/src/drivers/net/3c515.c index 54ef3302..4e32ea7e 100644 --- a/src/drivers/net/3c515.c +++ b/src/drivers/net/3c515.c @@ -565,7 +565,9 @@ static void t515_transmit(struct nic *nic, const char *d, /* Destination */ /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void t515_disable ( struct nic *nic ) { +static void t515_disable ( struct nic *nic, struct isapnp_device *isapnp __unused ) { + + nic_disable ( nic ); /* merge reset an disable */ t515_reset(nic); @@ -610,17 +612,19 @@ static struct nic_operations t515_operations = { .poll = t515_poll, .transmit = t515_transmit, .irq = t515_irq, - .disable = t515_disable, + }; /************************************************************************** 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 t515_probe ( struct dev *dev, struct isapnp_device *isapnp ) { - struct nic *nic = nic_device ( dev ); +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, 1 ); @@ -762,9 +766,9 @@ static struct isapnp_id t515_adapters[] = { }; static struct isapnp_driver t515_driver = - ISAPNP_DRIVER ( "3c515", t515_adapters ); + ISAPNP_DRIVER ( t515_adapters ); -BOOT_DRIVER ( "3c515", find_isapnp_boot_device, t515_driver, - t515_probe ); +DRIVER ( "3c515", nic_driver, isapnp_driver, t515_driver, + t515_probe, t515_disable ); ISA_ROM ( "3c515", "3c515 Fast EtherLink ISAPnP" ); |