summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/w89c840.c
diff options
context:
space:
mode:
authorMichael Brown2005-04-21 21:20:39 +0200
committerMichael Brown2005-04-21 21:20:39 +0200
commit614c39a8a40a32146793bd25906964659d90f95b (patch)
tree9acc979cce4658905d1bffd26d03058435c5d4c5 /src/drivers/net/w89c840.c
parentTweaked API to minimise changes to existing drivers even further. (diff)
downloadipxe-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/w89c840.c')
-rw-r--r--src/drivers/net/w89c840.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c
index 88f68bb6..d3686d5e 100644
--- a/src/drivers/net/w89c840.c
+++ b/src/drivers/net/w89c840.c
@@ -579,7 +579,8 @@ static void w89c840_transmit(
/**************************************************************************
w89c840_disable - Turn off ethernet interface
***************************************************************************/
-static void w89c840_disable ( struct nic *nic ) {
+static void w89c840_disable ( struct nic *nic, struct pci_device *pci __unused ) {
+ nic_disable ( nic );
/* merge reset and disable */
w89c840_reset(nic);
@@ -609,7 +610,7 @@ static struct nic_operations w89c840_operations = {
.poll = w89c840_poll,
.transmit = w89c840_transmit,
.irq = w89c840_irq,
- .disable = w89c840_disable,
+
};
static struct pci_id w89c840_nics[] = {
@@ -618,13 +619,13 @@ PCI_ROM(0x11f6, 0x2011, "compexrl100atx", "Compex RL100ATX"),
};
static struct pci_driver w89c840_driver =
- PCI_DRIVER ( "W89C840F", w89c840_nics, PCI_NO_CLASS );
+ PCI_DRIVER ( w89c840_nics, PCI_NO_CLASS );
/**************************************************************************
w89c840_probe - Look for an adapter, this routine's visible to the outside
***************************************************************************/
-static int w89c840_probe ( struct dev *dev, struct pci_device *p ) {
- struct nic *nic = nic_device ( dev );
+static int w89c840_probe ( struct nic *nic, struct pci_device *p ) {
+
u16 sum = 0;
int i, j;
@@ -954,4 +955,5 @@ static void init_ring(void)
}
-BOOT_DRIVER ( "W89C840F", find_pci_boot_device, w89c840_driver, w89c840_probe );
+DRIVER ( "W89C840F", nic_driver, pci_driver, w89c840_driver,
+ w89c840_probe, w89c840_disable );