kernel-ark/drivers/usb/host
Thomas Poussevin 811c926c53 USB: EHCI: fix HUB TT scheduling issue with iso transfer
The current TT scheduling doesn't allow to play and then record on a
full-speed device connected to a high speed hub.

The IN iso stream can only start on the first uframe (0-2 for a 165 us)
because of CSPLIT transactions.
For the OUT iso stream there no such restriction. uframe 0-5 are possible.

The idea of this patch is that the first uframe are precious (for IN TT iso
stream) and we should allocate the last uframes first if possible.

For that we reverse the order of uframe allocation (last uframe first).

Here an example :

hid interrupt stream
----------------------------------------------------------------------
uframe                |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |
----------------------------------------------------------------------
max_tt_usecs          | 125 | 125 | 125 | 125 | 125 | 125 | 30  |  0  |
----------------------------------------------------------------------
used usecs on a frame | 13  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
----------------------------------------------------------------------

iso OUT stream
----------------------------------------------------------------------
uframe                |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |
----------------------------------------------------------------------
max_tt_usecs          | 125 | 125 | 125 | 125 | 125 | 125 | 30  |  0  |
----------------------------------------------------------------------
used usecs on a frame | 13  | 125 |  39 |  0  |  0  |  0  |  0  |  0  |
----------------------------------------------------------------------

There no place for iso IN stream  (uframe 0-2 are used) and we got "cannot
submit datapipe for urb 0, error -28: not enough bandwidth" error.

With the patch this become.

iso OUT stream
----------------------------------------------------------------------
uframe                |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |
----------------------------------------------------------------------
max_tt_usecs          | 125 | 125 | 125 | 125 | 125 | 125 | 30  |  0  |
----------------------------------------------------------------------
used usecs on a frame |  13 |  0  |  0  |  0  | 125 |  39 |  0  |  0  |
----------------------------------------------------------------------

iso IN stream
----------------------------------------------------------------------
uframe                |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |
----------------------------------------------------------------------
max_tt_usecs          | 125 | 125 | 125 | 125 | 125 | 125 | 30  |  0  |
----------------------------------------------------------------------
used usecs on a frame |  13 |  0  | 125 | 40  | 125 |  39 |  0  |  0  |
----------------------------------------------------------------------

