Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/rtwn/pci/rtwn_pci_rx.c
Show All 29 Lines | |||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/endian.h> | #include <sys/endian.h> | ||||
#include <sys/epoch.h> | |||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
#include <machine/resource.h> | #include <machine/resource.h> | ||||
#include <sys/rman.h> | #include <sys/rman.h> | ||||
#include <net/if.h> | #include <net/if.h> | ||||
#include <net/ethernet.h> | #include <net/ethernet.h> | ||||
#include <net/if_media.h> | #include <net/if_media.h> | ||||
▲ Show 20 Lines • Show All 333 Lines • ▼ Show 20 Lines | rtwn_pci_intr(void *arg) | ||||
RTWN_LOCK(sc); | RTWN_LOCK(sc); | ||||
status = rtwn_pci_get_intr_status(pc, &tx_rings); | status = rtwn_pci_get_intr_status(pc, &tx_rings); | ||||
RTWN_DPRINTF(sc, RTWN_DEBUG_INTR, "%s: status %08X, tx_rings %08X\n", | RTWN_DPRINTF(sc, RTWN_DEBUG_INTR, "%s: status %08X, tx_rings %08X\n", | ||||
__func__, status, tx_rings); | __func__, status, tx_rings); | ||||
if (status == 0 && tx_rings == 0) | if (status == 0 && tx_rings == 0) | ||||
goto unlock; | goto unlock; | ||||
if (status & (RTWN_PCI_INTR_RX | RTWN_PCI_INTR_TX_REPORT)) { | if (status & (RTWN_PCI_INTR_RX | RTWN_PCI_INTR_TX_REPORT)) { | ||||
rtwn_pci_rx_done(sc); | NET_EPOCH_WRAP(rtwn_pci_rx_done, (sc)); | ||||
if (!(sc->sc_flags & RTWN_RUNNING)) | if (!(sc->sc_flags & RTWN_RUNNING)) | ||||
goto unlock; | goto unlock; | ||||
} | } | ||||
if (tx_rings != 0) | if (tx_rings != 0) | ||||
for (i = 0; i < RTWN_PCI_NTXQUEUES; i++) | for (i = 0; i < RTWN_PCI_NTXQUEUES; i++) | ||||
if (tx_rings & (1 << i)) | if (tx_rings & (1 << i)) | ||||
rtwn_pci_tx_done(sc, i); | rtwn_pci_tx_done(sc, i); | ||||
if (sc->sc_flags & RTWN_RUNNING) | if (sc->sc_flags & RTWN_RUNNING) | ||||
rtwn_pci_enable_intr(pc); | rtwn_pci_enable_intr(pc); | ||||
unlock: | unlock: | ||||
RTWN_UNLOCK(sc); | RTWN_UNLOCK(sc); | ||||
} | } |