[235] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: Packet-length patch to lance.c in 1.2.5?

daemon@ATHENA.MIT.EDU (Russell Nelson)
Thu Apr 27 01:55:18 1995

Date: Wed, 26 Apr 95 23:54 EST
From: nelson@crynwr.com (Russell Nelson)
To: linux-net@vger.rutgers.edu
In-reply-to: <9504261735.AA18422@rhett.3do.com> (dplatt@3do.com)

   Date: Wed, 26 Apr 95 10:35:06 PDT
   From: dplatt@3do.com (Dave Platt)

   > Maybe the FCS is stripped by code in *your* changes in 1.2.6, but in
   > the 1.2.1 version, it's still there.

   Aha!  A light dawns.  I'll bet you have an original Lance chip (7990 or
   79C90).

No, this is a PC-Net/ISA, 79C960.

   The older Lance chips don't pad packets out to minimum length, or have
   the ability to strip the pad and FCS during reception.  The lance.c driver
   deals with this difference-in-functionality during transmit - it has some
   code to pad out the packets if it sees that an original-era Lance chip
   is being used.

Right, agreed, it does that.

   The driver does not have (and I don't think it ever has had) code to deal
   with this difference during packet reception.  It does set the "strip pad
   and FCS" bit in CSR4 during chip initialization, and this works fine if
   you happen to have a 79c960 PCnet or any of the other more-recent chips.
   This CSR isn't implemented by the 7990/79C90 chips, though, and so FCS
   stripping does not occur.

Mmmmm, maybe that's what's supposed to happen, but it doesn't work
that way.  The FCS gets included.  I don't see where it sets the strip
pad and FCS bit in CSR4, not in 1.2.1.

   Here's what I think I should do:  I'll send Linus a patch against 1.2.6
   which will hybridize our changes.  I'll either add a new flag to the
   chip-type-specific flags (MUST STRIP) or convince myself that it's safe and
   proper to overload one of the existing ones (probably MUST PAD).  The
   skbuff allocator will check this flag, and will perform your four-byte
   size reduction if the MUST STRIP flag is set (which will be true for the
   Lance and C-Lance, and false for the PCnet).

   Seem fair, right, and proper to you?

Only if it works!  :)

-- 
-russ <nelson@crynwr.com>    http://www.crynwr.com/~nelson
Crynwr Software   | Crynwr Software sells packet driver support | ask4 PGP key
11 Grant St.      | +1 315 268 1925 (9201 FAX)  | What is thee doing about it?
Potsdam, NY 13676 | Help Phil Zimmerman!  http://www.netresponse.com/zldf

home help back first fref pref prev next nref lref last post