When a kernel has DEVICE_POLLING turned on but no drivers have
the capability do not try to take the mutex at all. Replaces misbegotten attempt from reverted commit 281276 Pointed out by: glebius Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D2262
This commit is contained in:
parent
3f06facc8a
commit
63bf240482
@ -367,6 +367,9 @@ netisr_pollmore()
|
||||
struct timeval t;
|
||||
int kern_load;
|
||||
|
||||
if (poll_handlers == 0)
|
||||
return;
|
||||
|
||||
mtx_lock(&poll_mtx);
|
||||
if (!netisr_pollmore_scheduled) {
|
||||
mtx_unlock(&poll_mtx);
|
||||
@ -424,6 +427,9 @@ netisr_poll(void)
|
||||
int i, cycles;
|
||||
enum poll_cmd arg = POLL_ONLY;
|
||||
|
||||
if (poll_handlers == 0)
|
||||
return;
|
||||
|
||||
mtx_lock(&poll_mtx);
|
||||
if (!netisr_poll_scheduled) {
|
||||
mtx_unlock(&poll_mtx);
|
||||
|
Loading…
Reference in New Issue
Block a user