summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/legacy.c
diff options
context:
space:
mode:
authorMichael Brown2007-12-15 20:32:32 +0100
committerMichael Brown2007-12-15 20:32:32 +0100
commit1d7974182e1e52a9296a0288c37f1002aaab8edb (patch)
tree7a4e3dbc557f5b4534384681f468021e9f8137ab /src/drivers/net/legacy.c
parentRemove the obsolete pre-aBFT AoE boot table. (diff)
downloadipxe-1d7974182e1e52a9296a0288c37f1002aaab8edb.tar.gz
ipxe-1d7974182e1e52a9296a0288c37f1002aaab8edb.tar.xz
ipxe-1d7974182e1e52a9296a0288c37f1002aaab8edb.zip
Overwrite the device descriptor's IRQ number with whatever the legacy
driver's probe() routine fills in in nic->irqno. This is so that non-interrupt-capable legacy drivers which set nic->irqno=0 will end up reporting IRQ#0 via PXENV_UNDI_GET_INFORMATION; this in turn means that the calling PXE NBP will (should) hook the timer interrupt, and everything will sort of work.
Diffstat (limited to 'src/drivers/net/legacy.c')
-rw-r--r--src/drivers/net/legacy.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/net/legacy.c b/src/drivers/net/legacy.c
index 9b82f1ca..32460adb 100644
--- a/src/drivers/net/legacy.c
+++ b/src/drivers/net/legacy.c
@@ -98,12 +98,20 @@ int legacy_probe ( void *hwdev,
netdev->dev = dev;
nic.node_addr = netdev->ll_addr;
+ nic.irqno = dev->desc.irq;
if ( ! probe ( &nic, hwdev ) ) {
rc = -ENODEV;
goto err_probe;
}
+ /* Overwrite the IRQ number. Some legacy devices set
+ * nic->irqno to 0 in the probe routine to indicate that they
+ * don't support interrupts; doing this allows the timer
+ * interrupt to be used instead.
+ */
+ dev->desc.irq = nic.irqno;
+
if ( ( rc = register_netdev ( netdev ) ) != 0 )
goto err_register;