diff options
| author | yamaguchi <yamaguchi@NetBSD.org> | 2019-12-20 01:54:39 +0000 |
|---|---|---|
| committer | yamaguchi <yamaguchi@NetBSD.org> | 2019-12-20 01:54:39 +0000 |
| commit | 10e4f6a03afbefec1fbe3fc1a9d88a302a72ddb7 (patch) | |
| tree | 4b333cbd3dbab91350e35356edea9dd3ede6aaa8 /sys/dev | |
| parent | 2cb4bcd7c2060bc22ea882ea849047d5dbd97234 (diff) | |
Do IXL_AQ_OP_SET_VSI_PROMISC in ixl_ifflags_cb() for
applying IFF_PROMISC
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/if_ixl.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/dev/pci/if_ixl.c b/sys/dev/pci/if_ixl.c index 6fdd3784e37..2d6af13df2a 100644 --- a/sys/dev/pci/if_ixl.c +++ b/sys/dev/pci/if_ixl.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ixl.c,v 1.8 2019/12/20 01:49:30 yamaguchi Exp $ */ +/* $NetBSD: if_ixl.c,v 1.9 2019/12/20 01:54:39 yamaguchi Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -3414,6 +3414,8 @@ ixl_atq_poll(struct ixl_softc *sc, struct ixl_aq_desc *iaq, unsigned int tm) unsigned int prod; unsigned int t = 0; + mutex_enter(&sc->sc_atq_lock); + atq = IXL_DMA_KVA(&sc->sc_atq); prod = sc->sc_atq_prod; slot = atq + prod; @@ -3435,8 +3437,10 @@ ixl_atq_poll(struct ixl_softc *sc, struct ixl_aq_desc *iaq, unsigned int tm) while (ixl_rd(sc, sc->sc_aq_regs->atq_head) != prod) { delaymsec(1); - if (t++ > tm) + if (t++ > tm) { + mutex_exit(&sc->sc_atq_lock); return ETIMEDOUT; + } } bus_dmamap_sync(sc->sc_dmat, IXL_DMA_MAP(&sc->sc_atq), @@ -3448,6 +3452,8 @@ ixl_atq_poll(struct ixl_softc *sc, struct ixl_aq_desc *iaq, unsigned int tm) sc->sc_atq_cons = prod; + mutex_exit(&sc->sc_atq_lock); + return 0; } @@ -4820,8 +4826,15 @@ ixl_set_macvlan(struct ixl_softc *sc) static int ixl_ifflags_cb(struct ethercom *ec) { + struct ifnet *ifp = &ec->ec_if; + struct ixl_softc *sc = ifp->if_softc; + int rv; - return 0; + mutex_enter(&sc->sc_cfg_lock); + rv = ixl_iff(sc); + mutex_exit(&sc->sc_cfg_lock); + + return rv; } static int |
