diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2005-08-09 10:20:02 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2005-08-09 10:20:02 +0000 |
| commit | 13f4c340aeeeb104844712bb36899d1adef50579 (patch) | |
| tree | bb70e59641e2310a3c26ec449af5ab0cb7420d9d /sys/kern/kern_poll.c | |
| parent | 292ee7be1c404a624dda68ddff1bd988a1851e5a (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_poll.c')
| -rw-r--r-- | sys/kern/kern_poll.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c index 2fe13246ab34..f1e7e415d813 100644 --- a/sys/kern/kern_poll.c +++ b/sys/kern/kern_poll.c @@ -66,7 +66,7 @@ void ether_poll(int); /* polling while in trap */ * POLL_DEREGISTER: deregister and return to interrupt mode. * * The first two commands are only issued if the interface is marked as - * 'IFF_UP and IFF_RUNNING', the last one only if IFF_RUNNING is set. + * 'IFF_UP and IFF_DRV_RUNNING', the last one only if IFF_DRV_RUNNING is set. * * The count limit specifies how much work the handler can do during the * call -- typically this is the number of packets to be received, or @@ -251,8 +251,9 @@ ether_poll(int count) if (count > poll_each_burst) count = poll_each_burst; for (i = 0 ; i < poll_handlers ; i++) - if (pr[i].handler && (IFF_UP|IFF_RUNNING) == - (pr[i].ifp->if_flags & (IFF_UP|IFF_RUNNING)) ) + if (pr[i].handler && + (pr[i].ifp->if_flags & IFF_UP) && + (pr[i].ifp->if_drv_flags & IFF_DRV_RUNNING)) pr[i].handler(pr[i].ifp, 0, count); /* quick check */ mtx_unlock(&Giant); } @@ -373,13 +374,14 @@ netisr_poll(void) if (polling) { for (i = 0 ; i < poll_handlers ; i++) - if (pr[i].handler && (IFF_UP|IFF_RUNNING) == - (pr[i].ifp->if_flags & (IFF_UP|IFF_RUNNING)) ) + if (pr[i].handler && + (pr[i].ifp->if_flags & IFF_UP) && + (pr[i].ifp->if_drv_flags & IFF_DRV_RUNNING)) pr[i].handler(pr[i].ifp, arg, cycles); } else { /* unregister */ for (i = 0 ; i < poll_handlers ; i++) { if (pr[i].handler && - pr[i].ifp->if_flags & IFF_RUNNING) { + pr[i].ifp->if_drv_flags & IFF_DRV_RUNNING) { pr[i].ifp->if_flags &= ~IFF_POLLING; pr[i].handler(pr[i].ifp, POLL_DEREGISTER, 1); } |
