XHCI: bulk endpoint, how to send and receive data
Posted: Fri May 05, 2023 12:19 pm
Hello everyone,
I managed to activate the bulk endpoints for my Mass Storage Class device on XHCI.
This device has two endpoints: bulk IN and bulk OUT.
I tested the endpoint rings by sending a NO-OP command to both of the rings and they responded as expected.
Now I was wondering how can I send bulk data to the device and how to get data back.
I can imagine I first push a TRB to the OUT ring and then push a TRB to the IN ring to read data back.
Is my assumption right?
And which TRB types should I use?
Can I use a normal_trb and a status_trb for the in and out requests?
If it is:
What should I fill in for TD Size? For me, it is not very clear what they mean by it.
The same question about "Evaluate Next TRB" and "Chain bit": do I need to use them for bulk transport?
Thank you in advantage
I managed to activate the bulk endpoints for my Mass Storage Class device on XHCI.
This device has two endpoints: bulk IN and bulk OUT.
I tested the endpoint rings by sending a NO-OP command to both of the rings and they responded as expected.
Now I was wondering how can I send bulk data to the device and how to get data back.
I can imagine I first push a TRB to the OUT ring and then push a TRB to the IN ring to read data back.
Is my assumption right?
And which TRB types should I use?
Can I use a normal_trb and a status_trb for the in and out requests?
If it is:
What should I fill in for TD Size? For me, it is not very clear what they mean by it.
The same question about "Evaluate Next TRB" and "Chain bit": do I need to use them for bulk transport?
Thank you in advantage