Signed-off-by: Matthieu Castet <matthieu.castet@parrot.com>
Signed-off-by: Thomas Poussevin <thomas.poussevin@parrot.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14 13:47:48 -08:00
..
whci usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
alchemy-common.c MIPS: Alchemy: abstract USB block control register access 2011-10-24 23:34:23 +01:00
ehci-ath79.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-atmel.c
ehci-au1xxx.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2011-11-03 13:28:14 -07:00
ehci-cns3xxx.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ehci-dbg.c EHCI: workaround for MosChip controller bug 2011-10-18 13:49:33 -07:00
ehci-fsl.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-fsl.h
ehci-grlib.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ehci-hcd.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2011-11-03 13:28:14 -07:00
ehci-hub.c Merge 3.1-rc4 into usb-next 2011-08-29 08:56:17 -07:00
ehci-ixp4xx.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ehci-lpm.c
ehci-mem.c
ehci-msm.c ehci-msm : use ehci_setup 2011-07-08 14:51:29 -07:00
ehci-mxc.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-octeon.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-omap.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-orion.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-pci.c EHCI: workaround for MosChip controller bug 2011-10-18 13:49:33 -07:00
ehci-pmcmsp.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ehci-ppc-of.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ehci-ps3.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-pxa168.c USB: pxa168: Add onchip USB host controller support 2011-08-22 15:38:30 -07:00
ehci-q.c usb: ehci: remove the 1st wmb in qh_append_tds 2011-09-18 01:38:59 -07:00
ehci-s5p.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-sched.c USB: EHCI: fix HUB TT scheduling issue with iso transfer 2011-11-14 13:47:48 -08:00
ehci-sh.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-spear.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-sysfs.c USB: EHCI: Allow users to override 80% max periodic bandwidth 2011-07-08 14:51:33 -07:00
ehci-tegra.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-vt8500.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ehci-w90x900.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ehci-xilinx-of.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ehci-xls.c usb: OHCI/EHCI support for Netlogic XLS processor. 2011-08-22 15:54:38 -07:00
ehci.h EHCI: workaround for MosChip controller bug 2011-10-18 13:49:33 -07:00
fhci-dbg.c
fhci-hcd.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c QE/FHCI: fixed the CONTROL bug 2011-10-18 13:51:34 -07:00
fhci-tds.c
fhci.h
fsl-mph-dr-of.c usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
hwa-hc.c
imx21-dbg.c treewide: fix a few typos in comments 2011-05-10 10:16:21 +02:00
imx21-hcd.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
imx21-hcd.h
isp116x-hcd.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
isp116x.h
isp1362-hcd.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
isp1362.h
isp1760-hcd.c usb/isp1760: Allow to optionally trigger low-level chip reset via GPIOLIB. 2011-10-19 13:29:06 -07:00
isp1760-hcd.h usb/isp1760: Allow to optionally trigger low-level chip reset via GPIOLIB. 2011-10-19 13:29:06 -07:00
isp1760-if.c usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
Kconfig usb: gadget: renesas_usbhs: add mod_host support 2011-10-13 20:41:52 +03:00
Makefile Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2011-11-03 13:28:14 -07:00
octeon2-common.c
ohci-at91.c at91: at91-ohci: support overcurrent notification 2011-09-10 23:03:13 +02:00
ohci-ath79.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-au1xxx.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2011-11-03 13:28:14 -07:00
ohci-cns3xxx.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ohci-da8xx.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-dbg.c
ohci-ep93xx.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-hcd.c usb: OHCI/EHCI support for Netlogic XLS processor. 2011-08-22 15:54:38 -07:00
ohci-hub.c USB: Fix runtime wakeup on OHCI 2011-10-18 13:42:07 -07:00
ohci-jz4740.c
ohci-mem.c
ohci-octeon.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-omap3.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-omap.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-pci.c OHCI: fix regression caused by nVidia shutdown workaround 2011-05-17 11:20:23 -07:00
ohci-pnx4008.c Merge branch 'gpio' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-10-27 08:39:10 +02:00
ohci-pnx8550.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-ppc-of.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-ppc-soc.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-ps3.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-pxa27x.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-q.c USB: use usb_endpoint_maxp() instead of le16_to_cpu() 2011-08-23 09:47:40 -07:00
ohci-s3c2410.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-sa1111.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-sh.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-sm501.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-spear.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-ssb.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-tmio.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
ohci-xls.c usb: OHCI/EHCI support for Netlogic XLS processor. 2011-08-22 15:54:38 -07:00
ohci.h
oxu210hp-hcd.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
oxu210hp.h
pci-quirks.c USB: workaround for bug in old version of GCC 2011-11-14 13:47:47 -08:00
pci-quirks.h Intel xhci: Support EHCI/xHCI port switching. 2011-05-27 12:07:36 -07:00
r8a66597-hcd.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
r8a66597.h usb: r8a66597-hcd: add function for external controller 2011-07-08 14:57:11 -07:00
sl811_cs.c
sl811-hcd.c USB: irq: Remove IRQF_DISABLED 2011-09-18 01:39:36 -07:00
sl811.h
u132-hcd.c
uhci-debug.c USB: UHCI: Add support for big endian descriptors 2011-05-19 16:43:20 -07:00
uhci-grlib.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
uhci-hcd.c USB: UHCI: improve comments and logic for root-hub suspend 2011-09-26 15:58:18 -07:00
uhci-hcd.h USB: UHCI: Add support for big endian descriptors 2011-05-19 16:43:20 -07:00
uhci-hub.c
uhci-pci.c
uhci-q.c USB: use usb_endpoint_maxp() instead of le16_to_cpu() 2011-08-23 09:47:40 -07:00
xhci-dbg.c Merge 3.0-rc2 into usb-linus as it's needed by some USB patches 2011-06-14 06:51:23 -07:00
xhci-ext-caps.h xHCI: Check host USB2 LPM capability 2011-09-26 15:51:09 -07:00
xhci-hub.c usb: fix implicit usage of gfp.h in host/xhci-hub.c 2011-10-31 19:31:26 -04:00
xhci-mem.c xhci: Set slot and ep0 flags for address command. 2011-11-04 12:33:25 -07:00
xhci-pci.c usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
xhci-ring.c usb, xhci: fix lockdep warning on endpoint timeout 2011-11-02 13:07:59 -07:00
xhci.c USB: XHCI: resume root hubs when the controller resumes 2011-11-14 13:47:48 -08:00
xhci.h usb/xhci: remove CONFIG_PCI in xhci.c's probe function 2011-09-26 15:51:14 -07:00