Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci No functional change:
details: https://anonhg.NetBSD.org/src/rev/8d705cc04bc6
branches: trunk
changeset: 934401:8d705cc04bc6
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Jun 11 09:23:13 2020 +0000
description:
No functional change:
- Rename some macros and function.
- Add newline.
diffstat:
sys/dev/pci/if_wm.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diffs (107 lines):
diff -r bc20726b6468 -r 8d705cc04bc6 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Thu Jun 11 09:17:10 2020 +0000
+++ b/sys/dev/pci/if_wm.c Thu Jun 11 09:23:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.677 2020/06/11 02:39:30 thorpej Exp $ */
+/* $NetBSD: if_wm.c,v 1.678 2020/06/11 09:23:13 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.677 2020/06/11 02:39:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.678 2020/06/11 09:23:13 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -165,10 +165,12 @@
#ifdef NET_MPSAFE
#define WM_MPSAFE 1
-#define CALLOUT_FLAGS CALLOUT_MPSAFE
+#define WM_CALLOUT_FLAGS CALLOUT_MPSAFE
+#define WM_SOFTINT_FLAGS SOFTINT_MPSAFE
#define WM_WORKQUEUE_FLAGS WQ_PERCPU | WQ_MPSAFE
#else
-#define CALLOUT_FLAGS 0
+#define WM_CALLOUT_FLAGS 0
+#define WM_SOFTINT_FLAGS 0
#define WM_WORKQUEUE_FLAGS WQ_PERCPU
#endif
@@ -758,7 +760,7 @@
static void wm_adjust_qnum(struct wm_softc *, int);
static inline bool wm_is_using_msix(struct wm_softc *);
static inline bool wm_is_using_multiqueue(struct wm_softc *);
-static int wm_softint_establish(struct wm_softc *, int, int);
+static int wm_softint_establish_queue(struct wm_softc *, int, int);
static int wm_setup_legacy(struct wm_softc *);
static int wm_setup_msix(struct wm_softc *);
static int wm_init(struct ifnet *);
@@ -1839,7 +1841,7 @@
uint32_t reg;
sc->sc_dev = self;
- callout_init(&sc->sc_tick_ch, CALLOUT_FLAGS);
+ callout_init(&sc->sc_tick_ch, WM_CALLOUT_FLAGS);
callout_setfunc(&sc->sc_tick_ch, wm_tick, sc);
sc->sc_core_stopping = false;
@@ -2104,7 +2106,7 @@
aprint_verbose_dev(sc->sc_dev,
"Communication Streaming Architecture\n");
if (sc->sc_type == WM_T_82547) {
- callout_init(&sc->sc_txfifo_ch, CALLOUT_FLAGS);
+ callout_init(&sc->sc_txfifo_ch, WM_CALLOUT_FLAGS);
callout_setfunc(&sc->sc_txfifo_ch,
wm_82547_txfifo_stall, sc);
aprint_verbose_dev(sc->sc_dev,
@@ -5445,17 +5447,14 @@
}
static int
-wm_softint_establish(struct wm_softc *sc, int qidx, int intr_idx)
+wm_softint_establish_queue(struct wm_softc *sc, int qidx, int intr_idx)
{
struct wm_queue *wmq = &sc->sc_queue[qidx];
wmq->wmq_id = qidx;
wmq->wmq_intr_idx = intr_idx;
- wmq->wmq_si = softint_establish(SOFTINT_NET
-#ifdef WM_MPSAFE
- | SOFTINT_MPSAFE
-#endif
- , wm_handle_queue, wmq);
+ wmq->wmq_si = softint_establish(SOFTINT_NET | WM_SOFTINT_FLAGS,
+ wm_handle_queue, wmq);
if (wmq->wmq_si != NULL)
return 0;
@@ -5500,7 +5499,7 @@
aprint_normal_dev(sc->sc_dev, "interrupting at %s\n", intrstr);
sc->sc_nintrs = 1;
- return wm_softint_establish(sc, 0, 0);
+ return wm_softint_establish_queue(sc, 0, 0);
}
static int
@@ -5578,7 +5577,7 @@
"for TX and RX interrupting at %s\n", intrstr);
}
sc->sc_ihs[intr_idx] = vih;
- if (wm_softint_establish(sc, qidx, intr_idx) != 0)
+ if (wm_softint_establish_queue(sc, qidx, intr_idx) != 0)
goto fail;
txrx_established++;
intr_idx++;
@@ -5900,6 +5899,7 @@
reg &= ~GCR_NO_SNOOP_ALL;
CSR_WRITE(sc, WMREG_GCR, reg);
}
+
if ((sc->sc_type >= WM_T_ICH8)
|| (sc->sc_pcidevid == PCI_PRODUCT_INTEL_82546GB_QUAD_COPPER)
|| (sc->sc_pcidevid == PCI_PRODUCT_INTEL_82546GB_QUAD_COPPER_KSP3)) {
Home |
Main Index |
Thread Index |
Old Index