summaryrefslogtreecommitdiffstats
path: root/sys/dev/ti
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2011-11-04 23:09:57 +0000
committeryongari <yongari@FreeBSD.org>2011-11-04 23:09:57 +0000
commit3d013de1b9acc68f37258b457533eba403cf3361 (patch)
treefefd3d4bd5b4a6d17b4b69ee13d3d93ad2e9d1a3 /sys/dev/ti
parent3826036d91b41c06ce77c3466f50305410856cde (diff)
downloadFreeBSD-src-3d013de1b9acc68f37258b457533eba403cf3361.zip
FreeBSD-src-3d013de1b9acc68f37258b457533eba403cf3361.tar.gz
Because ti(4) drops a driver lock in RX handler, check whether
driver is still running before re-enabling interrupts.
Diffstat (limited to 'sys/dev/ti')
-rw-r--r--sys/dev/ti/if_ti.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index 7483bd9..66401d1 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -2856,12 +2856,12 @@ ti_intr(void *xsc)
ti_handle_events(sc);
- /* Re-enable interrupts. */
- CSR_WRITE_4(sc, TI_MB_HOSTINTR, 0);
-
if (ifp->if_drv_flags & IFF_DRV_RUNNING &&
- ifp->if_snd.ifq_head != NULL)
+ ifp->if_snd.ifq_head != NULL) {
+ /* Re-enable interrupts. */
+ CSR_WRITE_4(sc, TI_MB_HOSTINTR, 0);
ti_start_locked(ifp);
+ }
TI_UNLOCK(sc);
}
OpenPOWER on IntegriCloud