linux/drivers/usb/host
Mathias Nyman 365038d833 xhci: rework cycle bit checking for new dequeue pointers
When we manually need to move the TR dequeue pointer we need to set the
correct cycle bit as well. Previously we used the trb pointer from the
last event received as a base, but this was changed in
commit 1f81b6d22a ("usb: xhci: Prefer endpoint context dequeue pointer")
to use the dequeue pointer from the endpoint context instead

It turns out some Asmedia controllers advance the dequeue pointer
stored in the endpoint context past the event triggering TRB, and
this messed up the way the cycle bit was calculated.

Instead of adding a quirk or complicating the already hard to follow cycle bit
code, the whole cycle bit calculation is now simplified and adapted to handle
event and endpoint context dequeue pointer differences.

Fixes: 1f81b6d22a ("usb: xhci: Prefer endpoint context dequeue pointer")
Reported-by: Maciej Puzio <mx34567@gmail.com>
Reported-by: Evan Langlois <uudruid74@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Maciej Puzio <mx34567@gmail.com>
Tested-by: Evan Langlois <uudruid74@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-19 11:27:36 -05:00
..
whci usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
Kconfig usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers 2014-07-09 15:49:10 -07:00
Makefile usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers 2014-07-09 15:49:10 -07:00
bcma-hcd.c DMA-API: usb: bcma: replace dma_set_mask()+dma_set_coherent_mask() with new helper 2013-10-31 14:48:34 +00:00
ehci-atmel.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-dbg.c usb: Use dev_is_pci() to check whether it is pci device 2013-12-08 18:01:56 -08:00
ehci-exynos.c usb: ehci-exynos: Use NULL instead of 0 2014-07-09 16:05:42 -07:00
ehci-fsl.c fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6 2014-05-03 18:04:28 -04:00
ehci-fsl.h
ehci-grlib.c USB: ehci-grlib: use dev_err() instead of printk() 2013-12-18 16:32:41 -08:00
ehci-hcd.c usb: ehci: fix deadlock when threadirqs option is used 2014-02-26 15:46:42 -08:00
ehci-hub.c USB: EHCI: Export the ehci_hub_control function 2014-04-24 13:05:32 -07:00
ehci-mem.c USB: EHCI: don't allocate hardware periodic table atomically by default 2014-07-09 16:16:07 -07:00
ehci-msm.c USB: ehci-msm: Make of_device_id array const 2014-07-09 16:13:03 -07:00
ehci-mv.c usb: host: ehci-mv: Use devm_ioremap_resource instead of devm_ioremap 2014-05-27 14:52:29 -07:00
ehci-mxc.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-octeon.c USB: ehci-octeon: Use devm_ioremap_resource() 2013-12-18 16:34:20 -08:00
ehci-omap.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-orion.c usb: ehci-orion: add optional PHY support 2014-05-27 15:33:12 -07:00
ehci-pci.c USB: ehci-pci: USB host controller support for Intel Quark X1000 2014-07-09 16:16:07 -07:00
ehci-platform.c usb: ehci-platform: add optional reset controller retrieval 2014-05-27 15:53:01 -07:00
ehci-pmcmsp.c MIPS: MSP71xx: Remove checks for two macros 2014-05-23 15:12:39 +02:00
ehci-ppc-of.c USB: ehci-ppc-of: use dev_err() instead of printk() 2013-12-18 16:32:41 -08:00
ehci-ps3.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-q.c usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
ehci-sched.c USB: EHCI: fix sparse errors 2013-10-19 14:08:04 -07:00
ehci-sead3.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-sh.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-spear.c USB: ehci-spear: Make of_device_id array const 2014-07-09 16:13:03 -07:00
ehci-sysfs.c USB: EHCI: use a bandwidth-allocation table 2013-10-11 16:45:43 -07:00
ehci-tegra.c USB: EHCI: tegra: Fix probe order issue leading to broken USB 2014-07-09 16:25:46 -07:00
ehci-tilegx.c tile: usb: Use irq_alloc/free_hwirq 2014-05-16 14:05:20 +02:00
ehci-timer.c
ehci-w90x900.c USB: ehci-w90x900: Use devm_ioremap_resource() 2013-12-18 16:35:11 -08:00
ehci-xilinx-of.c USB: ehci-xilinx-of: use dev_err() instead of printk() 2013-12-18 16:32:41 -08:00
ehci.h USB: EHCI: Export the ehci_hub_control function 2014-04-24 13:05:32 -07:00
fhci-dbg.c drivers/usb/host/fhci-dbg.c: remove unnecessary null test before debugfs_remove 2014-07-09 16:13:03 -07:00
fhci-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c
fhci.h
fotg210-hcd.c fotg210: Use managed interfaces for allocation of resources 2014-07-09 16:31:48 -07:00
fotg210.h fotg210: remove conditional compilation 2013-12-03 10:28:39 -08:00
fsl-mph-dr-of.c USB: fsl-mph-dr-of: adjust for OF based clock lookup 2014-01-12 18:53:05 +01:00
fusbh200-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
fusbh200.h fusb200h: always compile in debugfs support 2013-12-03 10:31:21 -08:00
hwa-hc.c usb: wusbcore: disable transfer notifications for Alereon HWAs 2014-03-07 12:52:04 -08:00
imx21-dbg.c usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
imx21-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
imx21-hcd.h usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
isp116x-hcd.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
isp116x.h
isp1362-hcd.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
isp1362.h
isp1760-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
isp1760-hcd.h
isp1760-if.c
max3421-hcd.c usb: host: max3421-hcd: unconditionally use GFP_ATOMIC in max3421_urb_enqueue() 2014-07-09 16:06:50 -07:00
octeon2-common.c
ohci-at91.c USB: OHCI: Export the OHCI hub control and status_data functions 2014-04-24 13:05:32 -07:00
ohci-da8xx.c USB: ohci-da8xx: Use devm_*() functions 2013-12-18 16:35:11 -08:00
ohci-dbg.c USB: OHCI: fix bugs in debug routines 2014-07-17 17:05:07 -07:00
ohci-exynos.c usb: ohci-exynos: Use NULL instead of 0 2014-07-09 16:05:42 -07:00
ohci-hcd.c USB: OHCI: add check for stopped frame counter 2014-07-18 16:34:29 -07:00
ohci-hub.c USB: OHCI: add I/O watchdog for orphan TDs 2014-07-18 16:34:07 -07:00
ohci-jz4740.c USB: ohci-jz4740: FEAT_POWER is a port feature, not a hub feature 2014-04-16 13:59:41 -07:00
ohci-mem.c USB: OHCI: add I/O watchdog for orphan TDs 2014-07-18 16:34:07 -07:00
ohci-nxp.c USB: ohci-nxp: Use devm_clk_get() 2013-12-18 16:36:10 -08:00
ohci-octeon.c USB: ohci-octeon: Use devm_ioremap_resource() 2013-12-18 16:36:11 -08:00
ohci-omap.c USB: ohci-omap: use dev_err() instead of printk() 2013-12-18 16:32:41 -08:00
ohci-omap3.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-pci.c USB: OHCI: fix problem with global suspend on ATI controllers 2014-05-03 17:58:46 -04:00
ohci-platform.c usb: ohci-platform: Enable optional use of reset controller 2014-05-27 15:53:00 -07:00
ohci-ppc-of.c USB: ohci-ppc-of: Use devm_ioremap_resource() 2013-12-18 16:36:10 -08:00
ohci-ps3.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-pxa27x.c USB: ohci-pxa27x: Add support for external vbus regulators 2014-04-24 13:05:32 -07:00
ohci-q.c USB: OHCI: add I/O watchdog for orphan TDs 2014-07-18 16:34:07 -07:00
ohci-s3c2410.c USB: OHCI: Export the OHCI hub control and status_data functions 2014-04-24 13:05:32 -07:00
ohci-sa1111.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-sm501.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-spear.c USB: ohci-spear: Make of_device_id array const 2014-07-09 16:13:03 -07:00
ohci-tilegx.c tile: usb: Use irq_alloc/free_hwirq 2014-05-16 14:05:20 +02:00
ohci-tmio.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
ohci.h USB: OHCI: add check for stopped frame counter 2014-07-18 16:34:29 -07:00
oxu210hp-hcd.c USB: oxu210hp-hcd.c: use devm_ functions 2014-07-09 16:11:11 -07:00
oxu210hp.h
pci-quirks.c USB: EHCI: avoid BIOS handover on the HASEE E200 2014-06-17 17:05:49 -07:00
pci-quirks.h usb: pci_quirks: fix sparse 'symbol not declared' warning 2014-05-27 16:25:32 -07:00
r8a66597-hcd.c ARM: driver updates for 3.14 2014-01-23 18:49:36 -08:00
r8a66597.h
sl811-hcd.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
sl811.h
sl811_cs.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
ssb-hcd.c DMA-API: usb: ssb-hcd: replace dma_set_mask()+dma_set_coherent_mask() with new helper 2013-10-31 14:48:36 +00:00
u132-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
uhci-debug.c usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
uhci-grlib.c usb: host: uhci-grlib.c : use devm_ functions 2014-07-09 16:25:22 -07:00
uhci-hcd.c USB: UHCI: don't allocate frame list atomically 2014-07-09 16:16:07 -07:00
uhci-hcd.h
uhci-hub.c USB/host: Bugfix: Return length of copied buffer in uhci_hub_control() 2013-10-07 00:07:17 -07:00
uhci-pci.c USB: remove DEFINE_PCI_DEVICE_TABLE macro 2013-12-04 16:58:47 -08:00
uhci-platform.c uhci-platform: use devm_ioremap resource 2014-07-09 16:31:48 -07:00
uhci-q.c
xhci-dbg.c Revert "xhci: replace xhci_read_64() with readq()" 2014-01-30 13:27:49 -08:00
xhci-ext-caps.h
xhci-hub.c xhci: clear root port wake on bits if controller isn't wake-up capable 2014-06-24 12:29:35 -04:00
xhci-mem.c Merge branch 'next' (accumulated 3.16 merge window patches) into master 2014-06-08 11:31:16 -07:00
xhci-mvebu.c usb: host: xhci-plat: add support for the Armada 375/38x XHCI controllers 2014-05-27 15:40:40 -07:00
xhci-mvebu.h usb: host: xhci-plat: add support for the Armada 375/38x XHCI controllers 2014-05-27 15:40:40 -07:00
xhci-pci.c usb: xhci: amd chipset also needs short TX quirk 2014-08-19 11:16:08 -05:00
xhci-plat.c usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers 2014-07-09 15:49:10 -07:00
xhci-rcar.c usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers 2014-07-09 15:49:10 -07:00
xhci-rcar.h usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers 2014-07-09 15:49:10 -07:00
xhci-ring.c xhci: rework cycle bit checking for new dequeue pointers 2014-08-19 11:27:36 -05:00
xhci-trace.c
xhci-trace.h xhci: fix sparse warning in xhci-trace.h 2013-12-02 12:59:45 -08:00
xhci.c xhci: rework cycle bit checking for new dequeue pointers 2014-08-19 11:27:36 -05:00
xhci.h xhci: Blacklist using streams on the Etron EJ168 controller 2014-08-01 15:49:34 -07:00