]> xenbits.xensource.com Git - seabios.git/commitdiff
xhci: Don't use a dummy endpoint count in configure command.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 29 Dec 2013 23:17:57 +0000 (18:17 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 29 Jan 2014 17:57:01 +0000 (12:57 -0500)
At least some real-world controllers expect the endpoint count in the
inctx to be accurate, so set it to the pipe currently being activated.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/hw/usb-xhci.c

index 9a1954c885bb8128e59e6e1b39a3632a17022633..6f5604eb74fae1e6dc91842f5e03d949dcffce09 100644 (file)
@@ -922,7 +922,7 @@ xhci_alloc_pipe(struct usbdevice_s *usbdev
             goto fail;
         in->add |= (1 << pipe->epid);
         struct xhci_slotctx *slot = (void*)&in[1 << xhci->context64];
-        slot->ctx[0] |= (31 << 27); // context entries
+        slot->ctx[0] = (slot->ctx[0] & ~0xf8000000) | (pipe->epid << 27);
 
         struct xhci_epctx *ep = (void*)&in[(pipe->epid+1) << xhci->context64];
         if (eptype == USB_ENDPOINT_XFER_INT)