diff options
author | Pyun YongHyeon <yongari@FreeBSD.org> | 2007-09-14 05:12:25 +0000 |
---|---|---|
committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2007-09-14 05:12:25 +0000 |
commit | 0142a9b1713e1d6eca19eb4ac8cd45110648523a (patch) | |
tree | 8e92e3e2fe7d416b0abf16c76c8d83281cec9de8 /sys/dev/nfe | |
parent | 4e41e905d8a8311fa9a5968de33869a0c7865705 (diff) | |
download | src-0142a9b1713e1d6eca19eb4ac8cd45110648523a.tar.gz src-0142a9b1713e1d6eca19eb4ac8cd45110648523a.zip |
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)
Notes
Notes:
svn path=/head/; revision=172169
Diffstat (limited to 'sys/dev/nfe')
-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 050a3ffa79a5..edac0faa9b9a 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) |