Skip to contentSkip to conversation

e1000 driver and interrupt registration

PATCH Devin Heitmueller 1 participant 1 message Mar 8, 2005 Network drivers

lore
Share & tools
lore
#0 lore raw

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/[email protected]?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:

drivers/net/e1000/e1000_main.c Tue Mar 8 16:13:46 2005 renamed from drivers/net/e1000/e1000_main.c Wed Jan 19 09:09:56 2005 +2 -0
@@ -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,

Signature · 3 lines
Devin Heitmueller
Senior Software Engineer
AEP Networks, Inc. (formerly Netilla)