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 a bug that TX might stall becau...



details:   https://anonhg.NetBSD.org/src/rev/29031da7a2db
branches:  trunk
changeset: 318877:29031da7a2db
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue May 08 11:36:39 2018 +0000
description:
Fix a bug that TX might stall because WM_TXQ_NO_SPACE is not cleared in
if_init() (though I've never seen this problem). Clear txq->txq_flags in
wm_init_tx_queue(). OK'd by knakahara.

diffstat:

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

diffs (26 lines):

diff -r 84f8e35ffd39 -r 29031da7a2db sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Tue May 08 10:41:56 2018 +0000
+++ b/sys/dev/pci/if_wm.c       Tue May 08 11:36:39 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.577 2018/05/08 07:59:56 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.578 2018/05/08 11:36:39 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.577 2018/05/08 07:59:56 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.578 2018/05/08 11:36:39 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -6703,6 +6703,7 @@
        wm_init_tx_regs(sc, wmq, txq);
        wm_init_tx_buffer(sc, txq);
 
+       txq->txq_flags = 0; /* Clear WM_TXQ_NO_SPACE */
        txq->txq_sending = false;
 }
 



Home | Main Index | Thread Index | Old Index