[FIX] 8390.c broken in 2.3.43+

From: Craig Kulesa (ckulesa@loke.as.arizona.edu)
Date: Wed Feb 16 2000 - 01:46:07 EST


Submitted for your approval...

Summary: The 8390 driver (as tested by the 3c503 module, among others)
         doesn't work for me on any tested ethernet cards that require it.
         This appears to be the result of the changes made in 2.3.43 as
         per David Miller's improvements to the network code.
         A simple fix seems to solve the problem for me, and I think is
         actually more correct in light of David's changes to the
         driver interface. Have a look at the supplied patch, try it
         out and let me know...

More details:

I administer a slew of old 486's and Pentiums with clunky old 3c503 (3Com
Etherlink II/16) ethernet cards. As of the networking changes implemented
in the patch to 2.3.43, I could no longer get any transmitted packets from
any of these cards, even though the modules loaded with no changes and no
complaints. These are idiosyncratic cards, but they've always worked in
the past.

The actual 3c503 code looks fine. Only one line was altered in recent
kernels, and quickly adding the following debugging line:

printk("link_state_start is %d", test_bit(LINK_STATE_START, &dev->state));

where the old "dev->start = 0;" line used to be, showed that the
LINK_STATE_START bit was indeed being correctly set (to 0). Good.

The 8390 code looks fine, except that I think Dave Miller's cleanup to the
networking code requires that the existing line:

        if (test_bit(LINK_STATE_XOFF, &dev->state))
actually be the following:
        if (test_bit(LINK_STATE_XOFF, &dev->flags))

If I compile this change into 8390.o, it still compiles cleanly and, even
better, all my cards work again. Yay! This was tested with kernel 2.3.45.

If this seems sensible, please consider the following patch (against
2.3.45) for newer beta kernels:

--- drivers/net/8390.c.orig Sun Feb 13 13:59:34 2000
+++ drivers/net/8390.c Tue Feb 15 23:02:37 2000
@@ -203,7 +203,7 @@
          * board has died and kick it.
          */
  
- if (test_bit(LINK_STATE_XOFF, &dev->state))
+ if (test_bit(LINK_STATE_XOFF, &dev->flags))
         { /* Do timeouts, just like the 8003 driver. */
                 int txsr;
                 int isr;

Best wishes, and have a good week!

Craig Kulesa
ckulesa@as.arizona.edu
Steward Observatory
=====================================================================

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:14 EST