1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

Fix a bug in the driver -- the chip will always include the CRC

in the received packet size, but the upper level routines want
the length without it.

Reported-by: Doug Ambrisko, ambrisko@freebsd.org
This commit is contained in:
Luigi Rizzo 2002-02-07 07:47:00 +00:00
parent fd173deae3
commit 254d9d5f73
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90339

View File

@ -307,10 +307,11 @@ struct sis_desc {
#define SIS_CMDSTS_MORE 0x40000000
#define SIS_CMDSTS_OWN 0x80000000
#define SIS_CRC_SIZE 0x4
#define SIS_LASTDESC(x) (!((x)->sis_ctl & SIS_CMDSTS_MORE)))
#define SIS_OWNDESC(x) ((x)->sis_ctl & SIS_CMDSTS_OWN)
#define SIS_INC(x, y) { if (++(x) == y) x = 0; }
#define SIS_RXBYTES(x) ((x)->sis_ctl & SIS_CMDSTS_BUFLEN)
#define SIS_RXBYTES(x) (((x)->sis_ctl & SIS_CMDSTS_BUFLEN) - SIS_CRC_SIZE)
#define SIS_RXSTAT_COLL 0x00010000
#define SIS_RXSTAT_LOOPBK 0x00020000