Commit Graph

114 Commits

Author SHA1 Message Date
Bill Paul
7437599f41 Fix some memory bugs with regard to jumbo buffers. I made a mistake when
converting from the old external mbuf buffer code to the new (with the
MEXTADD() macro). Also free free list memory correctly in
foo_free_jumbo_mem() routines: grab the head of the list, then
remove it, _then_ free() it.

This fixes the memory corruption problem I've been chasing in the level 1
driver.
2001-06-18 22:04:40 +00:00
Bill Paul
80782fbf93 Mind-o in last commit: s/==/>=/ when checking MTU size. *blush* 2001-06-16 04:02:37 +00:00
Bill Paul
cb2f755c7f Fix the last serious bug I've been chasing:
The DP83820/83821 has an undocumented limitation concerning jumbo frames
and TX checksum offload. In order for TX checksum offload to work, the
outgoing frame must fit entirely within the TX FIFO, which is 8192 bytes
in size. This isn't a problem, until you try to send a 9000-byte frame,
at which point the TX DMA engine goes to sleep. It turns out that if
you want to send a jumbo frame larger than 8170 bytes (8192 - 64), you
have to turn off the TX checksum support.

As a workaround, I changed nge_ioctl() so that if the user selects an
MTU larger than 8152 bytes, we clear the if_hwassist flags. The flags
will be set again once the MTU is reduced to a smaller value.
2001-06-16 03:38:44 +00:00
Bill Paul
c921560563 Turn TCP and UDP hardware RX checksumming back on. jlemon pointed out where
I'd gone wrong before: we have to set csum_data to 0xffff, not 0.
2001-06-15 19:02:55 +00:00
Bill Paul
1bacd83aea Fix TX bug: when using TCP/IP checksum offload on TX, we tell the chip
we want the checksums calculated on a per-packet basis using control bits
in the extsts field of the DMA descriptor structure. For TX, the chip
seems to want these bits set in the field of the first descriptor in
a fragment chain, not the last.
2001-06-15 18:43:19 +00:00
Bill Paul
23d3a203ad - Remember to set the 'extsts enable' bit in the CFG register to enable the
use of the extsts field in DMA descriptors. We need this to tell the chip
  to calculate TCP/IP checksums in hardware on a per-packet basis.

- Fix the unions in DMA descriptor structures. Breakage on alpha led
  me to realize I'd done it wrong the first time.
2001-06-06 22:16:23 +00:00
Bill Paul
765a54f4c9 Disable extra TCP/UCP checksum checking in nge_rxeof() for now. 2001-06-06 19:17:10 +00:00
Bill Paul
2195de46d3 Per jlemon: add code to nge_rxeof() to allow verification of TCP and
UDP checksums too, not just IP. The chip only tells us if the checksum
is ok, it does not give us a copy of the partial checksum for later
processing. We have to deal with this the right way, but we can deal
with it.
2001-05-29 22:14:03 +00:00
Bill Paul
01702579c4 Fix mind-o in nge_rxeof(): I used CSUM_IP_CHECKED twice instead of
CSUM_IP_CHECKED|CSUM_IP_VALID.
2001-05-29 21:44:45 +00:00
Bill Paul
065a7922df Fix instance of (struct ti_softc *) that should have been
(struct nge_softc *), which the compiler never complained about.
I guess it doesn't matter, a pointer is a pointer, but looked weird
to me.
2001-05-15 22:19:50 +00:00
Bill Paul
ddde4ea967 Adjust the descriptor structures a little by making the software parts
be unions with enough padding to make sure they always end up being
a multiple of 8 bytes in size, since the 83820/83821 chips require
descriptors to be aligned on 64-bit boundaries. I happened to get it
right for the 32-bit descriptor/x86 case, but botched everything else.
Things should work properle on 32-bit/64-bit platforms now.

Note that the 64-bit descriptor format isn't being used currently.
2001-05-15 21:42:43 +00:00
Bill Paul
5da751e46c Unbreak release. *sigh* 2001-05-12 19:51:40 +00:00
Bill Paul
e39cd3b251 It's vlan.h, not opt_vlan.h. 2001-05-11 20:55:31 +00:00
Bill Paul
ce4946daa5 Add support for gigabit ethernet cards based on the NatSemi DP83820
and DP83821 gigabit ethernet MAC chips and the NatSemi DP83861 10/100/1000
copper PHY. There are a whole bunch of very low cost cards available with
this chipset selling for $150USD or less. This includes the SMC9462TX,
D-Link DGE-500T, Asante GigaNIX 1000TA and 1000TPC, and a couple cards
from Addtron.

This chip supports TCP/IP checksum offload, VLAN tagging/insertion.
2048-bit multicast filter, jumbograms and has 8K TX and 32K RX FIFOs.
I have not done serious performance testing with this driver. I know
it works, and I want it under CVS control so I can keep tabs on it.
Note that there's no serious mutex stuff in here yet either: I need
to talk more with jhb to figure out the right way to do this. That
said, I don't think there will be any problems.

This driver should also work on the alpha. It's not turned on in
GENERIC.
2001-05-11 19:56:39 +00:00