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)
This commit is contained in:
Pyun YongHyeon 2007-09-14 05:12:25 +00:00
parent 4e41e905d8
commit 0142a9b171
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172169

View File

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