diff options
| author | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-05-06 22:55:53 +0000 |
|---|---|---|
| committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-05-06 22:55:53 +0000 |
| commit | 74517b0724fad85cc153119335ae40c3a2d59bc0 (patch) | |
| tree | 4df3f2b211fd8fef61bea8c7aa6a07abaeae9101 /sys/dev/xl | |
| parent | f321edf95a10722cc60846baf52eca61e93d4645 (diff) | |
Notes
Diffstat (limited to 'sys/dev/xl')
| -rw-r--r-- | sys/dev/xl/if_xl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/xl/if_xl.c b/sys/dev/xl/if_xl.c index 88a7ba884bc42..15438a59cfc1d 100644 --- a/sys/dev/xl/if_xl.c +++ b/sys/dev/xl/if_xl.c @@ -2273,10 +2273,14 @@ xl_intr(void *arg) } #endif - while ((status = CSR_READ_2(sc, XL_STATUS)) & XL_INTRS && - status != 0xFFFF) { + for (;;) { + status = CSR_READ_2(sc, XL_STATUS); + if ((status & XL_INTRS) == 0 || status == 0xFFFF) + break; CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK|(status & XL_INTRS)); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; if (status & XL_STAT_UP_COMPLETE) { int curpkts; @@ -2304,6 +2308,7 @@ xl_intr(void *arg) if (status & XL_STAT_ADFAIL) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; xl_init_locked(sc); + break; } if (status & XL_STAT_STATSOFLOW) { @@ -2313,7 +2318,8 @@ xl_intr(void *arg) } } - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) && + ifp->if_drv_flags & IFF_DRV_RUNNING) { if (sc->xl_type == XL_TYPE_905B) xl_start_90xB_locked(ifp); else |
