Date: Fri, 1 Feb 2013 16:44:06 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 221678 for review Message-ID: <201302011644.r11Gi69x063523@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@221678?ac=10 Change 221678 by bz@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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302011644.r11Gi69x063523>