Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci In the receive interrupt handler, compute the pa...



details:   https://anonhg.NetBSD.org/src/rev/aa0dc5b77286
branches:  trunk
changeset: 588075:aa0dc5b77286
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Feb 07 06:20:04 2006 +0000

description:
In the receive interrupt handler, compute the packet length before resetting
m to point to the first buffer in the packet.  The bug would cause the
length of jumbo frames to be incorrect.

diffstat:

 sys/dev/pci/if_sip.c |  6 +++---
 sys/dev/pci/if_wm.c  |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 888717fbf3b2 -r aa0dc5b77286 sys/dev/pci/if_sip.c
--- a/sys/dev/pci/if_sip.c      Tue Feb 07 02:29:28 2006 +0000
+++ b/sys/dev/pci/if_sip.c      Tue Feb 07 06:20:04 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sip.c,v 1.103 2005/12/11 12:22:49 christos Exp $    */
+/*     $NetBSD: if_sip.c,v 1.104 2006/02/07 06:20:04 thorpej Exp $     */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.103 2005/12/11 12:22:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.104 2006/02/07 06:20:04 thorpej Exp $");
 
 #include "bpfilter.h"
 #include "rnd.h"
@@ -1899,8 +1899,8 @@
                m->m_len -= ETHER_CRC_LEN;
 
                *sc->sc_rxtailp = NULL;
+               len = m->m_len + sc->sc_rxlen;
                m = sc->sc_rxhead;
-               len = m->m_len + sc->sc_rxlen;
 
                SIP_RXCHAIN_RESET(sc);
 
diff -r 888717fbf3b2 -r aa0dc5b77286 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Tue Feb 07 02:29:28 2006 +0000
+++ b/sys/dev/pci/if_wm.c       Tue Feb 07 06:20:04 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.110 2005/12/24 20:27:42 perry Exp $        */
+/*     $NetBSD: if_wm.c,v 1.111 2006/02/07 06:20:04 thorpej Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.110 2005/12/24 20:27:42 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.111 2006/02/07 06:20:04 thorpej Exp $");
 
 #include "bpfilter.h"
 #include "rnd.h"
@@ -2276,8 +2276,8 @@
                m->m_len -= ETHER_CRC_LEN;
 
                *sc->sc_rxtailp = NULL;
+               len = m->m_len + sc->sc_rxlen;
                m = sc->sc_rxhead;
-               len = m->m_len + sc->sc_rxlen;
 
                WM_RXCHAIN_RESET(sc);
 



Home | Main Index | Thread Index | Old Index