linux-uconsole/drivers/usb/host
Mathias Nyman c0f94181a7 xhci: fix off by one error in TRB DMA address boundary check
commit 7895086afd upstream.

We need to check that a TRB is part of the current segment
before calculating its DMA address.

Previously a ring segment didn't use a full memory page, and every
new ring segment got a new memory page, so the off by one
error in checking the upper bound was never seen.

Now that we use a full memory page, 256 TRBs (4096 bytes), the off by one
didn't catch the case when a TRB was the first element of the next segment.

This is triggered if the virtual memory pages for a ring segment are
next to each in increasing order where the ring buffer wraps around and
causes errors like:

[  106.398223] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 0 comp_code 1
[  106.398230] xhci_hcd 0000:00:14.0: Looking for event-dma fffd3000 trb-start fffd4fd0 trb-end fffd5000 seg-start fffd4000 seg-end fffd4ff0

The trb-end address is one outside the end-seg address.

Tested-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-16 20:51:36 -07:00
..
whci
bcma-hcd.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
ehci-atmel.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ehci-dbg.c USB: EHCI: convert singly-linked lists to list_heads 2013-03-25 13:35:05 -07:00
ehci-fsl.c fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6 2014-06-07 13:25:32 -07:00
ehci-fsl.h
ehci-grlib.c usb: Convert to devm_ioremap_resource() 2013-01-22 11:41:58 -08:00
ehci-hcd.c USB: EHCI: unlink QHs even after the controller has stopped 2014-10-05 14:54:10 -07:00
ehci-hub.c USB: EHCI: Fix resume signalling on remote wakeup 2013-08-04 16:50:46 +08:00
ehci-mem.c
ehci-msm.c USB: EHCI: make ehci-msm a separate driver 2013-04-08 09:40:20 -07:00
ehci-mv.c usb: patches for v3.10 merge window 2013-04-05 15:18:00 -07:00
ehci-mxc.c usb: ehci-mxc: check for pdata before dereferencing 2013-09-26 17:18:06 -07:00
ehci-octeon.c
ehci-omap.c USB: ehci-omap: Tweak PHY initialization sequence 2013-07-21 18:21:24 -07:00
ehci-orion.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ehci-pci.c USB: ehci-pci: USB host controller support for Intel Quark X1000 2014-09-05 16:28:34 -07:00
ehci-platform.c USB: Fix initconst in ehci driver 2013-04-23 10:10:29 -07:00
ehci-pmcmsp.c
ehci-ppc-of.c usb: Convert to devm_ioremap_resource() 2013-01-22 11:41:58 -08:00
ehci-ps3.c usb: PS3 EHCI remove unneeded ehci_shutdown 2013-04-01 12:32:43 -07:00
ehci-q.c usb: ehci: mark unlink_empty_async_suspended() as __maybe_unused 2013-03-28 14:49:53 -07:00
ehci-s5p.c usb: ehci-s5p: fix memleak when fallback to pdata 2013-05-16 17:35:13 -07:00
ehci-sched.c USB: EHCI: accept very late isochronous URBs 2013-08-20 08:43:04 -07:00
ehci-sead3.c usb: Convert to devm_ioremap_resource() 2013-01-22 11:41:58 -08:00
ehci-sh.c usb: echi-sh: Remove driver variable which is not used 2013-03-28 11:14:47 -07:00
ehci-spear.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ehci-sysfs.c
ehci-tegra.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ehci-tilegx.c usb: tilegx: fix memleak when create hcd fail 2013-05-09 13:56:40 -04:00
ehci-timer.c USB: EHCI: improve end_unlink_async() 2013-03-25 13:36:32 -07:00
ehci-w90x900.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
ehci-xilinx-of.c usb: Convert to devm_ioremap_resource() 2013-01-22 11:41:58 -08:00
ehci.h usb: ehci: add freescale imx28 special write register method 2014-02-06 11:08:13 -08:00
fhci-dbg.c
fhci-hcd.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c
fhci.h
fsl-mph-dr-of.c USB: fsl-mph-dr-of: fix regression on mpc5121e 2013-01-11 16:01:06 -08:00
hwa-hc.c
imx21-dbg.c
imx21-hcd.c usb: imx21-hcd: Include missing linux/module.h 2013-01-11 12:01:09 -08:00
imx21-hcd.h
isp116x-hcd.c usb: host: isp116x: use new USB_RESUME_TIMEOUT 2015-05-06 21:56:23 +02:00
isp116x.h
isp1362-hcd.c procfs: new helper - PDE_DATA(inode) 2013-04-09 14:13:32 -04:00
isp1362.h
isp1760-hcd.c USB: remove remaining instances of USB_SUSPEND 2013-05-15 13:44:44 -04:00
isp1760-hcd.h
isp1760-if.c usb: isp1760-if: fix memleak when platform_get_resource fail 2013-05-16 17:35:13 -07:00
Kconfig USB: fix Kconfig logic for USB_UHCI_HCD 2013-05-15 13:41:39 -04:00
Makefile USB: EHCI: make ehci-msm a separate driver 2013-04-08 09:40:20 -07:00
octeon2-common.c
ohci-at91.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ohci-da8xx.c
ohci-dbg.c
ohci-ep93xx.c usb: remove use of __devinit 2012-11-21 13:27:16 -08:00
ohci-exynos.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ohci-hcd.c USB: OHCI: accept very late isochronous URBs 2013-10-05 07:13:11 -07:00
ohci-hub.c USB: OHCI: fix problem with global suspend on ATI controllers 2014-06-07 13:25:32 -07:00
ohci-jz4740.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
ohci-mem.c
ohci-nxp.c USB fixes for 3.10-rc2 2013-05-23 09:23:32 -07:00
ohci-octeon.c usb: remove use of __devinit 2012-11-21 13:27:16 -08:00
ohci-omap.c ARM: arm-soc: Header cleanups 2012-12-12 11:45:16 -08:00
ohci-omap3.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ohci-pci.c USB: OHCI: fix problem with global suspend on ATI controllers 2014-06-07 13:25:32 -07:00
ohci-platform.c usb: Convert to devm_ioremap_resource() 2013-01-22 11:41:58 -08:00
ohci-ppc-of.c usb: remove use of __devinit 2012-11-21 13:27:16 -08:00
ohci-ps3.c usb: remove use of __devinit 2012-11-21 13:27:16 -08:00
ohci-pxa27x.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ohci-q.c USB: OHCI: don't lose track of EDs when a controller dies 2014-09-05 16:28:34 -07:00
ohci-s3c2410.c usb: Convert to devm_ioremap_resource() 2013-01-22 11:41:58 -08:00
ohci-sa1111.c usb: remove use of __devinit 2012-11-21 13:27:16 -08:00
ohci-sm501.c
ohci-spear.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ohci-tilegx.c usb: tilegx: fix memleak when create hcd fail 2013-05-09 13:56:40 -04:00
ohci-tmio.c usb: host: ohci-tmio: fix compile warning 2013-01-11 16:22:53 -08:00
ohci.h USB: OHCI: fix problem with global suspend on ATI controllers 2014-06-07 13:25:32 -07:00
oxu210hp-hcd.c usb: host: oxu210hp: use new USB_RESUME_TIMEOUT 2015-05-13 05:15:42 -07:00
oxu210hp.h
pci-quirks.c OHCI: add a quirk for ULi M5237 blocking on reset 2015-01-27 07:52:32 -08:00
pci-quirks.h
r8a66597-hcd.c usb: host: r8a66597: use new USB_RESUME_TIMEOUT 2015-05-06 21:56:22 +02:00
r8a66597.h
sl811-hcd.c usb: host: sl811: use new USB_RESUME_TIMEOUT 2015-05-06 21:56:23 +02:00
sl811.h
sl811_cs.c drivers/usb: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:26:38 -07:00
ssb-hcd.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
u132-hcd.c USB: remove CONFIG_USB_SUSPEND option 2013-03-28 11:10:22 -07:00
uhci-debug.c USB: uhci: beautify source code 2013-01-24 13:59:26 -08:00
uhci-grlib.c usb: remove use of __devinit 2012-11-21 13:27:16 -08:00
uhci-hcd.c Merge 3.8-rc5 into usb-next 2013-01-25 12:41:02 -08:00
uhci-hcd.h USB: UHCI: remove unused definition 2013-01-24 13:42:09 -08:00
uhci-hub.c USB: UHCI: fix for suspend of virtual HP controller 2013-05-15 13:41:40 -04:00
uhci-pci.c USB: fix PM config symbol in uhci-hcd, ehci-hcd, and xhci-hcd 2013-10-05 07:13:10 -07:00
uhci-platform.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
uhci-q.c USB: UHCI: accept very late isochronous URBs 2013-10-05 07:13:11 -07:00
xhci-dbg.c
xhci-ext-caps.h
xhci-hub.c xhci: prevent bus_suspend if SS port resuming in phase 1 2015-08-10 12:20:31 -07:00
xhci-mem.c usb: xhci: Bugfix for NULL pointer deference in xhci_endpoint_init() function 2015-08-03 09:29:45 -07:00
xhci-pci.c usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllers 2015-04-19 10:10:49 +02:00
xhci-plat.c xhci-plat: Don't enable legacy PCI interrupts. 2013-09-26 17:18:04 -07:00
xhci-ring.c xhci: fix off by one error in TRB DMA address boundary check 2015-08-16 20:51:36 -07:00
xhci.c xhci: Calculate old endpoints correctly on device reset 2015-08-10 12:20:31 -07:00
xhci.h xhci: prevent bus_suspend if SS port resuming in phase 1 2015-08-10 12:20:31 -07:00