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:
George V. Neville-Neil 2015-04-14 14:22:34 +00:00
parent 3f06facc8a
commit 63bf240482

View File

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