From b6ea002024f7f4034d290819a33199afcb751056 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 21 Nov 2022 12:29:32 +0100 Subject: [PATCH] 5.10-stable patches added patches: revert-usb-dwc3-disable-usb-core-phy-management.patch --- ...dwc3-disable-usb-core-phy-management.patch | 71 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 72 insertions(+) create mode 100644 queue-5.10/revert-usb-dwc3-disable-usb-core-phy-management.patch diff --git a/queue-5.10/revert-usb-dwc3-disable-usb-core-phy-management.patch b/queue-5.10/revert-usb-dwc3-disable-usb-core-phy-management.patch new file mode 100644 index 00000000000..3bf391ed555 --- /dev/null +++ b/queue-5.10/revert-usb-dwc3-disable-usb-core-phy-management.patch @@ -0,0 +1,71 @@ +From 5c294de36e7fb3e0cba0c4e1ef9a5f57bc080d0f Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Thu, 3 Nov 2022 15:46:48 +0100 +Subject: Revert "usb: dwc3: disable USB core PHY management" + +From: Johan Hovold + +commit 5c294de36e7fb3e0cba0c4e1ef9a5f57bc080d0f upstream. + +This reverts commit 6000b8d900cd5f52fbcd0776d0cc396e88c8c2ea. + +The offending commit disabled the USB core PHY management as the dwc3 +already manages the PHYs in question. + +Unfortunately some platforms have started relying on having USB core +also controlling the PHY and this is specifically currently needed on +some Exynos platforms for PHY calibration or connected device may fail +to enumerate. + +The PHY calibration was previously handled in the dwc3 driver, but to +work around some issues related to how the dwc3 driver interacts with +xhci (e.g. using multiple drivers) this was moved to USB core by commits +34c7ed72f4f0 ("usb: core: phy: add support for PHY calibration") and +a0a465569b45 ("usb: dwc3: remove generic PHY calibrate() calls"). + +The same PHY obviously should not be controlled from two different +places, which for example do no agree on the PHY mode or power state +during suspend, but as the offending patch was backported to stable, +let's revert it for now. + +Reported-by: Stefan Agner +Link: https://lore.kernel.org/lkml/808bdba846bb60456adf10a3016911ee@agner.ch/ +Fixes: 6000b8d900cd ("usb: dwc3: disable USB core PHY management") +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Tested-by: Marek Szyprowski +Acked-by: Thinh Nguyen +Link: https://lore.kernel.org/r/20221103144648.14197-1-johan+linaro@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/dwc3/host.c | 10 ---------- + 1 file changed, 10 deletions(-) + +--- a/drivers/usb/dwc3/host.c ++++ b/drivers/usb/dwc3/host.c +@@ -10,13 +10,8 @@ + #include + #include + +-#include "../host/xhci-plat.h" + #include "core.h" + +-static const struct xhci_plat_priv dwc3_xhci_plat_priv = { +- .quirks = XHCI_SKIP_PHY_INIT, +-}; +- + static int dwc3_host_get_irq(struct dwc3 *dwc) + { + struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); +@@ -92,11 +87,6 @@ int dwc3_host_init(struct dwc3 *dwc) + goto err; + } + +- ret = platform_device_add_data(xhci, &dwc3_xhci_plat_priv, +- sizeof(dwc3_xhci_plat_priv)); +- if (ret) +- goto err; +- + memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props)); + + if (dwc->usb3_lpm_capable) diff --git a/queue-5.10/series b/queue-5.10/series index ac37295a60b..df9c0f1bfe4 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -91,3 +91,4 @@ tracing-kprobe-fix-potential-null-ptr-deref-on-trace_array-in-kprobe_event_gen_t alsa-usb-audio-drop-snd_bug_on-from-snd_usbmidi_output_open.patch alsa-hda-realtek-fix-speakers-for-samsung-galaxy-book-pro.patch alsa-hda-realtek-fix-the-speaker-output-on-samsung-galaxy-book-pro-360.patch +revert-usb-dwc3-disable-usb-core-phy-management.patch -- 2.47.3