Hi,
XHCI init on dev 00:10.1: regs @ 0xf014a000, 4 ports, 32 slots
What hardware is this?
|bf0fe000| xhci_control: enable slot: got slotid 1
Enable slot worked. Good. Was a problem before, but possibly on other hardware (other reporter).
|bf0fe000| xhci_cmd_address_device: slotid 1 |bf0fe000| xhci_trb_queue: ring 0xbf11ed00 [nidx 2, len 0] init megasas |bf0fe000| xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed10, evt 0xbf11ee00, type 33, eidx 2, cc 1]
Address device works too.
|bf0fe000| xhci_update_pipe: usbdev 0xbf102170, ring 0xbf11e500, slotid 1, epid 1 |bf0fe000| config_usb: 0xbf11e620 |bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 1, len 8] |bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 2, len 8] |bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 3, len 0] |bf0fe000| xhci_xfer_kick: ring 0xbf11e500, slotid 1, epid 1
|bf0fe000| WARNING - Timeout at xhci_event_wait:404! |bf0fe000| xhci_control: control xfer failed (cc -1)
First control transfer times out. Hmm.
cheers, Gerd
2013/12/9 Gerd Hoffmann kraxel@redhat.com:
Hi,
XHCI init on dev 00:10.1: regs @ 0xf014a000, 4 ports, 32 slots
What hardware is this?
----- [ seabios log starts here ] ----- Found coreboot cbmem console @ bf11f400 Found mainboard ASUS F2A85-M
|bf0fe000| xhci_control: enable slot: got slotid 1
Enable slot worked. Good. Was a problem before, but possibly on other hardware (other reporter).
|bf0fe000| xhci_cmd_address_device: slotid 1 |bf0fe000| xhci_trb_queue: ring 0xbf11ed00 [nidx 2, len 0] init megasas |bf0fe000| xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed10, evt 0xbf11ee00, type 33, eidx 2, cc 1]
Address device works too.
|bf0fe000| xhci_update_pipe: usbdev 0xbf102170, ring 0xbf11e500, slotid 1, epid 1 |bf0fe000| config_usb: 0xbf11e620 |bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 1, len 8] |bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 2, len 8] |bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 3, len 0] |bf0fe000| xhci_xfer_kick: ring 0xbf11e500, slotid 1, epid 1
|bf0fe000| WARNING - Timeout at xhci_event_wait:404! |bf0fe000| xhci_control: control xfer failed (cc -1)
First control transfer times out. Hmm.
cheers, Gerd
On Mon, Dec 09, 2013 at 08:59:23AM +0100, Gerd Hoffmann wrote:
Hi,
XHCI init on dev 00:10.1: regs @ 0xf014a000, 4 ports, 32 slots
What hardware is this?
|bf0fe000| xhci_control: enable slot: got slotid 1
Enable slot worked. Good. Was a problem before, but possibly on other hardware (other reporter).
|bf0fe000| xhci_cmd_address_device: slotid 1 |bf0fe000| xhci_trb_queue: ring 0xbf11ed00 [nidx 2, len 0] init megasas |bf0fe000| xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed10, evt 0xbf11ee00, type 33, eidx 2, cc 1]
Address device works too.
|bf0fe000| xhci_update_pipe: usbdev 0xbf102170, ring 0xbf11e500, slotid 1, epid 1 |bf0fe000| config_usb: 0xbf11e620 |bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 1, len 8] |bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 2, len 8] |bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 3, len 0] |bf0fe000| xhci_xfer_kick: ring 0xbf11e500, slotid 1, epid 1
|bf0fe000| WARNING - Timeout at xhci_event_wait:404! |bf0fe000| xhci_control: control xfer failed (cc -1)
First control transfer times out. Hmm.
FYI, I get a failure on my e350m1:
00.987: Start bios (version rel-1.7.3-126-g454d41b-dirty-20131212_221712-morn.localdomain) [...] 00.992: XHCI init on dev 04:00.0: regs @ 0xf0100000, 4 ports, 64 slots 00.992: XHCI extcap 0x1 @ f0101000 00.992: XHCI protocol USB 2.00, 2 ports (offset 1) 00.992: XHCI protocol USB 3.00, 2 ports (offset 3) [...] 01.093: /c7fba000\ Start thread 01.093: |c7fba000| xhci_hub_detect port #2: 0x000202e1, powered, pls 7, speed 0 [ - ] 01.093: |c7fba000| xhci_hub_reset port #2: 0x000202e1, powered, pls 7, speed 0 [ - ] 01.093: |c7fba000| _free 0xc7fb6000 (detail=0xc7fb8aa0) 01.093: |c7fba000| XHCI port #2: 0x00200a03, powered, enabled, pls 0, speed 2 [Low] 01.093: |c7fba000| set_address 0x000ed9d0 01.093: |c7fba000| _malloc zone=0xc7fcfed3 handle=ffffffff size=316 align=100 ret=0xc7fde700 (detail=0xc7fb8ad0) 01.093: |c7fba000| _malloc zone=0xc7fcfed7 handle=ffffffff size=2100 align=40 ret=0x000ec7c0 (detail=0xc7fb8aa0) 01.093: |c7fba000| xhci_alloc_pipe: usbdev 0xc7fc3670, ring 0xc7fde700, slotid 0, epid 1 01.094: |c7fba000| _free 0xc7fb4000 (detail=0xc7fbffd0) 01.094: |c7fba000| xhci_cmd_enable_slot: 01.094: |c7fba000| xhci_trb_queue: ring 0xc7fde900 [nidx 1, len 0] 01.094: |c7fba000| xhci_process_events: status change port #2 01.094: |c7fba000| xhci_process_events: status change port #2 01.094: |c7fba000| xhci_process_events: ring 0xc7fde900 [trb 0xc7fde900, evt 0xc7fdea00, type 33, eidx 1, cc 1] 01.094: |c7fba000| xhci_control: enable slot: got slotid 1 01.094: |c7fba000| xhci_control: root port 2, route 0x0 01.094: |c7fba000| xhci_cmd_address_device: slotid 1 01.094: |c7fba000| xhci_trb_queue: ring 0xc7fde900 [nidx 2, len 0] 01.094: |c7fba000| xhci_process_events: ring 0xc7fde900 [trb 0xc7fde910, evt 0xc7fdea00, type 33, eidx 2, cc 17] 01.094: |c7fba000| xhci_control: address device: failed (cc 17) 01.094: |c7fba000| xhci_cmd_disable_slot: slotid 1 01.094: |c7fba000| xhci_trb_queue: ring 0xc7fde900 [nidx 3, len 0] 01.094: |c7fba000| xhci_process_events: ring 0xc7fde900 [trb 0xc7fde920, evt 0xc7fdea00, type 33, eidx 3, cc 1] 01.094: |c7fba000| _free 0xc7fc3670 (detail=0xc7fc3690) 01.094: \c7fba000/ End thread
I've also tried a high speed usb flash device and that fails in a similar way. I don't have any usb3 flash drives.
-Kevin
On Thu, Dec 12, 2013 at 11:11:55PM -0500, Kevin O'Connor wrote:
FYI, I get a failure on my e350m1:
I added the following to the code:
--- a/src/hw/usb-xhci.c +++ b/src/hw/usb-xhci.c @@ -1091,6 +1091,7 @@ xhci_setup(struct pci_device *pci, int busid)
u32 hcs1 = readl(&xhci->caps->hcsparams1); u32 hcc = readl(&xhci->caps->hccparams); + dprintf(1, "xhci hcc=%x hcs=%x\n", hcc, hcs1); xhci->ports = (hcs1 >> 24) & 0xff; xhci->slots = hcs1 & 0xff; xhci->xcap = ((hcc >> 16) & 0xffff) << 2;
and I get:
01.342: xhci hcc=40050af hcs=4000440
I think this means that Context Size (CSZ) == 64 bytes and the controller isn't compatible with the seabios driver?
-Kevin
On Fri, Dec 13, 2013 at 01:27:45PM -0500, Kevin O'Connor wrote:
01.342: xhci hcc=40050af hcs=4000440
I think this means that Context Size (CSZ) == 64 bytes and the controller isn't compatible with the seabios driver?
FYI, with the (incredibly ugly) patch below, I get a little further.
01.341: Start bios (version rel-1.7.3-129-gda38e55-dirty-20131213_140637-morn.localdomain) [...] 01.345: xhci hcc=40050af hcs=4000440 01.345: XHCI init on dev 04:00.0: regs @ 0xf0000000, 4 ports, 64 slots 01.345: XHCI extcap 0x1 @ f0001000 01.345: XHCI protocol USB 2.00, 2 ports (offset 1) 01.345: XHCI protocol USB 3.00, 2 ports (offset 3) [...] 01.446: /c7fba000\ Start thread 01.446: |c7fba000| xhci_hub_detect port #2: 0x000202e1, powered, pls 7, speed 0 [ - ] 01.446: |c7fba000| xhci_hub_reset port #2: 0x000202e1, powered, pls 7, speed 0 [ - ] 01.447: |c7fba000| _free 0xc7fb6000 (detail=0xc7fb8a50) 01.447: |c7fba000| XHCI port #2: 0x00200a03, powered, enabled, pls 0, speed 2 [Low] 01.447: |c7fba000| set_address 0x000ed9b0 01.447: |c7fba000| _malloc zone=0xc7fcfedf handle=ffffffff size=316 align=100 ret=0xc7fde700 (detail=0xc7fb8aa0) 01.447: |c7fba000| _malloc zone=0xc7fcfee3 handle=ffffffff size=4180 align=40 ret=0x000ebf80 (detail=0xc7fb8a70) 01.447: |c7fba000| xhci_alloc_pipe: usbdev 0xc7fc3690, ring 0xc7fde700, slotid 0, epid 1 01.447: |c7fba000| _free 0xc7fb4000 (detail=0xc7fbffd0) 01.447: |c7fba000| xhci_cmd_enable_slot: 01.447: |c7fba000| xhci_trb_queue: ring 0xc7fde900 [nidx 1, len 0] 01.447: |c7fba000| xhci_process_events: status change port #2 01.447: |c7fba000| xhci_process_events: status change port #2 01.447: |c7fba000| xhci_process_events: ring 0xc7fde900 [trb 0xc7fde900, evt 0xc7fdea00, type 33, eidx 1, cc 1] 01.447: |c7fba000| xhci_control: enable slot: got slotid 1 01.447: |c7fba000| xhci_control: root port 2, route 0x0 01.447: |c7fba000| xhci_cmd_address_device: slotid 1 01.447: |c7fba000| xhci_trb_queue: ring 0xc7fde900 [nidx 2, len 0] 01.447: |c7fba000| xhci_process_events: ring 0xc7fde900 [trb 0xc7fde910, evt 0xc7fdea00, type 33, eidx 2, cc 1] 01.448: |c7fba000| xhci_update_pipe: usbdev 0xc7fc3690, ring 0xc7fde700, slotid 1, epid 1 01.448: |c7fba000| config_usb: 0xc7fde820 01.448: |c7fba000| xhci_trb_queue: ring 0xc7fde700 [nidx 1, len 8] 01.448: |c7fba000| xhci_trb_queue: ring 0xc7fde700 [nidx 2, len 8] 01.448: |c7fba000| xhci_trb_queue: ring 0xc7fde700 [nidx 3, len 0] 01.448: |c7fba000| xhci_xfer_kick: ring 0xc7fde700, slotid 1, epid 1 01.448: |c7fba000| xhci_process_events: ring 0xc7fde700 [trb 0xc7fde720, evt 0xc7fde800, type 32, eidx 3, cc 6] 01.448: |c7fba000| xhci_control: control xfer failed (cc 6) 01.448: |c7fba000| xhci_cmd_disable_slot: slotid 1 01.448: |c7fba000| xhci_trb_queue: ring 0xc7fde900 [nidx 3, len 0] 01.448: |c7fba000| xhci_process_events: ring 0xc7fde900 [trb 0xc7fde920, evt 0xc7fdea00, type 33, eidx 3, cc 1] 01.448: |c7fba000| _free 0xc7fc3690 (detail=0xc7fc36b0) 01.448: \c7fba000/ End thread
Looks like a device stall report.
-Kevin
diff --git a/src/hw/usb-xhci.h b/src/hw/usb-xhci.h index 64ee82c..6bbe127 100644 --- a/src/hw/usb-xhci.h +++ b/src/hw/usb-xhci.h @@ -89,10 +89,15 @@ struct xhci_ir { // -------------------------------------------------------------- // memory data structs
+#define CONFIG_XHCI_CONTEXT64 1 + // slot context struct xhci_slotctx { u32 ctx[4]; u32 reserved_01[4]; +#if CONFIG_XHCI_CONTEXT64 + u32 reserved_02[8]; +#endif } PACKED;
// endpoint context @@ -102,6 +107,9 @@ struct xhci_epctx { u32 deq_high; u32 length; u32 reserved_01[3]; +#if CONFIG_XHCI_CONTEXT64 + u32 reserved_02[8]; +#endif } PACKED;
// device context @@ -121,6 +129,9 @@ struct xhci_inctx { u32 del; u32 add; u32 reserved_01[6]; +#if CONFIG_XHCI_CONTEXT64 + u32 reserved_02[8]; +#endif struct xhci_slotctx slot; struct xhci_epctx ep[31]; } PACKED;
On Fri, Dec 13, 2013 at 02:25:39PM -0500, Kevin O'Connor wrote:
On Fri, Dec 13, 2013 at 01:27:45PM -0500, Kevin O'Connor wrote:
01.342: xhci hcc=40050af hcs=4000440
I think this means that Context Size (CSZ) == 64 bytes and the controller isn't compatible with the seabios driver?
FYI, with the (incredibly ugly) patch below, I get a little further.
FYI, with the (incredibly ugly) patch from the previous mail and with a USB3 flash drive I seem to get slightly further.
-Kevin
01.350: Start bios (version rel-1.7.3-137-g477a8ef-dirty-20131222_214354-morn.localdomain) 01.355: /c7fa2000\ Start thread 01.355: |c7fa2000| init usb 01.355: |c7fa2000| _malloc zone=0xc7fafed7 size=108 align=10 ret=0x000eda50 (detail=0xc7fa3a60) 01.355: |c7fa2000| XHCI init on dev 04:00.0: regs @ 0xf0000000, 4 ports, 64 slots 01.355: |c7fa2000| XHCI extcap 0x1 @ f0001000 01.355: |c7fa2000| XHCI protocol USB 2.00, 2 ports (offset 1) 01.355: |c7fa2000| XHCI protocol USB 3.00, 2 ports (offset 3) 01.355: |c7fa2000| _malloc zone=0xc7fafec7 size=4096 align=1000 ret=0xc7fa1000 (detail=0xc7fa3a30) 01.455: |c7fa2000| _malloc zone=0xc7fafec7 size=32 align=10 ret=0xc7fa3890 (detail=0xc7fa38b0) 01.455: |c7fa2000| EHCI init on dev 00:12.2 (regs=0xf014b420) 01.455: |c7fa2000| _malloc zone=0xc7fafec7 size=4096 align=1000 ret=0xc7f9f000 (detail=0xc7fa3860) 01.456: |c7fa2000| _malloc zone=0xc7fafec7 size=32 align=10 ret=0xc7fa3450 (detail=0xc7fa3470) 01.456: |c7fa2000| EHCI init on dev 00:13.2 (regs=0xf014b520) 01.456: |c7fa2000| _malloc zone=0xc7fafec7 size=4096 align=1000 ret=0xc7f9b000 (detail=0xc7fa3420) 01.456: /c7f99000\ Start thread 01.456: |c7f99000| xhci_hub_detect port #4: 0x00021203, powered, enabled, pls 0, speed 4 [Super] 01.456: |c7f99000| XHCI port #4: 0x00021203, powered, enabled, pls 0, speed 4 [Super] 01.456: |c7f99000| set_address 0x000eda50 01.456: |c7f99000| _malloc zone=0xc7fafed3 size=316 align=100 ret=0xc7fbf800 (detail=0xc7fa0ea0) 01.456: |c7f99000| _malloc zone=0xc7fafed7 size=4180 align=40 ret=0x000ec080 (detail=0xc7fa0e70) 01.456: |c7f99000| xhci_alloc_pipe: usbdev 0xc7fa0f00, ring 0xc7fbf800, slotid 0, epid 1 01.456: |c7f99000| xhci_cmd_enable_slot: 01.457: |c7f99000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 1, len 0] 01.457: |c7f99000| xhci_process_events: status change port #4 01.457: |c7f99000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc00, evt 0xc7fbfd00, type 33, eidx 1, cc 1] 01.457: |c7f99000| xhci_control: enable slot: got slotid 1 01.457: |c7f99000| xhci_control: root port 4, route 0x0 01.457: |c7f99000| xhci_cmd_address_device: slotid 1 01.457: |c7f99000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 2, len 0] 01.457: |c7f99000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc10, evt 0xc7fbfd00, type 33, eidx 2, cc 1] 01.457: |c7f99000| xhci_update_pipe: usbdev 0xc7fa0f00, ring 0xc7fbf800, slotid 1, epid 1 01.457: |c7f99000| config_usb: 0xc7fbf920 01.457: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 1, len 8] 01.457: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 2, len 8] 01.457: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 3, len 0] 01.457: |c7f99000| xhci_xfer_kick: ring 0xc7fbf800, slotid 1, epid 1 01.458: |c7f99000| xhci_process_events: ring 0xc7fbf800 [trb 0xc7fbf820, evt 0xc7fbf900, type 32, eidx 3, cc 1] 01.457: |c7f99000| device rev=0300 cls=00 sub=00 proto=00 size=09 01.457: |c7f99000| xhci_update_pipe: usbdev 0xc7fa0f00, ring 0xc7fbf800, slotid 1, epid 1 01.457: |c7f99000| xhci_update_pipe: reconf ctl endpoint pkt size: 8 -> 9 01.458: |c7f99000| xhci_cmd_evaluate_context: slotid 1, add 0x2, del 0x0 01.457: |c7f99000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 3, len 0] 01.458: |c7f99000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc20, evt 0xc7fbfd00, type 33, eidx 3, cc 1] 01.458: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 4, len 8] 01.458: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 5, len 9] 01.458: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 6, len 0] 01.458: |c7f99000| xhci_xfer_kick: ring 0xc7fbf800, slotid 1, epid 1 01.459: |c7f99000| xhci_process_events: ring 0xc7fbf800 [trb 0xc7fbf850, evt 0xc7fbf900, type 32, eidx 6, cc 1] 01.459: |c7f99000| _malloc zone=0xc7fafec7 size=44 align=10 ret=0xc7fa3880 (detail=0xc7fa38b0) 01.459: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 7, len 8] 01.459: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 8, len 44] 01.459: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 9, len 0] 01.459: |c7f99000| xhci_xfer_kick: ring 0xc7fbf800, slotid 1, epid 1 01.460: |c7f99000| xhci_process_events: ring 0xc7fbf800 [trb 0xc7fbf880, evt 0xc7fbf900, type 32, eidx 9, cc 1] 01.460: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 10, len 8] 01.460: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 11, len 0] 01.460: |c7f99000| xhci_xfer_kick: ring 0xc7fbf800, slotid 1, epid 1 01.461: |c7f99000| xhci_process_events: ring 0xc7fbf800 [trb 0xc7fbf8a0, evt 0xc7fbf900, type 32, eidx 11, cc 1] 01.461: |c7f99000| _malloc zone=0xc7fafed7 size=316 align=100 ret=0x000ebf00 (detail=0xc7fa3290) 01.461: |c7f99000| xhci_alloc_pipe: usbdev 0xc7fa0f00, ring 0x000ebf00, slotid 1, epid 3 01.461: |c7f99000| xhci_cmd_configure_endpoint: slotid 1, add 0x9, del 0x0 01.461: |c7f99000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 4, len 0] 01.462: |c7f99000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc30, evt 0xc7fbfd00, type 33, eidx 4, cc 1] 01.461: |c7f99000| _malloc zone=0xc7fafed7 size=316 align=100 ret=0x000ebd00 (detail=0xc7fa3a90) 01.462: |c7f99000| xhci_alloc_pipe: usbdev 0xc7fa0f00, ring 0x000ebd00, slotid 1, epid 4 01.462: |c7f99000| xhci_cmd_configure_endpoint: slotid 1, add 0x11, del 0x0 01.461: |c7f99000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 5, len 0] 01.462: |c7f99000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc40, evt 0xc7fbfd00, type 33, eidx 5, cc 1] 01.462: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 12, len 8] 01.462: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 13, len 1] 01.462: |c7f99000| xhci_trb_queue: ring 0xc7fbf800 [nidx 14, len 0] 01.462: |c7f99000| xhci_xfer_kick: ring 0xc7fbf800, slotid 1, epid 1 01.463: |c7f99000| xhci_process_events: ring 0xc7fbf800 [trb 0xc7fbf8d0, evt 0xc7fbf900, type 32, eidx 14, cc 1] 01.463: |c7f99000| _malloc zone=0xc7fafecf size=48 align=10 ret=0x000f4c30 (detail=0xc7fa35e0) 01.463: |c7f99000| Searching bootorder for: /pci@i0cf8/pci-bridge@15,2/usb@0/storage@4/*@0/*@0,0 01.463: |c7f99000| Searching bootorder for: /pci@i0cf8/pci-bridge@15,2/usb@0/usb-*@4 01.463: |c7f99000| xhci_trb_queue: ring 0x000ebd00 [nidx 1, len 31] 01.463: |c7f99000| xhci_xfer_kick: ring 0x000ebd00, slotid 1, epid 4 01.464: |c7f99000| xhci_process_events: ring 0x000ebd00 [trb 0x000ebd00, evt 0x000ebe00, type 32, eidx 1, cc 1] 01.464: |c7f99000| xhci_trb_queue: ring 0x000ebf00 [nidx 1, len 36] 01.464: |c7f99000| xhci_xfer_kick: ring 0x000ebf00, slotid 1, epid 3 01.465: |c7f99000| xhci_process_events: ring 0x000ebf00 [trb 0x000ebf00, evt 0x000ec000, type 32, eidx 1, cc 1] 01.465: |c7f99000| xhci_trb_queue: ring 0x000ebf00 [nidx 2, len 13] 01.465: |c7f99000| xhci_xfer_kick: ring 0x000ebf00, slotid 1, epid 3 01.465: |c7f99000| xhci_process_events: ring 0x000ebf00 [trb 0x000ebf10, evt 0x000ec000, type 32, eidx 2, cc 1] 01.465: |c7f99000| USB MSC vendor='ADATA' product='USB Flash Drive' rev='1.00' type=0 removable=1 01.465: |c7f99000| scsi_is_ready (drive=0x000f4c30) 01.465: |c7f99000| xhci_trb_queue: ring 0x000ebd00 [nidx 2, len 31] 01.465: |c7f99000| xhci_xfer_kick: ring 0x000ebd00, slotid 1, epid 4 01.466: |c7f99000| xhci_process_events: ring 0x000ebd00 [trb 0x000ebd10, evt 0x000ebe00, type 32, eidx 2, cc 1] 01.466: |c7f99000| xhci_process_events: unknown event, type 37, cc 21 01.466: |c7f99000| xhci_trb_queue: ring 0x000ebf00 [nidx 3, len 13] 01.466: |c7f99000| xhci_xfer_kick: ring 0x000ebf00, slotid 1, epid 3 02.040: |c7f99000| WARNING - Timeout at xhci_event_wait:405! 02.040: |c7f99000| xhci_send_bulk: bulk xfer failed (cc -1) 02.040: |c7f99000| USB transmission failed 02.040: |c7f99000| xhci_trb_queue: ring 0x000ebd00 [nidx 3, len 31] 02.040: |c7f99000| xhci_xfer_kick: ring 0x000ebd00, slotid 1, epid 4 03.040: |c7f99000| WARNING - Timeout at xhci_event_wait:405! 03.040: |c7f99000| xhci_send_bulk: bulk xfer failed (cc -1) 03.040: |c7f99000| USB transmission failed 03.040: |c7f99000| xhci_trb_queue: ring 0x000ebd00 [nidx 4, len 31] 03.040: |c7f99000| xhci_xfer_kick: ring 0x000ebd00, slotid 1, epid 4 04.040: |c7f99000| WARNING - Timeout at xhci_event_wait:405! 04.041: |c7f99000| xhci_send_bulk: bulk xfer failed (cc -1) 04.041: |c7f99000| USB transmission failed 04.041: |c7f99000| xhci_trb_queue: ring 0x000ebd00 [nidx 5, len 31] 04.041: |c7f99000| xhci_xfer_kick: ring 0x000ebd00, slotid 1, epid 4 05.041: |c7f99000| WARNING - Timeout at xhci_event_wait:405! 05.041: |c7f99000| xhci_send_bulk: bulk xfer failed (cc -1) 05.041: |c7f99000| USB transmission failed 05.041: |c7f99000| xhci_trb_queue: ring 0x000ebd00 [nidx 6, len 31] 05.041: |c7f99000| xhci_xfer_kick: ring 0x000ebd00, slotid 1, epid 4 06.041: |c7f99000| WARNING - Timeout at xhci_event_wait:405! 06.041: |c7f99000| xhci_send_bulk: bulk xfer failed (cc -1) 06.041: |c7f99000| USB transmission failed 06.041: |c7f99000| xhci_trb_queue: ring 0x000ebd00 [nidx 7, len 31] 06.041: |c7f99000| xhci_xfer_kick: ring 0x000ebd00, slotid 1, epid 4 07.041: |c7f99000| WARNING - Timeout at xhci_event_wait:405! 07.041: |c7f99000| xhci_send_bulk: bulk xfer failed (cc -1) 07.041: |c7f99000| USB transmission failed 07.041: |c7f99000| test unit ready failed 07.041: |c7f99000| scsi_is_ready returned -1 07.041: |c7f99000| Unable to configure USB MSC drive. 07.041: |c7f99000| _free 0x000f4c30 (detail=0xc7fa35e0) 07.041: |c7f99000| Unable to configure USB MSC device. 07.041: |c7f99000| _free 0xc7fa3880 (detail=0xc7fa38b0) 07.041: |c7f99000| xhci_cmd_disable_slot: slotid 1 07.041: |c7f99000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 6, len 0] 08.041: |c7f99000| WARNING - Timeout at xhci_event_wait:405! 08.041: |c7f99000| _free 0xc7fa0f00 (detail=0xc7fa0f20) 08.042: \c7f99000/ End thread
On Sun, Dec 22, 2013 at 09:54:02PM -0500, Kevin O'Connor wrote:
On Fri, Dec 13, 2013 at 02:25:39PM -0500, Kevin O'Connor wrote:
On Fri, Dec 13, 2013 at 01:27:45PM -0500, Kevin O'Connor wrote:
01.342: xhci hcc=40050af hcs=4000440
I think this means that Context Size (CSZ) == 64 bytes and the controller isn't compatible with the seabios driver?
FYI, with the (incredibly ugly) patch below, I get a little further.
FYI, with the (incredibly ugly) patch from the previous mail and with a USB3 flash drive I seem to get slightly further.
FYI, it seems my USB3 controller really wants to see 64bit writes to pci registers. With the change below (on top of the other changes) I can now boot my e350m1 from a USB3 flash drive.
I'm still seeing failures on my keyboard/mouse though:
01.146: XHCI port #2: 0x00200a03, powered, enabled, pls 0, speed 2 [Low] 01.163: xhci_control: control xfer failed (cc 6)
and on my USB2 flash drive:
01.132: XHCI port #1: 0x00200e03, powered, enabled, pls 0, speed 3 [High] 01.163: xhci_update_pipe: reconf ctl endpoint pkt size: 8 -> 64 01.168: xhci_alloc_pipe: configure endpoint: failed (cc 17) 01.169: xhci_alloc_pipe: configure endpoint: failed (cc 17) 01.169: Unable to configure USB MSC device.
-Kevin
diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c index dc98e5d..d0df6ee 100644 --- a/src/hw/usb-xhci.c +++ b/src/hw/usb-xhci.c @@ -379,6 +379,7 @@ static void xhci_process_events(struct usb_xhci_s *xhci) u32 addr = (u32)(&ir->erdp_low); u32 erdp = (u32)(evts->ring + nidx); pci_writel(addr, erdp); + pci_writel((u32)(&ir->erdp_high), 0); } }
2013/12/24 Kevin O'Connor kevin@koconnor.net:
On Sun, Dec 22, 2013 at 09:54:02PM -0500, Kevin O'Connor wrote:
On Fri, Dec 13, 2013 at 02:25:39PM -0500, Kevin O'Connor wrote:
On Fri, Dec 13, 2013 at 01:27:45PM -0500, Kevin O'Connor wrote:
01.342: xhci hcc=40050af hcs=4000440
I think this means that Context Size (CSZ) == 64 bytes and the controller isn't compatible with the seabios driver?
FYI, with the (incredibly ugly) patch below, I get a little further.
FYI, with the (incredibly ugly) patch from the previous mail and with a USB3 flash drive I seem to get slightly further.
FYI, it seems my USB3 controller really wants to see 64bit writes to pci registers. With the change below (on top of the other changes) I can now boot my e350m1 from a USB3 flash drive.
I'm still seeing failures on my keyboard/mouse though:
01.146: XHCI port #2: 0x00200a03, powered, enabled, pls 0, speed 2 [Low] 01.163: xhci_control: control xfer failed (cc 6)
and on my USB2 flash drive:
01.132: XHCI port #1: 0x00200e03, powered, enabled, pls 0, speed 3 [High] 01.163: xhci_update_pipe: reconf ctl endpoint pkt size: 8 -> 64 01.168: xhci_alloc_pipe: configure endpoint: failed (cc 17) 01.169: xhci_alloc_pipe: configure endpoint: failed (cc 17) 01.169: Unable to configure USB MSC device.
-Kevin
diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c index dc98e5d..d0df6ee 100644 --- a/src/hw/usb-xhci.c +++ b/src/hw/usb-xhci.c @@ -379,6 +379,7 @@ static void xhci_process_events(struct usb_xhci_s *xhci) u32 addr = (u32)(&ir->erdp_low); u32 erdp = (u32)(evts->ring + nidx); pci_writel(addr, erdp);
}pci_writel((u32)(&ir->erdp_high), 0);
}
This is captured on my f2a85-m, with CONFIG_DEBUG_LEVEL=7:
SeaBIOS (version rel-1.7.4-0-g96917a8-dirty-20131224_014301-debian) init usb XHCI init on dev 00:10.0: regs @ 0xf01c8000, 4 ports, 32 slots XHCI extcap 0x1 @ f01c8500 XHCI protocol USB 3.00, 2 ports (offset 1) XHCI protocol USB 2.00, 2 ports (offset 3) configure_xhci: resetting xhci_hub_detect port #1: 0x000002a0, powered, pls 5, speed 0 [ - ] xhci_hub_detect port #2: 0x000002a0, powered, pls 5, speed 0 [ - ] xhci_hub_detect port #3: 0x000002a0, powered, pls 5, speed 0 [ - ] xhci_hub_detect port #4: 0x000002a0, powered, pls 5, speed 0 [ - ] XHCI no devices found XHCI init on dev 00:10.1: regs @ 0xf01ca000, 4 ports, 32 slots XHCI extcap 0x1 @ f01ca500 XHCI protocol USB 3.00, 2 ports (offset 1) XHCI protocol USB 2.00, 2 ports (offset 3) configure_xhci: resetting xhci_hub_detect port #1: 0x000002a0, powered, pls 5, speed 0 [ - ] xhci_hub_detect port #2: 0x000002a0, powered, pls 5, speed 0 [ - ] xhci_hub_detect port #3: 0x000202e1, powered, pls 7, speed 0 [ - ] xhci_hub_reset port #3: 0x000202e1, powered, pls 7, speed 0 [ - ] XHCI port #3: 0x00200a03, powered, enabled, pls 0, speed 2 [Low] set_address 0x000ee020 xhci_alloc_pipe: usbdev 0xbf102590, ring 0xbf11eb00, slotid 0, epid 1 xhci_cmd_enable_slot: xhci_trb_queue: ring 0xbf11ed00 [nidx 1, len 0] xhci_process_events: status change port #3 xhci_process_events: status change port #4 xhci_process_events: status change port #3 xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed00, evt 0xbf11ee00, type 33, eidx 1, cc 1] xhci_control: enable slot: got slotid 1 xhci_control: root port 3, route 0x0 xhci_cmd_address_device: slotid 1 xhci_trb_queue: ring 0xbf11ed00 [nidx 2, len 0] xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed10, evt 0xbf11ee00, type 33, eidx 2, cc 1] xhci_update_pipe: usbdev 0xbf102590, ring 0xbf11eb00, slotid 1, epid 1 config_usb: 0xbf11ec20 xhci_trb_queue: ring 0xbf11eb00 [nidx 1, len 8] xhci_trb_queue: ring 0xbf11eb00 [nidx 2, len 8] xhci_trb_queue: ring 0xbf11eb00 [nidx 3, len 0] xhci_xfer_kick: ring 0xbf11eb00, slotid 1, epid 1 WARNING - Timeout at xhci_event_wait:405! xhci_control: control xfer failed (cc -1) xhci_cmd_disable_slot: slotid 1 xhci_trb_queue: ring 0xbf11ed00 [nidx 3, len 0] xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed20, evt 0xbf11ee00, type 33, eidx 3, cc 1] xhci_hub_detect port #4: 0x000202e1, powered, pls 7, speed 0 [ - ] xhci_hub_reset port #4: 0x000202e1, powered, pls 7, speed 0 [ - ] XHCI port #4: 0x00200e03, powered, enabled, pls 0, speed 3 [High] set_address 0x000ee020 xhci_alloc_pipe: usbdev 0xbf102590, ring 0xbf11e900, slotid 0, epid 1 xhci_cmd_enable_slot: xhci_trb_queue: ring 0xbf11ed00 [nidx 4, len 0] xhci_process_events: status change port #4 xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed30, evt 0xbf11ee00, type 33, eidx 4, cc 1] xhci_control: enable slot: got slotid 1 xhci_control: root port 4, route 0x0 xhci_cmd_address_device: slotid 1 xhci_trb_queue: ring 0xbf11ed00 [nidx 5, len 0] xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed40, evt 0xbf11ee00, type 33, eidx 5, cc 1] xhci_update_pipe: usbdev 0xbf102590, ring 0xbf11e900, slotid 1, epid 1 config_usb: 0xbf11ea20 xhci_trb_queue: ring 0xbf11e900 [nidx 1, len 8] xhci_trb_queue: ring 0xbf11e900 [nidx 2, len 8] xhci_trb_queue: ring 0xbf11e900 [nidx 3, len 0] xhci_xfer_kick: ring 0xbf11e900, slotid 1, epid 1 xhci_process_events: ring 0xbf11e900 [trb 0xbf11e920, evt 0xbf11ea00, type 32, eidx 3, cc 6] xhci_control: control xfer failed (cc 6) xhci_cmd_disable_slot: slotid 1 xhci_trb_queue: ring 0xbf11ed00 [nidx 6, len 0] xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed50, evt 0xbf11ee00, type 33, eidx 6, cc 1] XHCI no devices found
An USB keyboard is attached to port #3 and some Kingston USB flash drive to port #4 - neither are responsive or show up in the boot menu.
Idwer
On Mon, Dec 23, 2013 at 06:55:41PM -0500, Kevin O'Connor wrote:
On Sun, Dec 22, 2013 at 09:54:02PM -0500, Kevin O'Connor wrote:
On Fri, Dec 13, 2013 at 02:25:39PM -0500, Kevin O'Connor wrote:
On Fri, Dec 13, 2013 at 01:27:45PM -0500, Kevin O'Connor wrote:
01.342: xhci hcc=40050af hcs=4000440
I think this means that Context Size (CSZ) == 64 bytes and the controller isn't compatible with the seabios driver?
FYI, with the (incredibly ugly) patch below, I get a little further.
FYI, with the (incredibly ugly) patch from the previous mail and with a USB3 flash drive I seem to get slightly further.
FYI, it seems my USB3 controller really wants to see 64bit writes to pci registers. With the change below (on top of the other changes) I can now boot my e350m1 from a USB3 flash drive.
I'm still seeing failures on my keyboard/mouse though:
01.146: XHCI port #2: 0x00200a03, powered, enabled, pls 0, speed 2 [Low] 01.163: xhci_control: control xfer failed (cc 6)
Looks like the direction field of the status transmission is not correct. I can now get a little further with low speed devices, but it's still failing.
01.134: /c7f9c000\ Start thread 01.134: |c7f9c000| xhci_hub_detect port #2: 0x000202e1, powered, pls 7, speed 0 [ - ] 01.136: |c7f9c000| xhci_hub_reset port #2: 0x000202e1, powered, pls 7, speed 0 [ - ] 01.136: |c7f9c000| XHCI port #2: 0x00200a03, powered, enabled, pls 0, speed 2 [Low] 01.136: |c7f9c000| set_address 0x000eda30 01.136: |c7f9c000| _malloc zone=0xc7fafed3 size=316 align=100 ret=0xc7fbf000 (detail=0xc7fa3460) 01.136: |c7f9c000| _malloc zone=0xc7fafed7 size=4180 align=40 ret=0x000eb000 (detail=0xc7fa3430) 01.136: |c7f9c000| xhci_alloc_pipe: usbdev 0xc7fa3580, ring 0xc7fbf000, slotid 0, epid 1 01.136: |c7f9c000| xhci_cmd_enable_slot: 01.136: |c7f9c000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 4, len 0] 01.136: |c7f9c000| xhci_process_events: ring 0xc7fbf900 [trb 0xc7fbf980, evt 0xc7fbfa00, type 32, eidx 9, cc 1] 01.136: |c7f9c000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc30, evt 0xc7fbfd00, type 33, eidx 4, cc 1] 01.136: |c7f9c000| xhci_control: enable slot: got slotid 2 01.136: |c7f9c000| xhci_control: root port 2, route 0x0 01.136: |c7f9c000| xhci_cmd_address_device: slotid 2 01.136: |c7f9c000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 5, len 0] 01.138: |c7f9c000| xhci_update_pipe: usbdev 0xc7fa3580, ring 0xc7fbf000, slotid 2, epid 1 01.138: |c7f9c000| config_usb: 0xc7fbf120 01.138: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 1, len 8] 01.138: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 2, len 8] 01.138: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 3, len 0] 01.138: |c7f9c000| xhci_xfer_kick: ring 0xc7fbf000, slotid 2, epid 1 01.138: |c7f9c000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc50, evt 0xc7fbfd00, type 33, eidx 6, cc 17] 01.138: |c7f9c000| xhci_process_events: ring 0xc7fbf000 [trb 0xc7fbf020, evt 0xc7fbf100, type 32, eidx 3, cc 1] 01.138: |c7f9c000| device rev=0200 cls=00 sub=00 proto=00 size=08 01.138: |c7f9c000| xhci_update_pipe: usbdev 0xc7fa3580, ring 0xc7fbf000, slotid 2, epid 1 01.138: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 4, len 8] 01.138: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 5, len 9] 01.138: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 6, len 0] 01.138: |c7f9c000| xhci_xfer_kick: ring 0xc7fbf000, slotid 2, epid 1 01.139: |c7f9c000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc70, evt 0xc7fbfd00, type 33, eidx 8, cc 1] 01.139: |c7f9c000| _malloc zone=0xc7fafec7 size=34 align=10 ret=0xc7fa3140 (detail=0xc7fa3350) 01.139: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 7, len 8] 01.139: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 8, len 34] 01.139: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 9, len 0] 01.139: |c7f9c000| xhci_xfer_kick: ring 0xc7fbf000, slotid 2, epid 1 01.140: |c7f9c000| xhci_process_events: ring 0xc7fbf000 [trb 0xc7fbf080, evt 0xc7fbf100, type 32, eidx 9, cc 1] 01.140: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 10, len 8] 01.140: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 11, len 0] 01.140: |c7f9c000| xhci_xfer_kick: ring 0xc7fbf000, slotid 2, epid 1 01.141: |c7f9c000| xhci_process_events: ring 0xc7fbf000 [trb 0xc7fbf0a0, evt 0xc7fbf100, type 32, eidx 11, cc 1] 01.141: |c7f9c000| usb_hid_setup 0xc7fbf120 01.141: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 12, len 8] 01.141: |c7f9c000| xhci_trb_queue: ring 0xc7fbf000 [nidx 13, len 0] 01.141: |c7f9c000| xhci_xfer_kick: ring 0xc7fbf000, slotid 2, epid 1 01.142: |c7f9c000| xhci_process_events: ring 0xc7fbf000 [trb 0xc7fbf0c0, evt 0xc7fbf100, type 32, eidx 13, cc 1] 01.141: |c7f9c000| _malloc zone=0xc7fafed7 size=316 align=100 ret=0x000eae00 (detail=0xc7fa3790) 01.141: |c7f9c000| _malloc zone=0xc7fafed7 size=4 align=10 ret=0x000eda20 (detail=0xc7fa3760) 01.142: |c7f9c000| xhci_alloc_pipe: usbdev 0xc7fa3580, ring 0x000eae00, slotid 2, epid 3 01.141: |c7f9c000| binterval=10 s0=f8200000 s1=00020000 e0=00000000 e1=00040038 01.141: |c7f9c000| xhci_cmd_configure_endpoint: slotid 2, add 0x9, del 0x0 01.141: |c7f9c000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 9, len 0] 01.142: |c7f9c000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc80, evt 0xc7fbfd00, type 33, eidx 9, cc 17] 01.142: |c7f9c000| xhci_alloc_pipe: configure endpoint: failed (cc 17) 01.142: |c7f9c000| _free 0x000eae00 (detail=0xc7fa3790) 01.142: |c7f9c000| _free 0xc7fa3140 (detail=0xc7fa3350) 01.142: |c7f9c000| xhci_cmd_disable_slot: slotid 2 01.142: |c7f9c000| xhci_trb_queue: ring 0xc7fbfc00 [nidx 10, len 0] 01.143: |c7f9c000| xhci_process_events: ring 0xc7fbfc00 [trb 0xc7fbfc90, evt 0xc7fbfd00, type 33, eidx 10, cc 1] 01.143: |c7f9c000| _free 0xc7fa3580 (detail=0xc7fa35a0) 01.143: \c7f9c000/ End thread
-Kevin
--- a/src/hw/usb-xhci.c +++ b/src/hw/usb-xhci.c @@ -379,6 +379,7 @@ static void xhci_process_events(struct usb_xhci_s *xhci) u32 addr = (u32)(&ir->erdp_low); u32 erdp = (u32)(evts->ring + nidx); pci_writel(addr, erdp); + pci_writel((u32)(&ir->erdp_high), 0); } }
@@ -620,7 +621,7 @@ static void xhci_xfer_data(struct xhci_pipe *pipe, xhci_xfer_queue(pipe, &trb); }
-static void xhci_xfer_status(struct xhci_pipe *pipe, int dir) +static void xhci_xfer_status(struct xhci_pipe *pipe, int dir, int datalen) { ASSERT32FLAT(); struct xhci_trb trb; @@ -628,7 +629,7 @@ static void xhci_xfer_status(struct xhci_pipe *pipe, int dir) memset(&trb, 0, sizeof(trb)); trb.control |= (TR_STATUS << 10); // trb type trb.control |= TRB_TR_IOC; - if (dir) + if (!datalen || !dir) trb.control |= (1 << 16);
xhci_xfer_queue(pipe, &trb); @@ -903,6 +904,10 @@ xhci_alloc_pipe(struct usbdevice_s *usbdev in->ep[e].deq_high = 0; in->ep[e].length = pipe->pipe.maxpacket;
+ dprintf(1, "binterval=%d s0=%08x s1=%08x e0=%08x e1=%08x\n" + , epdesc->bInterval, in->slot.ctx[0], in->slot.ctx[1] + , in->ep[e].ctx[0], in->ep[e].ctx[1]); + int cc = xhci_cmd_configure_endpoint(pipe->dev); if (cc != CC_SUCCESS) { dprintf(1, "%s: configure endpoint: failed (cc %d)\n", __func__, cc); @@ -1006,7 +1011,7 @@ xhci_control(struct usb_pipe *p, int dir, const void *cmd, int cmdsize xhci_xfer_setup(pipe, req, dir, datalen); if (datalen) xhci_xfer_data(pipe, dir, data, datalen); - xhci_xfer_status(pipe, dir); + xhci_xfer_status(pipe, dir, datalen);
cc = xhci_event_wait(xhci, &pipe->reqs, 1000); if (cc != CC_SUCCESS) {