mirror of https://github.com/ipxe/ipxe.git
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.pull/1/head
parent
9747c1a486
commit
1d7974182e
|
@ -98,12 +98,20 @@ int legacy_probe ( void *hwdev,
|
||||||
netdev->dev = dev;
|
netdev->dev = dev;
|
||||||
|
|
||||||
nic.node_addr = netdev->ll_addr;
|
nic.node_addr = netdev->ll_addr;
|
||||||
|
nic.irqno = dev->desc.irq;
|
||||||
|
|
||||||
if ( ! probe ( &nic, hwdev ) ) {
|
if ( ! probe ( &nic, hwdev ) ) {
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_probe;
|
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 )
|
if ( ( rc = register_netdev ( netdev ) ) != 0 )
|
||||||
goto err_register;
|
goto err_register;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue