OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:19 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: xHCI: second request to EP0 of MSD never finishes
PostPosted: Wed Aug 31, 2022 1:54 pm 
Offline
Member
Member
User avatar

Joined: Fri Jun 11, 2021 6:02 am
Posts: 96
Location: Belgium
Hello,

I'm trying to get my xHCI driver (which works fine in QEMU aside from a single errata) to work on real hardware but I'm stuck configuring a USB2 storage device.

The first request (GET_DESCRIPTOR with DEVICE, STRING ...) always succeeds, but the second request (also GET_DESCRIPTOR) gets stuck at the setup TRB. When I pull out the device the controller sends a USB Transaction Error event, which points to the SETUP TRB of the second request.

The other built-in devices do seem to work properly, though one gives a Stall error when trying to read the device string (although reading the manufacturer string works, oddly). I have a hunch it is related but I can't figure out where to look.

My code is here.

_________________
My OS is Norost B (website, Github, sourcehut)
My filesystem is NRFS (Github, sourcehut)


Top
 Profile  
 
 Post subject: Re: xHCI: second request to EP0 of MSD never finishes
PostPosted: Wed Aug 31, 2022 5:22 pm 
Offline
Member
Member
User avatar

Joined: Fri Jun 11, 2021 6:02 am
Posts: 96
Location: Belgium
I figured out the first issue: For some reason I was setting the chain bit in the data stage TRB. I removed that and now I can send more than one request.

The stall error persists though. I wasn't sure what was up with that (manufacturer string also returns a single non-ascii byte) until I noticed the indices are all zeroes. I've reread the wiki and apparently that means the device doesn't support it, whoops.

EDIT: the stall issue appears with a device that does have non-zero indices. The other ones just returns garbage. Manufacturer index works (it's some Hewlett Packard device, apparently).

_________________
My OS is Norost B (website, Github, sourcehut)
My filesystem is NRFS (Github, sourcehut)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 68 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group