diff options
author | yongari <yongari@FreeBSD.org> | 2007-09-14 05:12:25 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2007-09-14 05:12:25 +0000 |
commit | a85a6db808e20a3b75eca8c647965c50218a1aca (patch) | |
tree | 8e92e3e2fe7d416b0abf16c76c8d83281cec9de8 | |
parent | 8f456a5e2079bea2435edb3f040f3a28bd692252 (diff) | |
download | FreeBSD-src-a85a6db808e20a3b75eca8c647965c50218a1aca.zip FreeBSD-src-a85a6db808e20a3b75eca8c647965c50218a1aca.tar.gz |
During boot(before setting IP address) PHY can generate link state
change interrupt if the link is established with link parter. However
interrupt handler didn't acknowledge the interrupt if nfe(4) was not
running at the time of interrupt delivery. This caused endless
interrupt generation. Fix the bug by acknowledging the interrupt
regardless of running state of the driver.
PR: kern/116295
Submitted by: Mark Derbyshire (mark At taom dot com)
Approved by: re (kensmith)
-rw-r--r-- | sys/dev/nfe/if_nfe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c index 050a3ff..edac0fa 100644 --- a/sys/dev/nfe/if_nfe.c +++ b/sys/dev/nfe/if_nfe.c @@ -1930,18 +1930,18 @@ nfe_int_task(void *arg, int pending) } #endif - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - NFE_UNLOCK(sc); - nfe_enable_intr(sc); - return; - } - if (r & NFE_IRQ_LINK) { NFE_READ(sc, NFE_PHY_STATUS); NFE_WRITE(sc, NFE_PHY_STATUS, 0xf); DPRINTF(sc, "link state changed\n"); } + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + NFE_UNLOCK(sc); + nfe_enable_intr(sc); + return; + } + domore = 0; /* check Rx ring */ if (sc->nfe_framesize > MCLBYTES - ETHER_HDR_LEN) |