aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAndriy Voskoboinyk <avos@FreeBSD.org>2016-11-06 19:17:39 +0000
committerAndriy Voskoboinyk <avos@FreeBSD.org>2016-11-06 19:17:39 +0000
commit77cbc4795866351d9fbcd59d6f3b69b0b2d9b3d7 (patch)
treeb041c127f365d2e6a1f261b34fa2e804c698e66e /sys/dev
parent0cc02885295b46d05709f54350106a588b92c429 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/rtwn/pci/rtwn_pci_rx.c12
-rw-r--r--sys/dev/rtwn/usb/rtwn_usb_attach.c4
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/rtwn/pci/rtwn_pci_rx.c b/sys/dev/rtwn/pci/rtwn_pci_rx.c
index 4425b4005a1a..df375a197605 100644
--- a/sys/dev/rtwn/pci/rtwn_pci_rx.c
+++ b/sys/dev/rtwn/pci/rtwn_pci_rx.c
@@ -274,13 +274,14 @@ rtwn_pci_intr(void *arg)
status = rtwn_classify_intr(sc, &tx_rings, 0);
RTWN_DPRINTF(sc, RTWN_DEBUG_INTR, "%s: status %08X, tx_rings %08X\n",
__func__, status, tx_rings);
- if (status == 0 && tx_rings == 0) {
- RTWN_UNLOCK(sc);
- return;
- }
+ if (status == 0 && tx_rings == 0)
+ goto unlock;
- if (status & RTWN_PCI_INTR_RX)
+ if (status & RTWN_PCI_INTR_RX) {
rtwn_pci_rx_done(sc);
+ if (!(sc->sc_flags & RTWN_RUNNING))
+ goto unlock;
+ }
if (tx_rings != 0)
for (i = 0; i < RTWN_PCI_NTXQUEUES; i++)
@@ -289,5 +290,6 @@ rtwn_pci_intr(void *arg)
if (sc->sc_flags & RTWN_RUNNING)
rtwn_pci_enable_intr(pc);
+unlock:
RTWN_UNLOCK(sc);
}
diff --git a/sys/dev/rtwn/usb/rtwn_usb_attach.c b/sys/dev/rtwn/usb/rtwn_usb_attach.c
index a47797b56af7..ee0ed22cff2f 100644
--- a/sys/dev/rtwn/usb/rtwn_usb_attach.c
+++ b/sys/dev/rtwn/usb/rtwn_usb_attach.c
@@ -273,8 +273,10 @@ rtwn_usb_abort_xfers(struct rtwn_softc *sc)
RTWN_ASSERT_LOCKED(sc);
/* abort any pending transfers */
+ RTWN_UNLOCK(sc);
for (i = 0; i < RTWN_N_TRANSFER; i++)
- usbd_transfer_stop(uc->uc_xfer[i]);
+ usbd_transfer_drain(uc->uc_xfer[i]);
+ RTWN_LOCK(sc);
}
static int