[232] in linux-net channel archive
Re: Packet-length patch to lance.c in 1.2.5?
daemon@ATHENA.MIT.EDU (Dave Platt)
Wed Apr 26 20:03:16 1995
Date: Wed, 26 Apr 95 10:35:06 PDT
From: dplatt@3do.com (Dave Platt)
To: nelson@crynwr.com
Cc: linux-net@vger.rutgers.edu
> 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).
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.
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.
Your patch performs FCS stripping in software, in a way which is correct for
the 7990 and 79C90, but "over-strips" packets received by the more recent
chip variants, since these have already been stripped by the chip.
> Sounds to me like a case of conflicting patches. My intent was that
> the FCS not be delivered, and if your patches fix that, great!
Well, I think we're both right in our own ways.
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 properto you?