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/tg3.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/tg3.c')
| -rw-r--r-- | src/drivers/net/tg3.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/drivers/net/tg3.c b/src/drivers/net/tg3.c index e4e67136..56423391 100644 --- a/src/drivers/net/tg3.c +++ b/src/drivers/net/tg3.c @@ -3224,15 +3224,15 @@ static struct nic_operations tg3_operations = { .poll = tg3_poll, .transmit = tg3_transmit, .irq = tg3_irq, - .disable = tg3_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 tg3_probe ( struct dev *dev, struct pci_device *pdev ) { - struct nic *nic = nic_device ( dev ); +static int tg3_probe ( struct nic *nic, struct pci_device *pdev ) { + struct tg3 *tp = &tg3; unsigned long tg3reg_base, tg3reg_len; int i, err, pm_cap; @@ -3385,6 +3385,7 @@ PCI_ROM(0x173b, 0x03eb, "tg3-ac1003", "Altima AC1003"), }; static struct pci_driver tg3_driver = - PCI_DRIVER ( "TG3", tg3_nics, PCI_NO_CLASS ); + PCI_DRIVER ( tg3_nics, PCI_NO_CLASS ); -BOOT_DRIVER ( "TG3", find_pci_boot_device, tg3_driver, tg3_probe ); +DRIVER ( "TG3", nic_driver, pci_driver, tg3_driver, + tg3_probe, tg3_disable ); |
