Date: Mon, 02 Mar 2020 22:42:25 -0500 From: "Farhan Khan" <farhan@farhan.codes> To: "Hans Petter Selasky" <hps@selasky.org>, freebsd-usb@freebsd.org Subject: Re: Understanding how USB transmission works Message-ID: <a633e1f6-b514-426c-abe5-3f66c206f728@www.fastmail.com> In-Reply-To: <497ed8b0-9d9b-8c35-74f5-e9fd2e32fc08@selasky.org> References: <8d84a572-f70f-4080-bfe2-263b7f97993c@www.fastmail.com> <497ed8b0-9d9b-8c35-74f5-e9fd2e32fc08@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a633e1f6-b514-426c-abe5-3f66c206f728>