From 3c78b914bca97657e2fdc23778b938138381117e Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: May 04 2023 09:38:23 +0000 Subject: USB: dwc3: fix runtime pm imbalance on unbind (git-fixes). --- diff --git a/patches.suse/USB-dwc3-fix-runtime-pm-imbalance-on-unbind.patch b/patches.suse/USB-dwc3-fix-runtime-pm-imbalance-on-unbind.patch new file mode 100644 index 0000000..c11cdd3 --- /dev/null +++ b/patches.suse/USB-dwc3-fix-runtime-pm-imbalance-on-unbind.patch @@ -0,0 +1,39 @@ +From 44d257e9012ee8040e41d224d0e5bfb5ef5427ea Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Tue, 4 Apr 2023 09:25:15 +0200 +Subject: [PATCH] USB: dwc3: fix runtime pm imbalance on unbind +Git-commit: 44d257e9012ee8040e41d224d0e5bfb5ef5427ea +References: git-fixes +Patch-mainline: v6.4-rc1 + +Make sure to balance the runtime PM usage count on driver unbind by +adding back the pm_runtime_allow() call that had been erroneously +removed. + +Fixes: 266d0493900a ("usb: dwc3: core: don't trigger runtime pm when remove driver") +Cc: stable@vger.kernel.org # 5.9 +Cc: Li Jun +Acked-by: Thinh Nguyen +Signed-off-by: Johan Hovold +Link: https://lore.kernel.org/r/20230404072524.19014-3-johan+linaro@kernel.org +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Oliver Neukum +--- + drivers/usb/dwc3/core.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c +index d2350a87450e..ad48b7ebd880 100644 +--- a/drivers/usb/dwc3/core.c ++++ b/drivers/usb/dwc3/core.c +@@ -1991,6 +1991,7 @@ static int dwc3_remove(struct platform_device *pdev) + dwc3_core_exit(dwc); + dwc3_ulpi_exit(dwc); + ++ pm_runtime_allow(&pdev->dev); + pm_runtime_disable(&pdev->dev); + pm_runtime_put_noidle(&pdev->dev); + pm_runtime_set_suspended(&pdev->dev); +-- +2.40.1 + diff --git a/series.conf b/series.conf index 4f454ef..5e4e2c8 100644 --- a/series.conf +++ b/series.conf @@ -63267,6 +63267,7 @@ patches.suse/wifi-ath5k-fix-an-off-by-one-check-in-ath5k_eeprom_r.patch patches.suse/ipmi-fix-SSIF-not-responding-under-certain-cond.patch patches.suse/USB-dwc3-fix-runtime-pm-imbalance-on-probe-errors.patch + patches.suse/USB-dwc3-fix-runtime-pm-imbalance-on-unbind.patch patches.suse/xfs-verify-buffer-contents-when-we-skip-log-replay.patch # dhowells/linux-fs keys-uefi