linux/drivers
Sarah Sharp 2e80b07dcd USB: xhci: properly set endpoint context fields for periodic eps.
commit 9238f25d5d upstream.

For periodic endpoints, we must let the xHCI hardware know the maximum
payload an endpoint can transfer in one service interval.  The xHCI
specification refers to this as the Maximum Endpoint Service Interval Time
Payload (Max ESIT Payload).  This is used by the hardware for bandwidth
management and scheduling of packets.

For SuperSpeed endpoints, the maximum is calculated by multiplying the max
packet size by the number of bursts and the number of opportunities to
transfer within a service interval (the Mult field of the SuperSpeed
Endpoint companion descriptor).  Devices advertise this in the
wBytesPerInterval field of their SuperSpeed Endpoint Companion Descriptor.

For high speed devices, this is taken by multiplying the max packet size by the
"number of additional transaction opportunities per microframe" (the high
bits of the wMaxPacketSize field in the endpoint descriptor).

For FS/LS devices, this is just the max packet size.

The other thing we must set in the endpoint context is the Average TRB
Length.  This is supposed to be the average of the total bytes in the
transfer descriptor (TD), divided by the number of transfer request blocks
(TRBs) it takes to describe the TD.  This gives the host controller an
indication of whether the driver will be enqueuing a scatter gather list
with many entries comprised of small buffers, or one contiguous buffer.

It also takes into account the number of extra TRBs you need for every TD.
This includes No-op TRBs and Link TRBs used to link ring segments
together.  Some drivers may choose to chain an Event Data TRB on the end
of every TD, thus increasing the average number of TRBs per TD.  The Linux
xHCI driver does not use Event Data TRBs.

In theory, if there was an API to allow drivers to state what their
bandwidth requirements are, we could set this field accurately.  For now,
we set it to the same number as the Max ESIT payload.

