linux-brain/include/uapi
Felipe Balbi b6dbace92e usb: add helper to extract bits 12:11 of wMaxPacketSize
commit 541b6fe630 upstream.

According to USB Specification 2.0 table 9-4,
wMaxPacketSize is a bitfield. Endpoint's maxpacket
is laid out in bits 10:0. For high-speed,
high-bandwidth isochronous endpoints, bits 12:11
contain a multiplier to tell us how many
transactions we want to try per uframe.

This means that if we want an isochronous endpoint
to issue 3 transfers of 1024 bytes per uframe,
wMaxPacketSize should contain the value:

	1024 | (2 << 11)

or 5120 (0x1400). In order to make Host and
Peripheral controller drivers' life easier, we're
adding a helper which returns bits 12:11. Note that
no care is made WRT to checking endpoint type and
gadget's speed. That's left for drivers to handle.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20 10:07:16 +01:00
..
asm-generic generic syscalls: kill cruft from removed pkey syscalls 2016-10-17 09:50:56 -07:00
drm drm_fourcc: Fix DRM_FORMAT_MOD_LINEAR #define 2017-10-08 10:26:02 +02:00
linux usb: add helper to extract bits 12:11 of wMaxPacketSize 2017-12-20 10:07:16 +01:00
misc cxl: Use fixed width predefined types in data structure. 2016-08-09 16:52:01 +10:00
mtd mtd: kill the nand_ecclayout struct 2016-05-05 23:51:51 +02:00
rdma IB/cxgb3: fix misspelling in header guard 2017-02-01 08:33:07 +01:00
scsi scsi: cxlflash: Transition to application close model 2016-08-23 22:23:41 -04:00
sound Merge remote-tracking branch 'asoc/fix/topology-abi' into asoc-linus 2016-11-04 12:34:05 -06:00
video
xen xen/evtchn: add IOCTL_EVTCHN_RESTRICT 2016-07-25 10:59:31 +01:00
Kbuild