e1000 driver and interrupt registration
From: Devin Heitmueller
Date: Tue Mar 08 2005 - 18:42:32 EST
Hello,
I recently upgraded to 2.4.29 from 2.4.21 and see that the interrupt of
the e1000 device is not being shown when running /sbin/ifconfig.
It would appear that in version 1.56 of e1000_main.c, the e1000_probe
function was modified to store the IRQ of the device in pdev->irq
instead of netdev->irq.
http://linux.bkbits.net:8080/linux-2.4/diffs/drivers/net/e1000/e1000_main.c@xxxx?nav=index.html|src/|src/drivers|src/drivers/net|src/drivers/net/e1000|hist/drivers/net/e1000/e1000_main.c
According to the log, this was done "in preparation for MSI support".
However, it would appear that no other Ethernet driver does this. As a
result, the value is not present in the netdev->irq field, and hence the
SIOCGIFMAP ioctl call does not include the interrupt.
Is this expected behavior? It would appear that this is a backport from
2.6, so perhaps it should not work this way in stable 2.4 kernels.
Is there any harm in also including the IRQ in the netdev struct, as I
have applications that expect this (such as ifconfig)?
The following patch appears to fix the issue. I'm just not sure if it
breaks anything else:
--- linux-2.4.29/drivers/net/e1000/e1000_main.c Wed Jan 19 09:09:56 2005
+++ kernel/drivers/net/e1000/e1000_main.c Tue Mar 8 16:13:46 2005
@@ -485,6 +485,9 @@
#endif
strcpy(netdev->name, pci_name(pdev));
+ netdev->irq = pdev->irq;
+
netdev->mem_start = mmio_start;
netdev->mem_end = mmio_start + mmio_len;
netdev->base_addr = adapter->hw.io_base;
Thanks in advance,
--
Devin Heitmueller
Senior Software Engineer
AEP Networks, Inc. (formerly Netilla)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/