Procházet zdrojové kódy

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 před 16 roky
rodič
revize
1d7974182e
1 změnil soubory, kde provedl 8 přidání a 0 odebrání
  1. 8
    0
      src/drivers/net/legacy.c

+ 8
- 0
src/drivers/net/legacy.c Zobrazit soubor

@@ -98,12 +98,20 @@ int legacy_probe ( void *hwdev,
98 98
 	netdev->dev = dev;
99 99
 
100 100
 	nic.node_addr = netdev->ll_addr;
101
+	nic.irqno = dev->desc.irq;
101 102
 
102 103
 	if ( ! probe ( &nic, hwdev ) ) {
103 104
 		rc = -ENODEV;
104 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 115
 	if ( ( rc = register_netdev ( netdev ) ) != 0 )
108 116
 		goto err_register;
109 117
 

Načítá se…
Zrušit
Uložit