From bd6e00f32c1396ba37a00fd8a952320e177de158 Mon Sep 17 00:00:00 2001 From: wpaul Date: Thu, 24 Dec 1998 18:03:17 +0000 Subject: 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(). --- sys/pci/if_vr.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sys/pci/if_vr.c') diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index 07890f8..608d43b 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/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 -- cgit v1.1