diff options
author | luigi <luigi@FreeBSD.org> | 2002-02-07 07:47:00 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-02-07 07:47:00 +0000 |
commit | 7f7dd1e45ae1648c0aee2dcf35474465976e85fc (patch) | |
tree | ffcbaac6060a071dec7be4f146715b1e207b5c7a | |
parent | 4e8bb198e75fa9642edff34ce5320228919a2037 (diff) | |
download | FreeBSD-src-7f7dd1e45ae1648c0aee2dcf35474465976e85fc.zip FreeBSD-src-7f7dd1e45ae1648c0aee2dcf35474465976e85fc.tar.gz |
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
-rw-r--r-- | sys/pci/if_sisreg.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/pci/if_sisreg.h b/sys/pci/if_sisreg.h index 3137543..2e4b0e9 100644 --- a/sys/pci/if_sisreg.h +++ b/sys/pci/if_sisreg.h @@ -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 |