From: Marc Zyngier <marc.zyngier@arm.com>
Date: Wed, 23 May 2018 18:41:38 +0100
Subject: Revert "xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA
issue"
Git-commit: c2ef60fea2dc7f903450926aee1f9c282ea529ca
Patch-mainline: v4.18-rc1
References: bsc#1120854
This reverts commit 8466489ef5ba48272ba4fa4ea9f8f403306de4c7.
Now that we can properly reset the uPD72020x without a hard PCI reset,
let's get rid of the existing quirks.
NOTE: The patch was altered to keep the exported function to avoid breaking
kABI.
Tested-by: Domenico Andreoli <domenico.andreoli@linux.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Faiz Abbas <faiz_abbas@ti.com>
Tested-by: Domenico Andreoli <domenico.andreoli@linux.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
drivers/usb/host/pci-quirks.c | 15 +--------------
drivers/usb/host/pci-quirks.h | 1 -
drivers/usb/host/xhci-pci.c | 7 -------
3 files changed, 1 insertion(+), 22 deletions(-)
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -1270,20 +1270,7 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID
bool usb_xhci_needs_pci_reset(struct pci_dev *pdev)
{
- /*
- * Our dear uPD72020{1,2} friend only partially resets when
- * asked to via the XHCI interface, and may end up doing DMA
- * at the wrong addresses, as it keeps the top 32bit of some
- * addresses from its previous programming under obscure
- * circumstances.
- * Give it a good wack at probe time. Unfortunately, this
- * needs to happen before we've had a chance to discover any
- * quirk, or the system will be in a rather bad state.
- */
- if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
- (pdev->device == 0x0014 || pdev->device == 0x0015))
- return true;
-
return false;
}
EXPORT_SYMBOL_GPL(usb_xhci_needs_pci_reset);
+
--- a/drivers/usb/host/pci-quirks.h
+++ b/drivers/usb/host/pci-quirks.h
@@ -15,7 +15,6 @@ void usb_asmedia_modifyflowcontrol(struc
void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev);
void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
void sb800_prefetch(struct device *dev, int on);
-bool usb_xhci_needs_pci_reset(struct pci_dev *pdev);
bool usb_amd_pt_check_port(struct device *device, int port);
#else
struct pci_dev;
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -296,13 +296,6 @@ static int xhci_pci_probe(struct pci_dev
driver = (struct hc_driver *)id->driver_data;
- /* For some HW implementation, a XHCI reset is just not enough... */
- if (usb_xhci_needs_pci_reset(dev)) {
- dev_info(&dev->dev, "Resetting\n");
- if (pci_reset_function_locked(dev))
- dev_warn(&dev->dev, "Reset failed");
- }
-
/* Prevent runtime suspending between USB-2 and USB-3 initialization */
pm_runtime_get_noresume(&dev->dev);