diff options
author | Michael Brown <mcb30@etherboot.org> | 2005-04-21 19:20:39 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2005-04-21 19:20:39 +0000 |
commit | 614c39a8a40a32146793bd25906964659d90f95b (patch) | |
tree | 9acc979cce4658905d1bffd26d03058435c5d4c5 /src/drivers/net/3c90x.c | |
parent | cfe3a663af0dc133b8f9a1652d0820160889d6ea (diff) | |
download | ipxe-614c39a8a40a32146793bd25906964659d90f95b.tar.gz |
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/3c90x.c')
-rw-r--r-- | src/drivers/net/3c90x.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c index b3aa76bf..061f954c 100644 --- a/src/drivers/net/3c90x.c +++ b/src/drivers/net/3c90x.c @@ -690,8 +690,8 @@ 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 = nic_device ( dev ); +static int a3c90x_probe ( struct nic *nic, struct pci_device *pci ) { + int i, c; unsigned short eeprom[0x21]; unsigned int cfg; @@ -705,6 +705,8 @@ static int a3c90x_probe ( struct dev *dev, struct pci_device *pci ) { adjust_pci_device(pci); + pci_fill_nic ( nic, pci ); + nic->ioaddr = pci->ioaddr; nic->irqno = 0; @@ -960,7 +962,7 @@ static struct nic_operations a3c90x_operations = { .poll = a3c90x_poll, .transmit = a3c90x_transmit, .irq = a3c90x_irq, - .disable = a3c90x_disable, + }; static struct pci_id a3c90x_nics[] = { @@ -991,6 +993,7 @@ PCI_ROM(0x10b7, 0x1202, "3c982b", "3Com982B"), }; static struct pci_driver a3c90x_driver = - PCI_DRIVER ( "3C90X", a3c90x_nics, PCI_NO_CLASS ); + PCI_DRIVER ( a3c90x_nics, PCI_NO_CLASS ); -BOOT_DRIVER ( "3C90X", find_pci_boot_device, a3c90x_driver, a3c90x_probe ); +DRIVER ( "3C90X", nic_driver, pci_driver, a3c90x_driver, + a3c90x_probe, a3c90x_disable ); |