USB: usbfs: add USBDEVFS_URB_BULK_CONTINUATION flag
This patch (as1283) adds a new flag, USBDEVFS_URB_BULK_CONTINUATION, to usbfs. It is intended for userspace libraries such as libusb and openusb. When they have to break up a single usbfs bulk transfer into multiple URBs, they will set the flag on all but the first URB of the series. If an error other than an unlink occurs, the kernel will automatically cancel all the following URBs for the same endpoint and refuse to accept new submissions, until an URB is encountered that is not marked as a BULK_CONTINUATION. Such an URB would indicate the start of a new transfer or the presence of an older library, so the kernel returns to normal operation. This enables libraries to delimit bulk transfers correctly, even in the presence of early termination as indicated by short packets. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
e6929a9020
commit
01c6460f96
@@ -77,6 +77,7 @@ struct usbdevfs_connectinfo {
|
||||
|
||||
#define USBDEVFS_URB_SHORT_NOT_OK 0x01
|
||||
#define USBDEVFS_URB_ISO_ASAP 0x02
|
||||
#define USBDEVFS_URB_BULK_CONTINUATION 0x04
|
||||
#define USBDEVFS_URB_NO_FSBR 0x20
|
||||
#define USBDEVFS_URB_ZERO_PACKET 0x40
|
||||
#define USBDEVFS_URB_NO_INTERRUPT 0x80
|
||||
|
Reference in New Issue
Block a user