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/e1000.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/e1000.c')
| -rw-r--r-- | src/drivers/net/e1000.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/drivers/net/e1000.c b/src/drivers/net/e1000.c index 5332565fc..690ff1f26 100644 --- a/src/drivers/net/e1000.c +++ b/src/drivers/net/e1000.c @@ -3582,8 +3582,8 @@ static void e1000_irq(struct nic *nic __unused, irq_action_t action) 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 e1000_probe ( struct dev *dev, struct pci_device *p ) { - struct nic *nic = nic_device ( dev ); +static int e1000_probe ( struct nic *nic, struct pci_device *p ) { + unsigned long mmio_start, mmio_len; int ret_val, i; @@ -3671,7 +3671,7 @@ static struct nic_operations e1000_operations = { .poll = e1000_poll, .transmit = e1000_transmit, .irq = e1000_irq, - .disable = e1000_disable, + }; static struct pci_id e1000_nics[] = { @@ -3708,6 +3708,7 @@ PCI_ROM(0x8086, 0x107b, "e1000-82546gb-serdes", "Intel EtherExpressPro1000 }; static struct pci_driver e1000_driver = - PCI_DRIVER ( "E1000", e1000_nics, PCI_NO_CLASS ); + PCI_DRIVER ( e1000_nics, PCI_NO_CLASS ); -BOOT_DRIVER ( "E1000", find_pci_boot_device, e1000_driver, e1000_probe ); +DRIVER ( "E1000", nic_driver, pci_driver, e1000_driver, + e1000_probe, e1000_disable ); |
