summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2006-12-29 03:56:29 +0000
committeryongari <yongari@FreeBSD.org>2006-12-29 03:56:29 +0000
commitdd8327815dc821c8fa35ea17b8024bf15de73dcd (patch)
treed25c66f545a30ca2daf9d4668e6f24a84f61c62f /sys/dev
parent8a9474122e8956f836ac6863fd4ac5bdb2989159 (diff)
downloadFreeBSD-src-dd8327815dc821c8fa35ea17b8024bf15de73dcd.zip
FreeBSD-src-dd8327815dc821c8fa35ea17b8024bf15de73dcd.tar.gz
Fix interrupt handling on a dual port card. Previously it ignored
the second port interrupt if the first port was in down state. Since I don't have a dual port card it's just guess work. Noticed by: jhb
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/msk/if_msk.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c
index c7fb1f6..14271bf 100644
--- a/sys/dev/msk/if_msk.c
+++ b/sys/dev/msk/if_msk.c
@@ -3529,16 +3529,10 @@ msk_int_task(void *arg, int pending)
sc_if0 = sc->msk_if[MSK_PORT_A];
sc_if1 = sc->msk_if[MSK_PORT_B];
ifp0 = ifp1 = NULL;
- if (sc_if0 != NULL) {
+ if (sc_if0 != NULL)
ifp0 = sc_if0->msk_ifp;
- if ((ifp0->if_drv_flags & IFF_DRV_RUNNING) == 0)
- goto done;
- }
- if (sc_if1 != NULL) {
+ if (sc_if1 != NULL)
ifp1 = sc_if1->msk_ifp;
- if ((ifp1->if_drv_flags & IFF_DRV_RUNNING) == 0)
- goto done;
- }
if ((status & Y2_IS_IRQ_PHY1) != 0 && sc_if0 != NULL)
msk_intr_phy(sc_if0);
@@ -3567,9 +3561,11 @@ msk_int_task(void *arg, int pending)
if ((status & Y2_IS_STAT_BMU) != 0)
CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_CLR_IRQ);
- if (ifp0 != NULL && !IFQ_DRV_IS_EMPTY(&ifp0->if_snd))
+ if (ifp0 != NULL && (ifp0->if_drv_flags & IFF_DRV_RUNNING) != 0 &&
+ !IFQ_DRV_IS_EMPTY(&ifp0->if_snd))
taskqueue_enqueue(taskqueue_fast, &sc_if0->msk_tx_task);
- if (ifp1 != NULL && !IFQ_DRV_IS_EMPTY(&ifp1->if_snd))
+ if (ifp1 != NULL && (ifp1->if_drv_flags & IFF_DRV_RUNNING) != 0 &&
+ !IFQ_DRV_IS_EMPTY(&ifp1->if_snd))
taskqueue_enqueue(taskqueue_fast, &sc_if1->msk_tx_task);
if (domore > 0) {
OpenPOWER on IntegriCloud