Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Michael Brown committed Dec 15, 2007
1 parent 9747c1a commit 1d79741
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/drivers/net/legacy.c
Expand Up @@ -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;

Expand Down

0 comments on commit 1d79741

Please sign in to comment.