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/dmfe.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/dmfe.c')
-rw-r--r-- | src/drivers/net/dmfe.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c index 8067c6af..65a7fbf1 100644 --- a/src/drivers/net/dmfe.c +++ b/src/drivers/net/dmfe.c @@ -459,8 +459,8 @@ PROBE - Look for an adapter, this routine's visible to the outside #define board_found 1 #define valid_link 0 -static int dmfe_probe ( struct dev *dev, struct pci_device *pci ) { - struct nic *nic = nic_device ( dev ); +static int dmfe_probe ( struct nic *nic, struct pci_device *pci ) { + uint32_t dev_rev, pci_pmr; int i; @@ -508,6 +508,7 @@ static int dmfe_probe ( struct dev *dev, struct pci_device *pci ) { dmfe_reset(nic); nic->irqno = 0; + pci_fill_nic ( nic, pci ); nic->ioaddr = pci->ioaddr; /* point to NIC specific routines */ @@ -1213,7 +1214,7 @@ static struct nic_operations dmfe_operations = { .poll = dmfe_poll, .transmit = dmfe_transmit, .irq = dmfe_irq, - .disable = dmfe_disable, + }; static struct pci_id dmfe_nics[] = { @@ -1224,6 +1225,7 @@ static struct pci_id dmfe_nics[] = { }; static struct pci_driver dmfe_driver = - PCI_DRIVER ( "DMFE/PCI", dmfe_nics, PCI_NO_CLASS ); + PCI_DRIVER ( dmfe_nics, PCI_NO_CLASS ); -BOOT_DRIVER ( "DMFE/PCI", find_pci_boot_device, dmfe_driver, dmfe_probe ); +DRIVER ( "DMFE/PCI", nic_driver, pci_driver, dmfe_driver, + dmfe_probe, dmfe_disable ); |