From 30c6f4bac51a1fabb25d3ccd2f0e80c0148e79d1 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Fri, 3 Oct 2014 15:58:04 +0000 Subject: [PATCH] Fix XHCI driver for devices which have more than 15 physical root HUB ports. The current bitmap array was too small to hold more than 16 bits and would at some point toggle the context size, which then would trigger an enumeration fault and cause a fallback to the EHCI companion controller, if any. MFC after: 3 days --- sys/dev/usb/controller/xhci.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h index 408b429dff0..7352e9c84ea 100644 --- a/sys/dev/usb/controller/xhci.h +++ b/sys/dev/usb/controller/xhci.h @@ -493,7 +493,8 @@ struct xhci_softc { uint8_t sc_noscratch; /* root HUB device configuration */ uint8_t sc_conf; - uint8_t sc_hub_idata[2]; + /* root HUB port event bitmap, max 256 ports */ + uint8_t sc_hub_idata[32]; /* size of context */ uint8_t sc_ctx_is_64_byte;