summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-10-14 22:59:39 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-10-14 22:59:39 +0000
commitc9da81e79ba6b68e19e92ca690acda27a1a62878 (patch)
tree8353312d845f1a32dac201b1c23d9f4cd56bc280 /sys/dev
parent8cd78e836827d39f03c45db3ca3e4498ad3158ad (diff)
no functional change here, just moving the stripping of the
FCS into the SIS_RXBYTES() macro. As done in the FreeBSD sis driver.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_sis.c9
-rw-r--r--sys/dev/pci/if_sisreg.h4
2 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index 8aff9fc5c93..622a0ae3032 100644
--- a/sys/dev/pci/if_sis.c
+++ b/sys/dev/pci/if_sis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sis.c,v 1.53 2005/10/13 01:44:33 brad Exp $ */
+/* $OpenBSD: if_sis.c,v 1.54 2005/10/14 22:59:38 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1358,12 +1358,7 @@ void sis_rxeof(sc)
continue;
}
- /*
- * No errors; receive the packet. Note, the chip
- * includes the CRC with every packet.
- */
- total_len -= ETHER_CRC_LEN;
-
+ /* No errors; receive the packet. */
bus_dmamap_sync(sc->sc_dmat, cur_rx->map, 0,
cur_rx->map->dm_mapsize, BUS_DMASYNC_POSTREAD);
#ifndef __STRICT_ALIGNMENT
diff --git a/sys/dev/pci/if_sisreg.h b/sys/dev/pci/if_sisreg.h
index 46e17202835..b1edef8661d 100644
--- a/sys/dev/pci/if_sisreg.h
+++ b/sys/dev/pci/if_sisreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sisreg.h,v 1.21 2005/05/22 05:40:52 brad Exp $ */
+/* $OpenBSD: if_sisreg.h,v 1.22 2005/10/14 22:59:38 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@@ -331,7 +331,7 @@ struct sis_desc {
#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) - ETHER_CRC_LEN)
#define SIS_RXSTAT_COLL 0x00010000
#define SIS_RXSTAT_LOOPBK 0x00020000