Re: Bug in ne2000 driver

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 26 Mar 1998 10:06:30 +0000 (GMT)


> When the driver is loaded with the correct address but an incorrect irq,
> the driver reports success. However, no packets can go in or out of the
> card. Interestingly, the card will report the number of packets sent to
> it, all of them as 'dropped'.

You may have noticed your computer has a bug. If you forget to plug it in
it doesnt beep and remind you to insert the mains lead. Clearly it should
test this when you turn it on 8)

> The best fix would be to change the ne2000 driver to check that the irq is
> correct. I'm told this must be possible since Windows 95 does it. A

For most NE2K cards it should be. You've got the source to ne.c and 8390.c
in the kernel tree, all you need to do is what the sound drivers do which
is basically

request_irq(n for my_irq_test)
cli()
cause_irq();
current->timeout=HZ;
sleep_on(&my_irq_wait);
sti();
if(my_irq_didnt_occur)
bitch_loudly()
free_irq(n)

> weaker solution would be to document the fact that if the card is not
> operationtal, but does report dropped packets, that an incorrect irq
> setting is the likely cause.

Actually the normal causes tend to be not plugging the cable in and selecting
the wrong port.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu