Date: Wed, 3 Dec 2008 15:59:54 +0100 From: Thierry Herbelot <thierry.herbelot@free.fr> To: freebsd-usb@freebsd.org Subject: Asynchronous bulk transfers in usb2 ? Message-ID: <200812031559.54335.thierry.herbelot@free.fr>
next in thread | raw e-mail | index | archive | help
Hello, I've been looking at the usb2 code, and from what I've understood, only synchronous transfers are possible : a read (for exemple) is only scheduled when the userland program calls usb_bulk_read(). Furthermore, only fixed size buffers are used : only one buffer of 32 kbyte per transfer. This seems sub-optimal when reading (or writing) from userland blocks bigger than 32 kbytes, as multiple kernel-to-userland switches are necessary, and there is a latency window where no buffer exists to accept data between the arrival of one block and the posting of the next transfer. One way to work around this kind of limitations is to provide in advance a certain number of transfers, arranged in a ring, where the callback function at the end of a transfer schedules the next, without any further userland intervention. Is there any project for adding asynchronous bulk reads and/or writes to the fine usb2 stack ? TfH
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812031559.54335.thierry.herbelot>