summaryrefslogtreecommitdiffstats
path: root/sys/dev/vr
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1998-12-24 18:03:17 +0000
committerwpaul <wpaul@FreeBSD.org>1998-12-24 18:03:17 +0000
commitbd6e00f32c1396ba37a00fd8a952320e177de158 (patch)
treee6eb625c2b7ed19bfcd0ab794d69ab123f9da22a /sys/dev/vr
parentfcf431dd9750e7e7c9030c5b2779011df888abd1 (diff)
downloadFreeBSD-src-bd6e00f32c1396ba37a00fd8a952320e177de158.zip
FreeBSD-src-bd6e00f32c1396ba37a00fd8a952320e177de158.tar.gz
The VIA Rhine appears to be yet another chip that always includes the
ethernet CRC in received frames and has no option to turn this behavior off. Trim the CRC off manually in vr_rxeof().
Diffstat (limited to 'sys/dev/vr')
-rw-r--r--sys/dev/vr/if_vr.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index 07890f8..608d43b 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_vr.c,v 1.3 1998/12/07 21:58:47 archie Exp $
+ * $Id: if_vr.c,v 1.4 1998/12/14 06:32:56 dillon Exp $
*/
/*
@@ -97,7 +97,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: if_vr.c,v 1.3 1998/12/07 21:58:47 archie Exp $";
+ "$Id: if_vr.c,v 1.4 1998/12/14 06:32:56 dillon Exp $";
#endif
/*
@@ -1286,6 +1286,15 @@ static void vr_rxeof(sc)
total_len = VR_RXBYTES(cur_rx->vr_ptr->vr_status);
/*
+ * XXX The VIA Rhine chip includes the CRC with every
+ * received frame, and there's no way to turn this
+ * behavior off (at least, I can't find anything in
+ * the manual that explains how to do it) so we have
+ * to trim off the CRC manually.
+ */
+ total_len -= ETHER_CRC_LEN;
+
+ /*
* Try to conjure up a new mbuf cluster. If that
* fails, it means we have an out of memory condition and
* should leave the buffer in place and continue. This will
OpenPOWER on IntegriCloud