Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Move the location of wm_get_hw_control() in wm_i...
details: https://anonhg.NetBSD.org/src/rev/d6a19a54b212
branches: trunk
changeset: 825258:d6a19a54b212
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Jul 06 08:50:52 2017 +0000
description:
Move the location of wm_get_hw_control() in wm_init_locked() again. Doing
it "after" wm_reset() is required for some AMT based machines to linkup
1Gbps. Tested with HP dc7700.
diffstat:
sys/dev/pci/if_wm.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (43 lines):
diff -r 1f14675a8b4f -r d6a19a54b212 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Thu Jul 06 08:27:07 2017 +0000
+++ b/sys/dev/pci/if_wm.c Thu Jul 06 08:50:52 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.517 2017/06/26 04:22:46 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.518 2017/07/06 08:50:52 msaitoh 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.517 2017/06/26 04:22:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.518 2017/07/06 08:50:52 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -5129,10 +5129,6 @@
ifp->if_collisions += CSR_READ(sc, WMREG_COLC);
ifp->if_ierrors += CSR_READ(sc, WMREG_RXERRC);
- /* AMT based hardware can now take control from firmware */
- if ((sc->sc_flags & WM_F_HAS_AMT) != 0)
- wm_get_hw_control(sc);
-
/* PCH_SPT hardware workaround */
if (sc->sc_type == WM_T_PCH_SPT)
wm_flush_desc_rings(sc);
@@ -5140,6 +5136,13 @@
/* Reset the chip to a known state. */
wm_reset(sc);
+ /*
+ * AMT based hardware can now take control from firmware
+ * Do this after reset.
+ */
+ if ((sc->sc_flags & WM_F_HAS_AMT) != 0)
+ wm_get_hw_control(sc);
+
if ((sc->sc_type == WM_T_PCH_SPT) &&
pci_intr_type(sc->sc_pc, sc->sc_intrs[0]) == PCI_INTR_TYPE_INTX)
wm_legacy_irq_quirk_spt(sc);
Home |
Main Index |
Thread Index |
Old Index