freebsd-nq/sys/dev/usb
Bill Paul 2bb980892d Arrgh. Recently I tried using ugen(4) in an application that uses
select(2), and discovered to my horror that ugen(4)'s bulk in/out support
is horribly lobotomized. Bulk transfers are done using the synchronous
API instead of the asynchronous one. This causes the following broken
behavior to occur:

- You open the bulk in/out ugen device and get a descriptor
- You create some other descriptor (socket, other device, etc...)
- You select on both the descriptors waiting until either one has
  data ready to read
- Because of ugen's brokenness, you block in usb_bulk_transfer() inside
  ugen_do_read() instead of blocking in select()
- The non-USB descriptor becomes ready for reading, but you remain blocked
  on select()
- The USB descriptor becomes ready for reading
- Only now are you woken up so that you can ready data from either
  descriptor.

The result is select() can only wake up when there's USB data pending. If
any other descriptor becomes ready, you lose: until the USB descriptor
becomes ready, you stay asleep.

The correct approach is to use async bulk transfers, so I changed
the read code to use the async bulk transfer API. I left the write
side alone for now since it's less of an issue.

Note that the uscanner driver has the same brokenness in it.
2004-09-28 18:39:04 +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 WARNING: white space diff 2003-07-04 01:50:39 +00:00
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 ttyalloc() instead of ttymalloc(NULL) 2004-09-17 07:28:07 +00:00
ubser.h add driver for BWCT console management serials 2004-03-01 02:34:49 +00:00
ucom.c Fix compilation again. 2004-09-17 19:24:58 +00:00
ucomvar.h Overhaul ucom serial driver by using generic stuff instead of homerolled 2004-09-17 11:53:45 +00:00
ucycom.c Use %zu to format size_t. 2004-09-05 12:33:15 +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 WARNING: white space diff 2003-07-04 01:50:39 +00:00
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 Arrgh. Recently I tried using ugen(4) in an application that uses 2004-09-28 18:39:04 +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 Reinstate a usb_transfer_complete() call that got lost in the 2004-08-02 20:53:31 +00:00
uhcireg.h WARNING: white space diff 2003-07-04 01:50:39 +00:00
uhcivar.h Make the USB subsystem unloadable and detachable, though currently 2004-08-02 15:37:35 +00:00
uhid.c Tweak the compatibility macros a little so that the device printing is 2004-08-15 23:39:18 +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 Add support Western Digital External USB HDD 2004-09-04 07:07:35 +00:00
umct.c Add support for Belkin F5U409 serial-usb adapter 2004-08-07 23:45:04 +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 Overhaul ucom serial driver by using generic stuff instead of homerolled 2004-09-17 11:53:45 +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 Add comments about why we're freeing subdevs (which is completely 2004-09-09 20:47:28 +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 '/* Panasonic products */' line(I removed it) 2004-09-20 04:56:13 +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