[vortex] 3c905C: Packet losses (a more precise description)

Andrew Morton andrewm@uow.edu.au
Wed, 05 Jul 2000 23:53:07 +1000


Giuseppe Ciaccio wrote:
> 
> On Wed, 5 Jul 2000, Bogdan Costescu wrote:
> 
> > > Basic registers of MII PHY #0:  0000 0000 0000 0000 0000 0000 0000 0000.
> > >  Basic mode control register 0x0000: Auto-negotiation disabled, with
> > >  Speed fixed at 10 mbps, half-duplex.
> > >  Basic mode status register 0x0000 ... 0000.
> > >    Link status: not established.
> > >  Link partner information information is not exchanged
> > > when in fixed speed mode.

Guiseppe, I don't think you answered Bogdan's question.

Exactly what are you doing to get the NIC into a state
where all the MII registers are showing as zero?  

> ...
> This means that the 3c905C adapters will however use flow ctl when connected
> by a crossover cable.  Since there is no packet loss in this case,
> the faulty device must be the switch.

The 3c905 never generates flow control frames - this is a driver
responsibility and the Linux drivers don't do it.

With the driver you have, an incoming flow control frame will be
either discarded due to a filtered-out MAC address, or dropped
on the floor by the networking code due to unrecognised ethertype.

I guess it's possible that your switch is running out of steam
and trying to slow your machine down.  If so, it's pretty easy
to enable flow control in the 3c905C.

Untested patch:


Index: 3c59x.c
===================================================================
RCS file: /opt/cvs/lk2.2/drivers/net/3c59x.c,v
retrieving revision 1.2.2.9
diff -u -r1.2.2.9 3c59x.c
--- 3c59x.c     2000/06/25 11:09:01     1.2.2.9
+++ 3c59x.c     2000/07/05 13:52:25
@@ -1111,7 +1111,7 @@

        /* Set the full-duplex bit. */
        outb(((vp->info1 & 0x8000) || vp->full_duplex ? 0x20 : 0) |
-                (dev->mtu > 1500 ? 0x40 : 0), ioaddr + Wn3_MAC_Ctrl);
+                (dev->mtu > 1500 ? 0x40 : 0) | 0x100, ioaddr + Wn3_MAC_Ctrl);

        if (vortex_debug > 1) {
                printk(KERN_DEBUG "%s: vortex_open() InternalConfig %8.8x.\n",
@@ -1313,7 +1313,7 @@
                                          /* Set the full-duplex bit. */
                                          EL3WINDOW(3);   /* AKPM */
                                          outb((vp->full_duplex ? 0x20 : 0) |
-                                                  (dev->mtu > 1500 ? 0x40 : 0),
+                                                  (dev->mtu > 1500 ? 0x40 : 0) | 0x100,
                                                   ioaddr + Wn3_MAC_Ctrl);
                                  }
                                  next_tick = 60*HZ;