Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Do I219 TX DMA workaround only when TDLEN(0) != 0
details: https://anonhg.NetBSD.org/src/rev/d012b308d268
branches: trunk
changeset: 345163:d012b308d268
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed May 11 02:23:50 2016 +0000
description:
Do I219 TX DMA workaround only when TDLEN(0) != 0
diffstat:
sys/dev/pci/if_wm.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 4a0d2169cc01 -r d012b308d268 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Wed May 11 02:18:27 2016 +0000
+++ b/sys/dev/pci/if_wm.c Wed May 11 02:23:50 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.394 2016/05/06 10:56:04 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.395 2016/05/11 02:23:50 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.394 2016/05/06 10:56:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.395 2016/05/11 02:23:50 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -5172,7 +5172,11 @@
preg = pci_conf_read(sc->sc_pc, sc->sc_pcitag,
WM_PCI_DESCRING_STATUS);
- if (preg & DESCRING_STATUS_FLUSH_REQ) {
+ reg = CSR_READ(sc, WMREG_TDLEN(0));
+ printf("XXX RST: FLUSH = %lu, len = %u\n",
+ preg & DESCRING_STATUS_FLUSH_REQ, reg);
+ if (((preg & DESCRING_STATUS_FLUSH_REQ) != 0)
+ && (reg != 0)) {
/* TX */
printf("XXX need TX flush (reg = %08x)\n",
preg);
Home |
Main Index |
Thread Index |
Old Index