Understanding how USB transmission works
Farhan Khan
farhan at farhan.codes
Tue Mar 3 03:42:51 UTC 2020
On Mon, Mar 2, 2020, at 4:48 PM, Hans Petter Selasky wrote:
> On 2020-03-02 22:19, Farhan Khan wrote:
> > Hi all,
> >
> > I am trying to understand how FreeBSD's usb transfers work compared to OpenBSD by using the rum(4) driver. I am a little confused how the FreeBSD side works.
>
> In FreeBSD USB transfers are a statemachine. In the beginning you call
> the start method, and that invokes the statemachine callback in the
> SETUP state. There you setup all parameters, buffers, lengths etc. and
> then you can submit the USB transfer, which invoke the host controller
> drivers routines, which actually lay out the required DMA descriptors
> for data transfer. When the USB transfer is completed the statemachine
> callback is invoked again and you can choose what to do.
>
> --HPS
>
Thank you so much for your prompt response! I understand that you are the one who wrote the USB stack? If so, I am honored.
Can you please clarify a few points you made?
> In the beginning you call the start method
Within rum(4), would that be rum_start()? If not, which function is that?
> then you can submit the USB transfer
Would that function be usbd_transfer_submit(9)?
Thanks again!
--
Farhan Khan
PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE
More information about the freebsd-usb
mailing list