PERFORCE change 221678 for review
Bjoern A. Zeeb
bz at FreeBSD.org
Fri Feb 1 16:44:08 UTC 2013
http://p4web.freebsd.org/@@221678?ac=10
Change 221678 by bz at bz_zenith on 2013/02/01 16:43:54
Do not allow users to disable polling if we cannot do interrupts.
Affected files ...
.. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#6 edit
Differences ...
==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#6 (text+ko) ====
@@ -1053,11 +1053,20 @@
ATSE_TX_INTR_DISABLE(sc);
ATSE_RX_EVENT_CLEAR(sc);
ATSE_TX_EVENT_CLEAR(sc);
- } else {
+
+ /*
+ * Do not allow disabling of polling if we do
+ * not have interrupts.
+ */
+ } else if (sc->atse_rx_irq_res != NULL ||
+ sc->atse_tx_irq_res != NULL) {
error = ether_poll_deregister(ifp);
/* Enable interrupts. */
ATSE_RX_INTR_ENABLE(sc);
ATSE_TX_INTR_ENABLE(sc);
+ } else {
+ ifp->if_capenable ^= IFCAP_POLLING;
+ error = EINVAL;
}
}
#endif /* DEVICE_POLLING */
More information about the p4-projects
mailing list