summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2021-08-27 15:32:27 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-22 11:47:48 +0200
commit1d7d5ffda8a8e28bb05c5e1ff53716cc7a5a2dd8 (patch)
tree7fd4e322ccd95fb39bff5ee0dcb3f036dc84cab5 /drivers
parentf9d1115fca4cb49b1cb363b6e702455e452e3d3b (diff)
downloadlinux-stable-1d7d5ffda8a8e28bb05c5e1ff53716cc7a5a2dd8.tar.gz
linux-stable-1d7d5ffda8a8e28bb05c5e1ff53716cc7a5a2dd8.tar.bz2
linux-stable-1d7d5ffda8a8e28bb05c5e1ff53716cc7a5a2dd8.zip
usb: host: xhci-rcar: Don't reload firmware after the completion
commit 57f3ffdc11143f56f1314972fe86fe17a0dcde85 upstream. According to the datasheet, "Upon the completion of FW Download, there is no need to write or reload FW.". Otherwise, it's possible to cause unexpected behaviors. So, adds such a condition. Fixes: 4ac8918f3a73 ("usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers") Cc: stable@vger.kernel.org # v3.17+ Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/20210827063227.81990-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/xhci-rcar.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index 2b0ccd150209..4ebbe2c23292 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -143,6 +143,13 @@ static int xhci_rcar_download_firmware(struct usb_hcd *hcd)
const struct soc_device_attribute *attr;
const char *firmware_name;
+ /*
+ * According to the datasheet, "Upon the completion of FW Download,
+ * there is no need to write or reload FW".
+ */
+ if (readl(regs + RCAR_USB3_DL_CTRL) & RCAR_USB3_DL_CTRL_FW_SUCCESS)
+ return 0;
+
attr = soc_device_match(rcar_quirks_match);
if (attr)
quirks = (uintptr_t)attr->data;