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/smc9000.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/smc9000.c')
| -rw-r--r-- | src/drivers/net/smc9000.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/drivers/net/smc9000.c b/src/drivers/net/smc9000.c index 6cadcd0c..c59d9d8e 100644 --- a/src/drivers/net/smc9000.c +++ b/src/drivers/net/smc9000.c @@ -346,7 +346,8 @@ static int smc9000_poll(struct nic *nic, int retrieve) return 0; } -static void smc9000_disable ( struct nic *nic ) { +static void smc9000_disable ( struct nic *nic, struct isa_device *isa __unused ) { + nic_disable ( nic ); smc_reset(nic->ioaddr); /* no more interrupts for me */ @@ -376,15 +377,15 @@ static struct nic_operations smc9000_operations = { .poll = smc9000_poll, .transmit = smc9000_transmit, .irq = smc9000_irq, - .disable = smc9000_disable, + }; /************************************************************************** * ETH_PROBE - Look for an adapter ***************************************************************************/ -static int smc9000_probe ( struct dev *dev, struct isa_device *isa ) { - struct nic *nic = nic_device ( dev ); +static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) { + unsigned short revision; int memory; int media; @@ -393,6 +394,7 @@ static int smc9000_probe ( struct dev *dev, struct isa_device *isa ) { int i; nic->irqno = 0; + isa_fill_nic ( nic, isa ); nic->ioaddr = isa->ioaddr; /* @@ -489,10 +491,11 @@ static isa_probe_addr_t smc9000_probe_addrs[] = { }; static struct isa_driver smc9000_driver = - ISA_DRIVER ( "SMC9000", smc9000_probe_addrs, smc9000_probe_addr, + ISA_DRIVER ( smc9000_probe_addrs, smc9000_probe_addr, GENERIC_ISAPNP_VENDOR, 0x8228 ); -BOOT_DRIVER ( "SMC9000", find_isa_boot_device, smc9000_driver, smc9000_probe ); +DRIVER ( "SMC9000", nic_driver, isa_driver, smc9000_driver, + smc9000_probe, smc9000_disable ); ISA_ROM ( "smc9000", "SMC9000" ); |
