From b55031fd1af3a6eea5c822a08eddf6408f1bf494 Mon Sep 17 00:00:00 2001 From: Pyun YongHyeon Date: Fri, 29 Dec 2006 03:56:29 +0000 Subject: [PATCH] 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 --- sys/dev/msk/if_msk.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index c7fb1f684d7..14271bfe68d 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) {