Skip to content

Commit ef82ab6

Browse files
pmjphilmd
authored andcommitted
hw/usb/hcd-xhci-pci: Use event ring 0 if mapping unsupported
The XHCI specification, section 4.17.1 specifies that "If the Number of Interrupters (MaxIntrs) field is greater than 1, then Interrupter Mapping shall be supported." and "If Interrupter Mapping is not supported, the Interrupter Target field shall be ignored by the xHC and all Events targeted at Interrupter 0." QEMU's XHCI device has so far not specially addressed this case, so we add a check to xhci_event() to redirect to event ring and interrupt 0 if mapping is disabled. Signed-off-by: Phil Dennis-Jordan <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent bb5b7fc commit ef82ab6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hw/usb/hcd-xhci.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,10 @@ static void xhci_event(XHCIState *xhci, XHCIEvent *event, int v)
644644
dma_addr_t erdp;
645645
unsigned int dp_idx;
646646

647+
if (xhci->numintrs == 1) {
648+
v = 0;
649+
}
650+
647651
if (v >= xhci->numintrs) {
648652
DPRINTF("intr nr out of range (%d >= %d)\n", v, xhci->numintrs);
649653
return;

0 commit comments

Comments
 (0)