Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci fix: ethernet controllers which use wiseman_txde...



details:   https://anonhg.NetBSD.org/src/rev/1650c9704efd
branches:  trunk
changeset: 345378:1650c9704efd
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon May 23 04:07:29 2016 +0000

description:
fix: ethernet controllers which use wiseman_txdesc_t (earlier than 82575) hang
possibly.

diffstat:

 sys/dev/pci/if_wm.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 04c150b7388a -r 1650c9704efd sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon May 23 03:30:40 2016 +0000
+++ b/sys/dev/pci/if_wm.c       Mon May 23 04:07:29 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.408 2016/05/23 03:30:40 knakahara Exp $    */
+/*     $NetBSD: if_wm.c,v 1.409 2016/05/23 04:07:29 knakahara Exp $    */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.408 2016/05/23 03:30:40 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.409 2016/05/23 04:07:29 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -6992,7 +6992,10 @@
        if (sc->sc_stopping)
                return 0;
 
-       txq->txq_flags &= ~WM_TXQ_NO_SPACE;
+       if ((sc->sc_flags & WM_F_NEWQUEUE) != 0)
+               txq->txq_flags &= ~WM_TXQ_NO_SPACE;
+       else
+               sc->sc_flags &= ~IFF_OACTIVE;
 
        /*
         * Go through the Tx list and free mbufs for those



Home | Main Index | Thread Index | Old Index