The Average TRB Length should also be set for bulk and control endpoints,
but I have no idea how to guess what it should be.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-12 14:57:03 -07:00
..
accessibility
acpi ACPI: EC: Limit burst to 64 bits 2010-04-26 07:41:34 -07:00
amba
ata libata: ensure NCQ error result taskfile is fully initialized before returning it via qc->result_tf. 2010-05-12 14:57:00 -07:00
atm
auxdisplay
base Driver-Core: devtmpfs - reset inode permissions before unlinking 2010-03-15 08:49:53 -07:00
block cciss: Make cciss_seq_show handle holes in the h->drv[] array 2010-02-23 07:37:49 -08:00
bluetooth Bluetooth: Prevent ill-timed autosuspend in USB driver 2010-01-06 15:03:43 -08:00
cdrom
char tpm: autoload tpm_tis based on system PnP IDs 2010-04-26 07:41:36 -07:00
clocksource clocksource: Fix up a registration/IRQ race in the sh drivers. 2010-03-15 08:49:44 -07:00
connector connector: Delete buggy notification code. 2010-02-09 04:50:59 -08:00
cpufreq [CPUFREQ] Fix stale cpufreq_cpu_governor pointer 2009-11-17 23:15:04 -05:00
cpuidle drivers/cpuidle/governors/menu.c: fix undefined reference to `__udivdi3' 2010-01-18 10:19:31 -08:00
crypto crypto: padlock-sha - Add import/export support 2010-02-23 07:37:54 -08:00
dca
dio
dma ioat: fix infinite timeout checking in ioat2_quiesce 2010-02-23 07:37:49 -08:00
edac edac, mce: Filter out invalid values 2010-04-01 15:58:40 -07:00
eisa
firewire firewire: core: add_descriptor size check 2010-02-09 04:50:52 -08:00
firmware DMI: allow omitting ident strings in DMI tables 2010-01-28 15:01:52 -08:00
gpio gpiolib: Actually set output state in wm831x_gpio_direction_output() 2010-03-15 08:49:57 -07:00
gpu vgaarb: Fix VGA arbiter to accept PCI domains other than 0 2010-04-26 07:41:30 -07:00
hid HID: fix oops in gyration_event() 2010-04-26 07:41:19 -07:00
hwmon hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=n 2010-04-26 07:41:26 -07:00
i2c i2c-i801: Add Intel Cougar Point device IDs 2010-04-26 07:41:32 -07:00
ide slc90e66: fix UDMA handling 2009-12-18 14:05:04 -08:00
idle
ieee1394
ieee802154 ieee802154: dont leak skbs in ieee802154_fake_xmit() 2009-11-19 13:16:21 -08:00
infiniband IB/iser: Rewrite SG handling for RDMA logic 2010-04-26 07:41:36 -07:00
input Input: wacom - switch mode upon system resume 2010-04-26 07:41:34 -07:00
isdn gigaset: prune use of tty_buffer_request_room 2010-04-01 15:58:24 -07:00
leds leds-gpio: fix default state handling on OF platforms 2010-04-01 15:58:53 -07:00
lguest lguest: fix bug in setting guest GDT entry 2010-01-06 15:05:19 -08:00
macintosh macintosh/therm_adt746x: Fix sysfs attributes lifetime 2010-03-15 08:49:46 -07:00
mca
md md/raid5: fix previous patch. 2010-05-12 14:56:59 -07:00
media V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() 2010-04-01 15:58:13 -07:00
memstick
message mptspi: Fix for incorrect data underrun errata 2010-04-26 07:41:36 -07:00
mfd mfd: WM835x GPIO direction register is not locked 2010-01-22 15:18:18 -08:00
misc SCSI: enclosure: fix oops while iterating enclosure_status array 2010-01-25 10:49:37 -08:00
mmc s3cmci: initialize default platform data no_wprotect and no_detect with 1 2010-04-01 15:58:56 -07:00
mtd UBI: fix volume creation input checking 2010-02-09 04:50:45 -08:00
net p54usb: Add usbid for Corega CG-WLUSB2GT. 2010-05-12 14:56:59 -07:00
nubus
of of: Remove nested function 2009-10-15 09:58:27 -06:00
oprofile
parisc
parport
pci PCI: fix nested spinlock hang in aer_inject 2010-04-26 07:41:31 -07:00
pcmcia PCI/cardbus: Add a fixup hook and fix powerpc 2010-01-22 15:18:26 -08:00
platform eeepc-laptop: disable wireless hotplug for 1005PE 2010-04-26 07:41:23 -07:00
pnp
power
pps pps: events reporting fix up 2009-11-12 07:26:01 -08:00
ps3
rapidio
regulator regulator: Fix display of null constraints for regulators 2010-02-23 07:37:49 -08:00
rtc rtc-coh901331: fix braces in resume code 2010-03-15 08:50:14 -07:00
s390 dasd: remove strings from s390dbf 2010-02-23 07:37:54 -08:00
sbus
scsi SCSI: add scsi target reset support to scsi ioctl 2010-04-26 07:41:30 -07:00
serial serial: imx: fix NULL dereference Oops when pdata == NULL 2010-03-15 08:49:54 -07:00
sfi
sh
sn
spi SPI: spi_txx9: Fix bit rate calculation 2009-12-02 23:58:32 +00:00
ssb ssb: Fix range check in sprom write 2009-12-18 14:03:24 -08:00
staging staging: usbip: Fix deadlock 2010-05-12 14:57:01 -07:00
tc
telephony
thermal acpi: thermal: Add EOL to the trip_point_N_type strings 2009-11-05 17:33:24 -05:00
uio uio: pm_runtime_disable is needed if failed 2009-11-13 11:36:00 +09:00
usb USB: xhci: properly set endpoint context fields for periodic eps. 2010-05-12 14:57:03 -07:00
uwb
video backlight: mbp_nvidia_bl - add five more MacBook variants 2010-04-26 07:41:19 -07:00
virtio virtio: fix out of range array access 2010-04-01 15:58:18 -07:00
vlynq
w1 w1: w1 temp: fix negative termperature calculation 2010-05-12 14:57:00 -07:00
watchdog WATCHDOG: iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point DeviceIDs 2010-04-26 07:41:18 -07:00
xen xen: fix hang on suspend. 2010-01-18 10:19:44 -08:00
zorro
Kconfig
Makefile