Browse Source

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.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
1d7974182e
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/drivers/net/legacy.c

+ 8
- 0
src/drivers/net/legacy.c View File

98
 	netdev->dev = dev;
98
 	netdev->dev = dev;
99
 
99
 
100
 	nic.node_addr = netdev->ll_addr;
100
 	nic.node_addr = netdev->ll_addr;
101
+	nic.irqno = dev->desc.irq;
101
 
102
 
102
 	if ( ! probe ( &nic, hwdev ) ) {
103
 	if ( ! probe ( &nic, hwdev ) ) {
103
 		rc = -ENODEV;
104
 		rc = -ENODEV;
104
 		goto err_probe;
105
 		goto err_probe;
105
 	}
106
 	}
106
 
107
 
108
+	/* Overwrite the IRQ number.  Some legacy devices set
109
+	 * nic->irqno to 0 in the probe routine to indicate that they
110
+	 * don't support interrupts; doing this allows the timer
111
+	 * interrupt to be used instead.
112
+	 */
113
+	dev->desc.irq = nic.irqno;
114
+
107
 	if ( ( rc = register_netdev ( netdev ) ) != 0 )
115
 	if ( ( rc = register_netdev ( netdev ) ) != 0 )
108
 		goto err_register;
116
 		goto err_register;
109
 
117
 

Loading…
Cancel
Save