1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

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
This commit is contained in:
Pyun YongHyeon 2006-12-29 03:56:29 +00:00
parent 298946a985
commit b55031fd1a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165612

View File

@ -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) {