Skip to content

Commit

Permalink
Fix interrupt handling for PCI devices.
Browse files Browse the repository at this point in the history
There was an additional 'tx complete' status bit; after some
time it was 'optimized' away - as a result, interrupts may be
disabled when only 'tx complete' events were sent.
  • Loading branch information
s3erios committed Sep 23, 2016
1 parent 5e4a3bf commit f78d51b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sys/dev/rtwn/pci/rtwn_pci_rx.c
Expand Up @@ -254,7 +254,7 @@ 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) {
if (status == 0 && tx_rings == 0) {
RTWN_UNLOCK(sc);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/rtwn/rtl8192c/pci/r92ce_rx.c
Expand Up @@ -63,6 +63,7 @@ r92ce_classify_intr(struct rtwn_softc *sc, void *arg, int len __unused)
int *rings = arg;
int ret;

*rings = 0;
status = rtwn_read_4(sc, R92C_HISR);
if (status == 0 || status == 0xffffffff)
return (0);
Expand All @@ -73,7 +74,6 @@ r92ce_classify_intr(struct rtwn_softc *sc, void *arg, int len __unused)
/* Ack interrupts. */
rtwn_write_4(sc, R92C_HISR, status);

*rings = 0;
if (status & R92C_IMR_BDOK)
*rings |= (1 << RTWN_PCI_BEACON_QUEUE);
if (status & R92C_IMR_HIGHDOK)
Expand Down

0 comments on commit f78d51b

Please sign in to comment.