Hi everyone,
recently I've been working on an xHCI driver + USB stack for my OS, which has been going pretty well. However when testing on real hardware I magically get a "USB Transaction Error" (TRB Code 4) on sending the Mass Storage Wrapper with the SCSI INQUIRY command, the problem however seems to only occur on my only USB3 stick (an "Integral Courier"), on a generic USB2 stick I own it works fine.
At this point I don't really have any ideas left to debug, so I'm asking here. I believe im doing Endpoint Context initialization correctly, at least as far as section 4.8.2.3 of the xHCI spec says. I thought about using a USB logic analyzer but the prices of those quickly scared me away lol, as another option I tried using a software analyzer on linux to see if it did something weird in initialization, but it doesn't do that, linux just does it and then it works. Does anyone know anything that might lead to this behaviour?
xHCI Driver: https://github.com/thomtl/Luna/blob/mas ... i/xhci.cpp
USB Layer: https://github.com/thomtl/Luna/blob/mas ... sb/usb.cpp
USB MSD Driver: https://github.com/thomtl/Luna/blob/mas ... sb_msd.cpp
- thom_tl
[SOLVED] xhci: USB3 MSD Transaction Error
[SOLVED] xhci: USB3 MSD Transaction Error
Last edited by thomtl on Fri Feb 12, 2021 12:00 pm, edited 1 time in total.
Re: xhci: USB3 MSD Transaction Error
Solved it, I was doing the SET_CONFIGURATION request with the index of the configuration descriptor, instead of the configuration value in it, which I guess mismatched on this stick, but coincedentally were thesame on the other.