freebsd-nq/sys/dev/usb
Brian Feldman 601486239c Back out rev.1.91 which implemented bulk read transfers in ugen(4) as
asynchronous.  I realize that this means the custom application will
not work as written, but it is not okay to break most users of ugen(4).

The major problem is that a bulk read transfer is not an interrupt
saying that X bytes are available -- it is a request to be able to
receive up to X bytes, with T timeout, and S short-transfer-okayness.

The timeout is a software mechanism that ugen(4) provides and cannot
be implemented using asynchronous reads -- the timeout must start at
the time a read is done.

The status of up to how many bytes can be received in this transfer
and whether a short transfer returns data or error is also encoded
at least in ohci(4)'s requests to the controller.  Trying to detect
the "maximum width" results in using a single buffer of far too
small when an application requests a large read.

Even if you combat this by replacing all buffers again with the
maximal sized read buffer (1kb) that ugen(4) would allow you to
use before, you don't get the right semantics -- you have to
throw data away or make all the timeouts invalid or make the
short-transfer settings invalid.

There is no way to do this right without extending the ugen(4) API
much further -- it breaks the USB camera interfaces used because
they need a chain of many maximal-width transfers, for example, and
it makes cross-platform support for all the BSDs gratuitously hard.

Instead of trying to do select(2) on a bulk read pipe -- which has
neither the information on desired transfer length nor ability to
implement timeout -- an application can simply use a kernel thread
and pipe to turn that endpoint into something poll-able.

