]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 2 Aug 2017 01:11:08 +0000 (20:11 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 2 Aug 2017 17:05:07 +0000 (12:05 -0500)
commit6771240f88cc9ed11d75b7bf0b2c1d5aea9ea282
treeab765d1c3f8acaf71a7e4341633fd390e80042e5
parent80c263471a3c72f7fcf18a409032418a4fe3d4b2
xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue

The Renesas uPD72020x XHCI controller seems to suffer from a really
annoying bug, where it may retain some of its DMA programming across a XHCI
reset, and despite the driver correctly programming new DMA addresses.
This is visible if the device has been using 64-bit DMA addresses, and is
then switched to using 32-bit DMA addresses.  The top 32 bits of the
address (now zero) are ignored are replaced by the 32 bits from the
*previous* programming.  Sticking with 64-bit DMA always works, but doesn't
seem very appropriate.

A PCI reset of the device restores the normal functionality, which is done
at probe time.  Unfortunately, this has to be done before any quirk has
been discovered, hence the intrusive nature of the fix.

Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
CC: stable@vger.kernel.org # v4.11+
drivers/usb/host/pci-quirks.c
drivers/usb/host/pci-quirks.h
drivers/usb/host/xhci-pci.c