Переглянути джерело

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 16 роки тому
джерело
коміт
1d7974182e
1 змінених файлів з 8 додано та 0 видалено
  1. 8
    0
      src/drivers/net/legacy.c

+ 8
- 0
src/drivers/net/legacy.c Переглянути файл

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
 

Завантаження…
Відмінити
Зберегти