*BSD News Article 23171


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!torn!nermal.cs.uoguelph.ca!herman!rmacklem
From: rmacklem@herman.cs.uoguelph.ca (Richard A Macklem)
Newsgroups: comp.unix.bsd
Subject: 4.4BSD DECstation bug/fix
Date: 2 Nov 1993 16:16:33 GMT
Organization: University of Guelph
Lines: 29
Message-ID: <2b6151$9v3@nermal.cs.uoguelph.ca>
NNTP-Posting-Host: herman.cs.uoguelph.ca
X-Newsreader: TIN [version 1.2 PL2]


Here is a bugfix for the Lance chip driver for the DECstation 2100/3100.
(The file pmax/dev/if_le.c) This "diff -c" was for a prerelease kernel
snapshot, so the line numbers may be a little different for 4.4.

The fix is specific to the original DECstations (not the 5000's) and results
in persistent TCP checksum errors when a TCP connection's window size
adjusts such that the start offset is on a byte boundary. The problem is that
"from" is a signed char and sign extended over the high order bits of the
short.
*** if_le.c.bak	Thu Jul 15 13:52:00 1993
--- if_le.c	Sun Oct 17 15:13:32 1993
***************
*** 1075,1081 ****
  		bptr = ((volatile u_short *)lebuf) + boff;
  	if ((unsigned)from & 0x1) {
  		while (len > 1) {
! 			*bptr = (from[1] << 8) | from[0];
  			bptr += 2;
  			from += 2;
  			len -= 2;
--- 1075,1081 ----
  		bptr = ((volatile u_short *)lebuf) + boff;
  	if ((unsigned)from & 0x1) {
  		while (len > 1) {
! 			*bptr = (from[1] << 8) | (from[0] & 0xff);
  			bptr += 2;
  			from += 2;
  			len -= 2;