It is unfortunate that bulk endpoints cannot provide the same semantics
that interrupt and isochronous endpoints can, but it is possible to just
use ioctl(USB_GET_ENDPOINT_DESC) to find out when different semantics
must be used without preventing the normal users of the ugen(4) device
from working.
2004-10-13 04:12:20 +00:00
..
dsbr100io.h
ehci_pci.c Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
ehci.c Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
ehcireg.h Attempt to follow the correct procedure for synchronising with the 2004-08-02 12:56:01 +00:00
ehcivar.h Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
FILES
hid.c Use __FBSDID(). 2003-08-24 17:55:58 +00:00
hid.h
if_aue.c Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB framework 2004-08-11 03:38:55 +00:00
if_auereg.h Replace the static "qdat" structure with a per-instance softc field 2004-05-23 12:35:25 +00:00
if_axe.c Add Sitecom's LN-029 USB 2.0 Ethernet adapter. 2004-09-18 19:48:10 +00:00
if_axereg.h Replace the static "qdat" structure with a per-instance softc field 2004-05-23 12:35:25 +00:00
if_cue.c Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB framework 2004-08-11 03:38:55 +00:00
if_cuereg.h Replace the static "qdat" structure with a per-instance softc field 2004-05-23 12:35:25 +00:00
if_kue.c Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB framework 2004-08-11 03:38:55 +00:00
if_kuereg.h Replace the static "qdat" structure with a per-instance softc field 2004-05-23 12:35:25 +00:00
if_rue.c Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB framework 2004-08-11 03:38:55 +00:00
if_ruereg.h Replace the static "qdat" structure with a per-instance softc field 2004-05-23 12:35:25 +00:00
if_udav.c Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB framework 2004-08-11 03:38:55 +00:00
if_udavreg.h Replace the static "qdat" structure with a per-instance softc field 2004-05-23 12:35:25 +00:00
kue_fw.h
ohci_pci.c Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
ohci.c Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
ohcireg.h Remove "Scheduling overrun" interrupts from the set of normal interrupts 2004-05-06 09:21:05 +00:00
ohcivar.h Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
rio500_usb.h
ubsa.c MFp4: First batch of dev/usb/usbdevs.h -> usbdevs.h changes. 2004-06-27 12:41:44 +00:00
ubser.c Use generic tty code instead of local copies. 2004-10-12 09:18:37 +00:00
ubser.h add driver for BWCT console management serials 2004-03-01 02:34:49 +00:00
ucom.c Use generic infrastructure for the ucom driver instead of local stuff. 2004-09-28 20:23:49 +00:00
ucomvar.h Use generic infrastructure for the ucom driver instead of local stuff. 2004-09-28 20:23:49 +00:00
ucycom.c Use generic tty code. 2004-10-12 09:21:03 +00:00
udbp.c Tweak the compatibility macros a little so that the device printing is 2004-08-15 23:39:18 +00:00
udbp.h
ufm.c Tweak the compatibility macros a little so that the device printing is 2004-08-15 23:39:18 +00:00
uftdi.c Add support to the uftdi driver for Intrepid Control Systems' vehicle 2004-07-01 17:16:20 +00:00
uftdireg.h Add support to the uftdi driver for Intrepid Control Systems' vehicle 2004-07-01 17:16:20 +00:00
ugen.c Back out rev.1.91 which implemented bulk read transfers in ugen(4) as 2004-10-13 04:12:20 +00:00
ugraphire_rdesc.h
uhci_pci.c Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
uhci.c The macro for the function specifier inline is spelled '__inline'. 2004-10-03 16:12:29 +00:00
uhcireg.h
uhcivar.h Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
uhid.c Don't use matchlvl attach arg. It seems to be not initialized 2004-10-09 07:48:31 +00:00
uhub.c We don't need a uhub_child_detached() routine now that we don't detach 2004-09-09 20:43:49 +00:00
ukbd.c Tweak the compatibility macros a little so that the device printing is 2004-08-15 23:39:18 +00:00
ulpt.c Tweak the compatibility macros a little so that the device printing is 2004-08-15 23:39:18 +00:00
umass.c Pass through the commands necessary to format USB floppy devices, 2004-10-12 08:58:57 +00:00
umct.c Use a taskqueue rather than an swi to handle deferred notifications. 2004-10-05 04:03:00 +00:00
umodem.c Overhaul ucom serial driver by using generic stuff instead of homerolled 2004-09-17 11:53:45 +00:00
ums.c Tweak the compatibility macros a little so that the device printing is 2004-08-15 23:39:18 +00:00
uplcom.c Add support for CTS modemsignal as well. 2004-10-02 12:47:30 +00:00
urio.c Tweak the compatibility macros a little so that the device printing is 2004-08-15 23:39:18 +00:00
usb_ethersubr.c Remove duplicate 2003-11-14 11:09:45 +00:00
usb_ethersubr.h
usb_if.m
usb_mem.c When searching for a suitable block of memory on the free list, 2004-08-02 13:59:02 +00:00
usb_mem.h eliminate casts from the DMAADDR macro. This depends upon bus_addr_t being 2003-09-01 01:07:24 +00:00
usb_port.h detach before ivar delete. 2004-09-26 05:51:43 +00:00
usb_quirks.c Add support Qualcomm CDMA modem 2004-09-03 23:19:27 +00:00
usb_quirks.h
usb_subr.c Remove extra */ 2004-09-30 02:13:42 +00:00
usb.c Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
usb.h
usbcdc.h
usbdevs Add device ID for atuwi USB wlan driver, 2004-10-03 09:30:09 +00:00
usbdi_util.c Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
usbdi_util.h MFNetBSD. 2004-06-26 10:35:10 +00:00
usbdi.c Fix two cases where a successful return from usbd_transfer() would 2004-08-29 02:35:59 +00:00
usbdi.h Tweak the compatibility macros a little so that the device printing is 2004-08-15 23:39:18 +00:00
usbdivar.h Add pnpinfo and location information to uhub. We also keep track of 2004-06-30 02:56:24 +00:00
usbhid.h
uscanner.c Add support Nikon CoolScan LS40 ED 2004-09-03 23:29:01 +00:00
uvisor.c MFp4: First batch of dev/usb/usbdevs.h -> usbdevs.h changes. 2004-06-27 12:41:44 +00:00
uvscom.c Overhaul ucom serial driver by using generic stuff instead of homerolled 2004-09-17 11:53:45 +00:00