From: Greg Kroah-Hartman Date: Mon, 25 Jan 2021 14:28:34 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v4.19.171~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8bb213566fdca92c4620ec10179072244672125c;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: ehci-fix-ehci-host-controller-initialization-sequence.patch iio-ad5504-fix-setting-power-down-state.patch intel_th-pci-add-alder-lake-p-support.patch irqchip-mips-cpu-set-ipi-domain-parent-chip.patch stm-class-fix-module-init-return-on-allocation-failure.patch usb-bdc-make-bdc-pci-driver-depend-on-broken.patch usb-ehci-fix-an-interrupt-calltrace-error.patch usb-udc-core-use-lock-when-write-to-soft_connect.patch xhci-make-sure-trb-is-fully-written-before-giving-it-to-the-controller.patch xhci-tegra-delay-for-disabling-lfps-detector.patch --- diff --git a/queue-4.14/ehci-fix-ehci-host-controller-initialization-sequence.patch b/queue-4.14/ehci-fix-ehci-host-controller-initialization-sequence.patch new file mode 100644 index 00000000000..2c9d8a92f3e --- /dev/null +++ b/queue-4.14/ehci-fix-ehci-host-controller-initialization-sequence.patch @@ -0,0 +1,60 @@ +From 280a9045bb18833db921b316a5527d2b565e9f2e Mon Sep 17 00:00:00 2001 +From: Eugene Korenevsky +Date: Sun, 10 Jan 2021 20:36:09 +0300 +Subject: ehci: fix EHCI host controller initialization sequence + +From: Eugene Korenevsky + +commit 280a9045bb18833db921b316a5527d2b565e9f2e upstream. + +According to EHCI spec, EHCI HC clears USBSTS.HCHalted whenever +USBCMD.RS=1. + +However, it is a good practice to wait some time after setting USBCMD.RS +(approximately 100ms) until USBSTS.HCHalted become zero. + +Without this waiting, VirtualBox's EHCI virtual HC accidentally hangs +(see BugLink). + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211095 +Acked-by: Alan Stern +Signed-off-by: Eugene Korenevsky +Cc: stable +Link: https://lore.kernel.org/r/20210110173609.GA17313@himera.home +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ehci-hcd.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/usb/host/ehci-hcd.c ++++ b/drivers/usb/host/ehci-hcd.c +@@ -587,6 +587,7 @@ static int ehci_run (struct usb_hcd *hcd + struct ehci_hcd *ehci = hcd_to_ehci (hcd); + u32 temp; + u32 hcc_params; ++ int rc; + + hcd->uses_new_polling = 1; + +@@ -642,9 +643,20 @@ static int ehci_run (struct usb_hcd *hcd + down_write(&ehci_cf_port_reset_rwsem); + ehci->rh_state = EHCI_RH_RUNNING; + ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); ++ ++ /* Wait until HC become operational */ + ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ + msleep(5); ++ rc = ehci_handshake(ehci, &ehci->regs->status, STS_HALT, 0, 100 * 1000); ++ + up_write(&ehci_cf_port_reset_rwsem); ++ ++ if (rc) { ++ ehci_err(ehci, "USB %x.%x, controller refused to start: %d\n", ++ ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), rc); ++ return rc; ++ } ++ + ehci->last_periodic_enable = ktime_get_real(); + + temp = HC_VERSION(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); diff --git a/queue-4.14/iio-ad5504-fix-setting-power-down-state.patch b/queue-4.14/iio-ad5504-fix-setting-power-down-state.patch new file mode 100644 index 00000000000..e8398f3e090 --- /dev/null +++ b/queue-4.14/iio-ad5504-fix-setting-power-down-state.patch @@ -0,0 +1,42 @@ +From efd597b2839a9895e8a98fcb0b76d2f545802cd4 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Wed, 9 Dec 2020 11:46:49 +0100 +Subject: iio: ad5504: Fix setting power-down state + +From: Lars-Peter Clausen + +commit efd597b2839a9895e8a98fcb0b76d2f545802cd4 upstream. + +The power-down mask of the ad5504 is actually a power-up mask. Meaning if +a bit is set the corresponding channel is powered up and if it is not set +the channel is powered down. + +The driver currently has this the wrong way around, resulting in the +channel being powered up when requested to be powered down and vice versa. + +Fixes: 3bbbf150ffde ("staging:iio:dac:ad5504: Use strtobool for boolean values") +Signed-off-by: Lars-Peter Clausen +Acked-by: Alexandru Ardelean +Link: https://lore.kernel.org/r/20201209104649.5794-1-lars@metafoo.de +Cc: +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/dac/ad5504.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/iio/dac/ad5504.c ++++ b/drivers/iio/dac/ad5504.c +@@ -189,9 +189,9 @@ static ssize_t ad5504_write_dac_powerdow + return ret; + + if (pwr_down) +- st->pwr_down_mask |= (1 << chan->channel); +- else + st->pwr_down_mask &= ~(1 << chan->channel); ++ else ++ st->pwr_down_mask |= (1 << chan->channel); + + ret = ad5504_spi_write(st, AD5504_ADDR_CTRL, + AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) | diff --git a/queue-4.14/intel_th-pci-add-alder-lake-p-support.patch b/queue-4.14/intel_th-pci-add-alder-lake-p-support.patch new file mode 100644 index 00000000000..54023650993 --- /dev/null +++ b/queue-4.14/intel_th-pci-add-alder-lake-p-support.patch @@ -0,0 +1,34 @@ +From cb5c681ab9037e25fcca20689c82cf034566d610 Mon Sep 17 00:00:00 2001 +From: Alexander Shishkin +Date: Fri, 15 Jan 2021 22:59:17 +0300 +Subject: intel_th: pci: Add Alder Lake-P support + +From: Alexander Shishkin + +commit cb5c681ab9037e25fcca20689c82cf034566d610 upstream. + +This adds support for the Trace Hub in Alder Lake-P. + +Signed-off-by: Alexander Shishkin +Link: https://lore.kernel.org/r/20210115195917.3184-3-alexander.shishkin@linux.intel.com +Cc: stable +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwtracing/intel_th/pci.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/hwtracing/intel_th/pci.c ++++ b/drivers/hwtracing/intel_th/pci.c +@@ -239,6 +239,11 @@ static const struct pci_device_id intel_ + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, + { ++ /* Alder Lake-P */ ++ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x51a6), ++ .driver_data = (kernel_ulong_t)&intel_th_2x, ++ }, ++ { + /* Emmitsburg PCH */ + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc), + .driver_data = (kernel_ulong_t)&intel_th_2x, diff --git a/queue-4.14/irqchip-mips-cpu-set-ipi-domain-parent-chip.patch b/queue-4.14/irqchip-mips-cpu-set-ipi-domain-parent-chip.patch new file mode 100644 index 00000000000..47017c1e621 --- /dev/null +++ b/queue-4.14/irqchip-mips-cpu-set-ipi-domain-parent-chip.patch @@ -0,0 +1,47 @@ +From 599b3063adf4bf041a87a69244ee36aded0d878f Mon Sep 17 00:00:00 2001 +From: Mathias Kresin +Date: Thu, 7 Jan 2021 22:36:03 +0100 +Subject: irqchip/mips-cpu: Set IPI domain parent chip + +From: Mathias Kresin + +commit 599b3063adf4bf041a87a69244ee36aded0d878f upstream. + +Since commit 55567976629e ("genirq/irqdomain: Allow partial trimming of +irq_data hierarchy") the irq_data chain is valided. + +The irq_domain_trim_hierarchy() function doesn't consider the irq + ipi +domain hierarchy as valid, since the ipi domain has the irq domain set +as parent, but the parent domain has no chip set. Hence the boot ends in +a kernel panic. + +Set the chip for the parent domain as it is done in the mips gic irq +driver, to have a valid irq_data chain. + +Fixes: 3838a547fda2 ("irqchip: mips-cpu: Introduce IPI IRQ domain support") +Cc: # v5.10+ +Signed-off-by: Mathias Kresin +Signed-off-by: Marc Zyngier +Link: https://lore.kernel.org/r/20210107213603.1637781-1-dev@kresin.me +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/irqchip/irq-mips-cpu.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/irqchip/irq-mips-cpu.c ++++ b/drivers/irqchip/irq-mips-cpu.c +@@ -201,6 +201,13 @@ static int mips_cpu_ipi_alloc(struct irq + if (ret) + return ret; + ++ ret = irq_domain_set_hwirq_and_chip(domain->parent, virq + i, hwirq, ++ &mips_mt_cpu_irq_controller, ++ NULL); ++ ++ if (ret) ++ return ret; ++ + ret = irq_set_irq_type(virq + i, IRQ_TYPE_LEVEL_HIGH); + if (ret) + return ret; diff --git a/queue-4.14/series b/queue-4.14/series index be7f2ef4d14..7f1a569c860 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -15,3 +15,13 @@ drm-nouveau-i2c-gm200-increase-width-of-aux-semaphor.patch i2c-octeon-check-correct-size-of-maximum-recv_len-pa.patch can-dev-can_restart-fix-use-after-free-bug.patch can-vxcan-vxcan_xmit-fix-use-after-free-bug.patch +iio-ad5504-fix-setting-power-down-state.patch +irqchip-mips-cpu-set-ipi-domain-parent-chip.patch +intel_th-pci-add-alder-lake-p-support.patch +stm-class-fix-module-init-return-on-allocation-failure.patch +ehci-fix-ehci-host-controller-initialization-sequence.patch +usb-ehci-fix-an-interrupt-calltrace-error.patch +usb-udc-core-use-lock-when-write-to-soft_connect.patch +usb-bdc-make-bdc-pci-driver-depend-on-broken.patch +xhci-make-sure-trb-is-fully-written-before-giving-it-to-the-controller.patch +xhci-tegra-delay-for-disabling-lfps-detector.patch diff --git a/queue-4.14/stm-class-fix-module-init-return-on-allocation-failure.patch b/queue-4.14/stm-class-fix-module-init-return-on-allocation-failure.patch new file mode 100644 index 00000000000..f6e11b88405 --- /dev/null +++ b/queue-4.14/stm-class-fix-module-init-return-on-allocation-failure.patch @@ -0,0 +1,48 @@ +From 927633a6d20af319d986f3e42c3ef9f6d7835008 Mon Sep 17 00:00:00 2001 +From: Wang Hui +Date: Fri, 15 Jan 2021 22:59:16 +0300 +Subject: stm class: Fix module init return on allocation failure + +From: Wang Hui + +commit 927633a6d20af319d986f3e42c3ef9f6d7835008 upstream. + +In stm_heartbeat_init(): return value gets reset after the first +iteration by stm_source_register_device(), so allocation failures +after that will, after a clean up, return success. Fix that. + +Fixes: 119291853038 ("stm class: Add heartbeat stm source device") +Reported-by: Hulk Robot +Signed-off-by: Wang Hui +Signed-off-by: Alexander Shishkin +Link: https://lore.kernel.org/r/20210115195917.3184-2-alexander.shishkin@linux.intel.com +Cc: stable +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwtracing/stm/heartbeat.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/hwtracing/stm/heartbeat.c ++++ b/drivers/hwtracing/stm/heartbeat.c +@@ -72,7 +72,7 @@ static void stm_heartbeat_unlink(struct + + static int stm_heartbeat_init(void) + { +- int i, ret = -ENOMEM; ++ int i, ret; + + if (nr_devs < 0 || nr_devs > STM_HEARTBEAT_MAX) + return -EINVAL; +@@ -80,8 +80,10 @@ static int stm_heartbeat_init(void) + for (i = 0; i < nr_devs; i++) { + stm_heartbeat[i].data.name = + kasprintf(GFP_KERNEL, "heartbeat.%d", i); +- if (!stm_heartbeat[i].data.name) ++ if (!stm_heartbeat[i].data.name) { ++ ret = -ENOMEM; + goto fail_unregister; ++ } + + stm_heartbeat[i].data.nr_chans = 1; + stm_heartbeat[i].data.link = stm_heartbeat_link; diff --git a/queue-4.14/usb-bdc-make-bdc-pci-driver-depend-on-broken.patch b/queue-4.14/usb-bdc-make-bdc-pci-driver-depend-on-broken.patch new file mode 100644 index 00000000000..20ed19aeb83 --- /dev/null +++ b/queue-4.14/usb-bdc-make-bdc-pci-driver-depend-on-broken.patch @@ -0,0 +1,36 @@ +From ef02684c4e67d8c35ac83083564135bc7b1d3445 Mon Sep 17 00:00:00 2001 +From: Patrik Jakobsson +Date: Mon, 18 Jan 2021 21:36:15 +0100 +Subject: usb: bdc: Make bdc pci driver depend on BROKEN + +From: Patrik Jakobsson + +commit ef02684c4e67d8c35ac83083564135bc7b1d3445 upstream. + +The bdc pci driver is going to be removed due to it not existing in the +wild. This patch turns off compilation of the driver so that stable +kernels can also pick up the change. This helps the out-of-tree +facetimehd webcam driver as the pci id conflicts with bdc. + +Cc: Al Cooper +Cc: +Acked-by: Felipe Balbi +Signed-off-by: Patrik Jakobsson +Link: https://lore.kernel.org/r/20210118203615.13995-1-patrik.r.jakobsson@gmail.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/udc/bdc/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/gadget/udc/bdc/Kconfig ++++ b/drivers/usb/gadget/udc/bdc/Kconfig +@@ -15,7 +15,7 @@ if USB_BDC_UDC + comment "Platform Support" + config USB_BDC_PCI + tristate "BDC support for PCIe based platforms" +- depends on USB_PCI ++ depends on USB_PCI && BROKEN + default USB_BDC_UDC + help + Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform. diff --git a/queue-4.14/usb-ehci-fix-an-interrupt-calltrace-error.patch b/queue-4.14/usb-ehci-fix-an-interrupt-calltrace-error.patch new file mode 100644 index 00000000000..ed06894f9f1 --- /dev/null +++ b/queue-4.14/usb-ehci-fix-an-interrupt-calltrace-error.patch @@ -0,0 +1,48 @@ +From 643a4df7fe3f6831d14536fd692be85f92670a52 Mon Sep 17 00:00:00 2001 +From: Longfang Liu +Date: Tue, 12 Jan 2021 09:57:27 +0800 +Subject: USB: ehci: fix an interrupt calltrace error + +From: Longfang Liu + +commit 643a4df7fe3f6831d14536fd692be85f92670a52 upstream. + +The system that use Synopsys USB host controllers goes to suspend +when using USB audio player. This causes the USB host controller +continuous send interrupt signal to system, When the number of +interrupts exceeds 100000, the system will forcibly close the +interrupts and output a calltrace error. + +When the system goes to suspend, the last interrupt is reported to +the driver. At this time, the system has set the state to suspend. +This causes the last interrupt to not be processed by the system and +not clear the interrupt flag. This uncleared interrupt flag constantly +triggers new interrupt event. This causing the driver to receive more +than 100,000 interrupts, which causes the system to forcibly close the +interrupt report and report the calltrace error. + +so, when the driver goes to sleep and changes the system state to +suspend, the interrupt flag needs to be cleared. + +Signed-off-by: Longfang Liu +Acked-by: Alan Stern +Link: https://lore.kernel.org/r/1610416647-45774-1-git-send-email-liulongfang@huawei.com +Cc: stable +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ehci-hub.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/host/ehci-hub.c ++++ b/drivers/usb/host/ehci-hub.c +@@ -358,6 +358,9 @@ static int ehci_bus_suspend (struct usb_ + + unlink_empty_async_suspended(ehci); + ++ /* Some Synopsys controllers mistakenly leave IAA turned on */ ++ ehci_writel(ehci, STS_IAA, &ehci->regs->status); ++ + /* Any IAA cycle that started before the suspend is now invalid */ + end_iaa_cycle(ehci); + ehci_handle_start_intr_unlinks(ehci); diff --git a/queue-4.14/usb-udc-core-use-lock-when-write-to-soft_connect.patch b/queue-4.14/usb-udc-core-use-lock-when-write-to-soft_connect.patch new file mode 100644 index 00000000000..94507c1af21 --- /dev/null +++ b/queue-4.14/usb-udc-core-use-lock-when-write-to-soft_connect.patch @@ -0,0 +1,57 @@ +From c28095bc99073ddda65e4f31f6ae0d908d4d5cd8 Mon Sep 17 00:00:00 2001 +From: Thinh Nguyen +Date: Thu, 14 Jan 2021 00:09:51 -0800 +Subject: usb: udc: core: Use lock when write to soft_connect + +From: Thinh Nguyen + +commit c28095bc99073ddda65e4f31f6ae0d908d4d5cd8 upstream. + +Use lock to guard against concurrent access for soft-connect/disconnect +operations when writing to soft_connect sysfs. + +Fixes: 2ccea03a8f7e ("usb: gadget: introduce UDC Class") +Cc: stable@vger.kernel.org +Acked-by: Felipe Balbi +Signed-off-by: Thinh Nguyen +Link: https://lore.kernel.org/r/338ea01fbd69b1985ef58f0f59af02c805ddf189.1610611437.git.Thinh.Nguyen@synopsys.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/udc/core.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +--- a/drivers/usb/gadget/udc/core.c ++++ b/drivers/usb/gadget/udc/core.c +@@ -1458,10 +1458,13 @@ static ssize_t usb_udc_softconn_store(st + struct device_attribute *attr, const char *buf, size_t n) + { + struct usb_udc *udc = container_of(dev, struct usb_udc, dev); ++ ssize_t ret; + ++ mutex_lock(&udc_lock); + if (!udc->driver) { + dev_err(dev, "soft-connect without a gadget driver\n"); +- return -EOPNOTSUPP; ++ ret = -EOPNOTSUPP; ++ goto out; + } + + if (sysfs_streq(buf, "connect")) { +@@ -1473,10 +1476,14 @@ static ssize_t usb_udc_softconn_store(st + usb_gadget_udc_stop(udc); + } else { + dev_err(dev, "unsupported command '%s'\n", buf); +- return -EINVAL; ++ ret = -EINVAL; ++ goto out; + } + +- return n; ++ ret = n; ++out: ++ mutex_unlock(&udc_lock); ++ return ret; + } + static DEVICE_ATTR(soft_connect, S_IWUSR, NULL, usb_udc_softconn_store); + diff --git a/queue-4.14/xhci-make-sure-trb-is-fully-written-before-giving-it-to-the-controller.patch b/queue-4.14/xhci-make-sure-trb-is-fully-written-before-giving-it-to-the-controller.patch new file mode 100644 index 00000000000..ba503ced7f7 --- /dev/null +++ b/queue-4.14/xhci-make-sure-trb-is-fully-written-before-giving-it-to-the-controller.patch @@ -0,0 +1,53 @@ +From 576667bad341516edc4e18eb85acb0a2b4c9c9d9 Mon Sep 17 00:00:00 2001 +From: Mathias Nyman +Date: Fri, 15 Jan 2021 18:19:06 +0200 +Subject: xhci: make sure TRB is fully written before giving it to the controller + +From: Mathias Nyman + +commit 576667bad341516edc4e18eb85acb0a2b4c9c9d9 upstream. + +Once the command ring doorbell is rung the xHC controller will parse all +command TRBs on the command ring that have the cycle bit set properly. + +If the driver just started writing the next command TRB to the ring when +hardware finished the previous TRB, then HW might fetch an incomplete TRB +as long as its cycle bit set correctly. + +A command TRB is 16 bytes (128 bits) long. +Driver writes the command TRB in four 32 bit chunks, with the chunk +containing the cycle bit last. This does however not guarantee that +chunks actually get written in that order. + +This was detected in stress testing when canceling URBs with several +connected USB devices. +Two consecutive "Set TR Dequeue pointer" commands got queued right +after each other, and the second one was only partially written when +the controller parsed it, causing the dequeue pointer to be set +to bogus values. This was seen as error messages: + +"Mismatch between completed Set TR Deq Ptr command & xHCI internal state" + +Solution is to add a write memory barrier before writing the cycle bit. + +Cc: +Tested-by: Ross Zwisler +Signed-off-by: Mathias Nyman +Link: https://lore.kernel.org/r/20210115161907.2875631-2-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-ring.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/host/xhci-ring.c ++++ b/drivers/usb/host/xhci-ring.c +@@ -2907,6 +2907,8 @@ static void queue_trb(struct xhci_hcd *x + trb->field[0] = cpu_to_le32(field1); + trb->field[1] = cpu_to_le32(field2); + trb->field[2] = cpu_to_le32(field3); ++ /* make sure TRB is fully written before giving it to the controller */ ++ wmb(); + trb->field[3] = cpu_to_le32(field4); + + trace_xhci_queue_trb(ring, trb); diff --git a/queue-4.14/xhci-tegra-delay-for-disabling-lfps-detector.patch b/queue-4.14/xhci-tegra-delay-for-disabling-lfps-detector.patch new file mode 100644 index 00000000000..d0de0181c48 --- /dev/null +++ b/queue-4.14/xhci-tegra-delay-for-disabling-lfps-detector.patch @@ -0,0 +1,47 @@ +From da7e0c3c2909a3d9bf8acfe1db3cb213bd7febfb Mon Sep 17 00:00:00 2001 +From: JC Kuo +Date: Fri, 15 Jan 2021 18:19:07 +0200 +Subject: xhci: tegra: Delay for disabling LFPS detector + +From: JC Kuo + +commit da7e0c3c2909a3d9bf8acfe1db3cb213bd7febfb upstream. + +Occasionally, we are seeing some SuperSpeed devices resumes right after +being directed to U3. This commits add 500us delay to ensure LFPS +detector is disabled before sending ACK to firmware. + +[ 16.099363] tegra-xusb 70090000.usb: entering ELPG +[ 16.104343] tegra-xusb 70090000.usb: 2-1 isn't suspended: 0x0c001203 +[ 16.114576] tegra-xusb 70090000.usb: not all ports suspended: -16 +[ 16.120789] tegra-xusb 70090000.usb: entering ELPG failed + +The register write passes through a few flop stages of 32KHz clock domain. +NVIDIA ASIC designer reviewed RTL and suggests 500us delay. + +Cc: stable@vger.kernel.org +Signed-off-by: JC Kuo +Signed-off-by: Mathias Nyman +Link: https://lore.kernel.org/r/20210115161907.2875631-3-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-tegra.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/host/xhci-tegra.c ++++ b/drivers/usb/host/xhci-tegra.c +@@ -579,6 +579,13 @@ static void tegra_xusb_mbox_handle(struc + enable); + if (err < 0) + break; ++ ++ /* ++ * wait 500us for LFPS detector to be disabled before ++ * sending ACK ++ */ ++ if (!enable) ++ usleep_range(500, 1000); + } + + if (err < 0) {