Possible bug in e1000 driver from ORe package
Alexander Valitov
valitov79 at mail.ru
Tue Mar 3 15:29:42 CET 2009
Hi,
There is possible bug in e1000 driver from ORe package.
The heart of the problem is that e1000_probe() function in
/trunk/l4/pkg/ore/server/lib26/net/e1000/e1000_main.c file does NOT set
'irq' field in 'net_device' structure (e.g. with assignment netdev->irq =
pdev->irq;). Instead it stores pointer to pci_device structure and uses its
'irq' field value (like this adapter->pdev->irq).
As a result ORe always outputs message like this one (because it uses
netdev->irq value):
ore | Device = lo, IRQ = 0, MAC = 00:00:00:00:00:00
ore | Device = eth0, IRQ = 0, MAC = 00:30:18:49:F9:DA
ore | Device = eth1, IRQ = 0, MAC = 00:30:18:49:F9:DB
And when I try to boot L4Linux with ORe stub driver, the driver fails to
init device due to wrong irq number:
eth0: Overwriting IRQ type for IRQ 0 with l4ore type!
eth0: request_irq(0, ...)
EBUSY is returned.
Solution is obvious but unfortunately it changes original e1000 Linux
driver. That's why I'm not sure that it is proper way to fix the problem.
Here is.
===================================================================
--- e1000_main.c (revision 433)
+++ e1000_main.c (working copy)
@@ -931,6 +931,7 @@
}
}
+ netdev->irq = pdev->irq;
netdev->open = &e1000_open;
netdev->stop = &e1000_close;
netdev->hard_start_xmit = &e1000_xmit_frame;
Does it make sense?
Best regards,
Alexander Valitov
--
View this message in context: http://www.nabble.com/Possible-bug-in-e1000-driver-from-ORe-package-tp22309613p22309613.html
Sent from the L4 mailing list archive at Nabble.com.
More information about the l4-hackers
mailing list