freebsd-nq/sys
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
..
alpha
amd64 Like on i386, use the definition of struct bios_smap from machine/pc/bios.h 2004-09-24 01:11:11 +00:00
arm Calling fuword from fuword32 with bl and without returning after is really a bad 2004-09-28 14:39:26 +00:00
boot Document vfs.root.mountdelay value. 2004-09-24 09:33:48 +00:00
cam
coda
compat Add a proc *p pointer for td->td_proc to make this code easier to read. 2004-09-24 20:26:15 +00:00
conf Be consistant; make the memrange bit be part of the mem module like 2004-09-28 07:29:54 +00:00
contrib
crypto
ddb
dev Arrgh. Recently I tried using ugen(4) in an application that uses 2004-09-28 18:39:04 +00:00
doc
fs XXX mark two places where we do not hold a threadcount on the dev when 2004-09-24 08:32:36 +00:00
gdb
geom Protect the start/end counts on consumers and providers with the up/down 2004-09-28 11:56:37 +00:00
gnu Desupport device nodes on EXT2 filesystems. 2004-09-27 20:38:46 +00:00
i4b
i386 Improve the panic message for a busted MP table with conflicting entries 2004-09-24 18:42:54 +00:00
ia64 ...And fix WITNESS builds: declare syscallnames. 2004-09-26 20:39:56 +00:00
isa Converge towards i386. I originally resisted creating <machine/pc/bios.h> 2004-09-24 01:08:34 +00:00
isofs/cd9660 Hold proper thread count while frobbing drivers ioctl. 2004-09-24 07:24:02 +00:00
kern Give cluster_write() an explicit vnode argument. 2004-09-27 19:14:10 +00:00
libkern
modules Add the memrange bits to the loadable module. 2004-09-28 07:26:00 +00:00
net
net80211
netatalk
netatm
netgraph
netinet o Turn net.inet.ip.check_interface sysctl off by default. 2004-09-24 12:18:40 +00:00
netinet6
netipsec Correct handling of SADB_UPDATE and SADB_ADD requests. key_align may split 2004-09-26 02:01:27 +00:00
netipx
netkey
netnatm
netncp
netsmb
nfs
nfs4client Remove NFS4 vop method vector for devices: we are desupporing device nodes 2004-09-27 20:02:50 +00:00
nfsclient Remove support for using NFS device nodes. 2004-09-28 08:50:01 +00:00
nfsserver
opencrypto
pc98
pccard
pci fix jumbo frames as much as they can be fixed for re. We now cap the MTU 2004-09-28 18:22:24 +00:00
posix4
powerpc Add sc_iostart to softc and unbreak the build. 2004-09-27 19:51:58 +00:00
rpc
security
sparc64 Add an assertion that the pcb_nsaved field of the pcb be less than 2004-09-28 16:36:58 +00:00
sys Give cluster_write() an explicit vnode argument. 2004-09-27 19:14:10 +00:00
tools
ufs Remove support for accessing device nodes in UFS/FFS. 2004-09-28 13:30:58 +00:00
vm Don't look for swap blocks in objects that aren't swap-backed. 2004-09-24 16:04:20 +00:00
Makefile