[vortex] 3c905C: Packet losses (a more precise description)
Andrew Morton
andrewm@uow.edu.au
Thu, 06 Jul 2000 12:37:14 +1000
Donald Becker wrote:
>
> On Thu, 6 Jul 2000, Andrew Morton wrote:
>
> > Andrew Morton wrote:
> > > Untested patch:
> > > /* Set the full-duplex bit. */
> > > outb(((vp->info1 & 0x8000) || vp->full_duplex ? 0x20 : 0) |
> >
> > ^^^^ Make this an outw
> >
> > > - (dev->mtu > 1500 ? 0x40 : 0), ioaddr + Wn3_MAC_Ctrl);
> > > + (dev->mtu > 1500 ? 0x40 : 0) | 0x100, ioaddr + Wn3_MAC_Ctrl);
>
> Errrmm, no, that's not right either.
> You should never force-on flow control unless you are in full duplex mode.
Yup. This was just a "suck it and see" experiment...
> And you really shouldn't enable flow control when you haven't negotiated
> it. Otherwise you might stop transmitting when someone sends network-wide
> flow control packets.
Not sure I understand that. If someone sends a network-wide PAUSE, they
presumably want you to pause??
When I put flow control support into the 2.4 driver I decided to ignore
the partner's capabilities and rely upon the user knowing what he is
doing. So if you give the 'flow_ctrl=1' module option, it's simply
enabled (if full duplex). I guess I should have examined partner
capabilities as well.
But one thing I definitely didn't want to do was to enable flow control
by default, based on partner capabilites. As it can do strange things,
it should be opt-in.
> I recall reading a section that stated the flow control bit would be set
> automatically based on the autonegotiation results. Writing the upper byte
> of Wn3_MAC_Ctrl would override the automatic setting. Thus the driver only
> writes the lower byte. However, I can't find the note stating this.
> Perhaps I just dreamed it.
Dreaming, I think. I guess it's easy to get confused once you've
written drivers for every adapter known to mankind...