freebsd-dev/sys
wpaul aa21f59f81 Fix bug that can cause transmit corruption. There are actually two 'rings'
in the transmit code: the TX descriptor ring, and a 'shadow' ring of mbuf
pointers, one for each TX descriptor. When transmitting a packet that
consists of several fragments in an mbuf chain, we link each fragment
to a descriptor in the TX ring, but we only save a pointer to the mbuf
chain. This pointer is saved in the shadow ring entry which corresponds
to the first fragment in the packet. Later, ti_txeof() can release the
whole chain with a single m_freem() call. (We need the second ring to
keep track of the virtual addresses of the mbuf chains.)

The problem with this is that the Tigon isn't actually through with the
mbuf chain until it reaches the last fragment (which has the TI_BDFLAG_END
bit set), however the current scheme releases the mbuf chain as soon as
the first fragment is consumed. This is wrong, since the mbufs can then
be yanked out from under the Tigon and modified before the other fragments
can be transmitted.

The fix is to make a one line change to ti_encap() so that it saves the
mbuf chain pointer in the shadow ring entry that corresponds to the last
fragment in TX ring instead of the first. This prevents the mbufs from
being released until the last fragment is transmitted.

Painstakingly diagnosed and fixed by: Robert Picco <picco@mail.wevinc.com>
Brought to my attention by: dg
1999-05-24 14:56:55 +00:00
..
alpha Remove the mfs stuff now that mfs_init() does the MFS_ROOT initialisation. 1999-05-24 00:54:17 +00:00
amd64 - Make setroot() conditional on FFS etc, to avoid a compiler warning 1999-05-24 00:30:49 +00:00
boot Fix a reference to the mysterious Mike Smisth. 1999-05-22 13:18:28 +00:00
cam Rely on the statistics in XPT_GDEV_STATS instead of the versions still 1999-05-23 18:57:29 +00:00
coda Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
compat Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
compile
conf Don't reference non-existant ATAPI option.. 1999-05-23 11:11:31 +00:00
contrib Cosmetic changes to make it compile without errors in gcc -Wall 1999-05-22 04:43:04 +00:00
ddb Removed an especially bogus cast. 1999-05-13 13:01:46 +00:00
dev Fix bug that can cause transmit corruption. There are actually two 'rings' 1999-05-24 14:56:55 +00:00
fs Don't call calcru() on a swapped-out process. calcru() access p_stats, which 1999-05-22 20:10:31 +00:00
geom Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
gnu Fixed printing of a dev_t in a panic message. Fixed the function name 1999-05-13 06:27:51 +00:00
i4b upgrade isdn4bsd from version 0.71 to the just released version 0.81 1999-05-20 10:14:57 +00:00
i386 Fix a [start,end] vs [start,count] botch that corrupted the resource 1999-05-24 03:08:46 +00:00
isa Use the resource apis to manipulate resources. 1999-05-22 15:47:34 +00:00
isofs/cd9660 Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
kern Back out my previous change (phk didn't like it) in favour of setting 1999-05-24 00:37:26 +00:00
libkern Nuke ucmpdi2.c from i386/libkern to serve as a reminder that switch 1999-05-14 17:39:54 +00:00
miscfs Don't call calcru() on a swapped-out process. calcru() access p_stats, which 1999-05-22 20:10:31 +00:00
modules Reenable vinum build. 1999-05-15 06:13:27 +00:00
msdosfs Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
net PR: kern/10570 1999-05-16 17:09:20 +00:00
netatalk Change suser_xxx() to suser() where it applies. 1999-04-27 12:21:16 +00:00
netatm Allow configuration of up to 256 network interfaces per physical interface - 1999-05-10 23:02:29 +00:00
netinet close pr 10889: 1999-05-24 10:01:22 +00:00
netipx Suser() simplification: 1999-04-27 11:18:52 +00:00
netkey #ifdef out unused function key_freetables. 1999-01-12 12:38:31 +00:00
netnatm Examine all occurrences of sprintf(), strcat(), and str[n]cpy() 1998-12-04 22:54:57 +00:00
netns
nfs Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
nfsclient Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
nfsserver Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
ntfs Driver is now ported to NetBSD. 1999-05-12 09:43:09 +00:00
pc98 Added device major 125 for the Advantech PCI-1750 Digital IO card. 1999-05-18 16:18:42 +00:00
pccard Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add: 1999-05-09 17:07:30 +00:00
pci Fix bug that can cause transmit corruption. There are actually two 'rings' 1999-05-24 14:56:55 +00:00
posix4 Well folks, this is it - The second stage of the removal for build support 1999-04-17 08:36:07 +00:00
powerpc Fixed style bugs in previous commit. 1999-05-22 08:36:55 +00:00
rpc
svr4 Ack! I deleted "struct", not "const".. Oh boy... 1999-05-10 12:38:41 +00:00
sys Add some helper functions to make it easier to write a driver for a bus 1999-05-22 14:57:15 +00:00
tools Declare static __inline functions as __inline in their forward 1999-02-28 11:30:00 +00:00
ufs - Back out Luoqi's cdevsw stuff. It panics on my system and is not required. 1999-05-24 00:27:12 +00:00
vm vm_map_insert: 1999-05-18 05:38:48 +00:00
Makefile Use ${.CURDIR} in `exists()' constructs. 1999-04-21 11:09:40 +00:00