diff options
author | hselasky <hselasky@FreeBSD.org> | 2013-06-07 14:30:06 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2013-06-07 14:30:06 +0000 |
commit | 5311e12c931df9b67b64913670eab76a994317b9 (patch) | |
tree | 7cba40c7ec3c9d934361533ee2151d153ac29c29 /sys/dev/usb/controller/xhci.c | |
parent | fea20f0dd054233130832a9b7c2a0af27d63dc29 (diff) | |
download | FreeBSD-src-5311e12c931df9b67b64913670eab76a994317b9.zip FreeBSD-src-5311e12c931df9b67b64913670eab76a994317b9.tar.gz |
Add support for polling the XHCI interrupt handler when
the regular interrupt handler is not working properly or
in case of MSI interrupts which are not yet supported.
Remove interrupt setup code for FreeBSD versions older
than 700031.
MFC after: 1 week
PR: usb/179342
Diffstat (limited to 'sys/dev/usb/controller/xhci.c')
-rw-r--r-- | sys/dev/usb/controller/xhci.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index fd0e254..18ebaa5 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -90,6 +90,7 @@ #ifdef USB_DEBUG static int xhcidebug; static int xhciroute; +static int xhcipolling; static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, @@ -98,6 +99,9 @@ TUNABLE_INT("hw.usb.xhci.debug", &xhcidebug); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW | CTLFLAG_TUN, &xhciroute, 0, "Routing bitmap for switching EHCI ports to XHCI controller"); TUNABLE_INT("hw.usb.xhci.xhci_port_route", &xhciroute); +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, use_polling, CTLFLAG_RW | CTLFLAG_TUN, + &xhcipolling, 0, "Set to enable software interrupt polling for XHCI controller"); +TUNABLE_INT("hw.usb.xhci.use_polling", &xhcipolling); #endif #define XHCI_INTR_ENDPT 1 @@ -194,6 +198,16 @@ xhci_get_port_route(void) #endif } +uint8_t +xhci_use_polling(void) +{ +#ifdef USB_DEBUG + return (xhcipolling != 0); +#else + return (0); +#endif +} + static void xhci_iterate_hw_softc(struct usb_bus *bus, usb_bus_mem_sub_cb_t *cb) { |