OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: EHCI/USB Split Transactions
PostPosted: Tue Oct 31, 2023 2:33 am 
Offline

Joined: Thu Apr 13, 2023 7:51 am
Posts: 9
Hi,
so my question is what should a split transaction for a "get descriptor"(device descriptor) request look if this is
what the request to a high-speed device looks like:

QueueHead:
-------------
0x00031502
0x1008E000
0x40000000

Overlay:
0x00000000
0x00032000
0x00000001
...


TD1 0x32000 (Setup):
------------------------
0x00033000
0x00034000
0x00080E80
0x00035000
0x00036000
0x00037000
0x00038000
0x00039000

TD2 0x33000 (Data):
-----------------------
0x00034000
0x00034000
0x80080D80
0x00036000
0x00037000
0x00038000
0x00039000
0x0003A000

TD3 0x34000 (Handshake):
------------------------------
0x00000001
0x00000001
0x80000C80
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000

Setup Buffer Content - 0x35000:
----------------------------------
0x01000680
0x00080000



This is what i am assuming a start-split should look like:
I have set the control endpoint flag, appropriate speed of the device i want to talk to(low speed),
also the hubs address and port(to which it is attached to) in the QH. The TD's have the
"Split Transaction State" bit in the status byte set to 0 for "Do Start Split":

QueueHead:
-------------
0x00031502
0x1808C000
0x40810000

Overlay:
0x00000000
0x00032000
0x00000001
...


TD1 - 0x32000 (Setup):
--------------------------
0x00033000
0x00034000
0x00080E80
0x00035000
0x00036000
0x00037000
0x00038000
0x00039000

TD2 - 0x33000 (Data):
------------------ ------
0x00034000
0x00034000
0x80080D80
0x00036000
0x00037000
0x00038000
0x00039000
0x0003A000

TD3 - 0x34000 (Handshake):
--------------------------------
0x00000001
0x00000001
0x80000C80
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000

Setup Buffer Content - 0x35000:
------------------------------------
0x01000680
0x00080000

Attachment:
Split Transactions.png
Split Transactions.png [ 60.74 KiB | Viewed 1013 times ]


Above is an image of part of the documentation for the split transactions in the USB 2.0 document.
According to the document Start Split transactions can consist of 2,3, or 4 packets depending on transfer
type and direction. Does this mean that the start split token must have its own TD, then making it 4 TD's.
But if I look at the structure of the QH and TD's there is no way to send a SSplit PID token on its own.
I am assuming that it gets sent with the all three TD's?

If I am correct on the above "start-split", would the complete-split look like this:

QueueHead:
-------------
0x00031502
0x1808C000
0x40810000

Overlay:
0x00000000
0x00032000
0x00000001
...


TD1 - 0x32000 (Setup):
--------------------------
0x00033000
0x00033000
0x00080E82
0x00035000
0x00036000
0x00037000
0x00038000
0x00039000

TD2 - 0x33000 (Data):
------------------ ------
0x00000001
0x00000001
0x80080D82
0x00036000
0x00037000
0x00038000
0x00039000
0x0003A000

Setup Buffer Content - 0x35000:
------------------------------------
0x01000680
0x00080000

Thanks in advance for any help.


Top
 Profile  
 
 Post subject: Re: EHCI/USB Split Transactions
PostPosted: Tue Oct 31, 2023 2:05 pm 
Online
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 1593
I may be wrong, but I had thought the EHCI completely handles the split transaction itself. That is why you have to provide the hub address in the queue head somewhere. That is the address of the deepest USB 2 hub in the tree.

_________________
Carpe diem!


Top
 Profile  
 
 Post subject: Re: EHCI/USB Split Transactions
PostPosted: Thu Nov 09, 2023 4:40 am 
Offline

Joined: Thu Apr 13, 2023 7:51 am
Posts: 9
Hi nullplan, yes you were correct. It seems that in the code I managed to leave out the size of data to be transferred in the setup packet, instead of 0x00080000 I just had 0x00000000. But I managed to confuse myself thinking that the standard requests have to be modified to some split transaction format, so I did not even double check my packet data since I thought it was a TD sequence issue. Thanks.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot], mrjbom and 52 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