From 46caa9eb1df73fa5dab36a7e2231a33c3acf6ca2 Mon Sep 17 00:00:00 2001 From: Ivan T. Ivanov Date: May 05 2023 08:15:43 +0000 Subject: Merge branch 'users/oneukum/SLE12-SP5/for-next' into SLE12-SP5 --- diff --git a/patches.suse/USB-dwc3-fix-runtime-pm-imbalance-on-probe-errors.patch b/patches.suse/USB-dwc3-fix-runtime-pm-imbalance-on-probe-errors.patch new file mode 100644 index 0000000..1a8f16d --- /dev/null +++ b/patches.suse/USB-dwc3-fix-runtime-pm-imbalance-on-probe-errors.patch @@ -0,0 +1,56 @@ +From 9a8ad10c9f2e0925ff26308ec6756b93fc2f4977 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Tue, 4 Apr 2023 09:25:14 +0200 +Subject: [PATCH] USB: dwc3: fix runtime pm imbalance on probe errors +Git-commit: 9a8ad10c9f2e0925ff26308ec6756b93fc2f4977 +References: git-fixes +Patch-mainline: v6.4-rc1 + +Make sure not to suspend the device when probe fails to avoid disabling +clocks and phys multiple times. + +Fixes: 328082376aea ("usb: dwc3: fix runtime PM in error path") +Cc: stable@vger.kernel.org # 4.8 +Cc: Roger Quadros +Acked-by: Thinh Nguyen +Signed-off-by: Johan Hovold +Link: https://lore.kernel.org/r/20230404072524.19014-2-johan+linaro@kernel.org +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Oliver Neukum +--- + drivers/usb/dwc3/core.c | 13 +++++-------- + 1 file changed, 5 insertions(+), 8 deletions(-) + +--- a/drivers/usb/dwc3/core.c ++++ b/drivers/usb/dwc3/core.c +@@ -1239,13 +1239,11 @@ static int dwc3_probe(struct platform_de + + spin_lock_init(&dwc->lock); + ++ pm_runtime_get_noresume(dev); + pm_runtime_set_active(dev); + pm_runtime_use_autosuspend(dev); + pm_runtime_set_autosuspend_delay(dev, DWC3_DEFAULT_AUTOSUSPEND_DELAY); + pm_runtime_enable(dev); +- ret = pm_runtime_get_sync(dev); +- if (ret < 0) +- goto err1; + + pm_runtime_forbid(dev); + +@@ -1304,11 +1302,10 @@ err3: + dwc3_free_event_buffers(dwc); + + err2: +- pm_runtime_allow(&pdev->dev); +- +-err1: +- pm_runtime_put_sync(&pdev->dev); +- pm_runtime_disable(&pdev->dev); ++ pm_runtime_allow(dev); ++ pm_runtime_disable(dev); ++ pm_runtime_set_suspended(dev); ++ pm_runtime_put_noidle(dev); + + err0: + /* 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/patches.suse/usb-chipidea-fix-missing-goto-in-ci_hdrc_probe.patch b/patches.suse/usb-chipidea-fix-missing-goto-in-ci_hdrc_probe.patch new file mode 100644 index 0000000..6f848b1 --- /dev/null +++ b/patches.suse/usb-chipidea-fix-missing-goto-in-ci_hdrc_probe.patch @@ -0,0 +1,41 @@ +From d6f712f53b79f5017cdcefafb7a5aea9ec52da5d Mon Sep 17 00:00:00 2001 +From: Yinhao Hu +Date: Wed, 12 Apr 2023 13:58:52 +0800 +Subject: [PATCH] usb: chipidea: fix missing goto in `ci_hdrc_probe` +Git-commit: d6f712f53b79f5017cdcefafb7a5aea9ec52da5d +References: git-fixes +Patch-mainline: v6.4-rc1 + +From the comment of ci_usb_phy_init, it returns an error code if +usb_phy_init has failed, and it should do some clean up, not just +return directly. + +Fix this by goto the error handling. + +Fixes: 74475ede784d ("usb: chipidea: move PHY operation to core") +Reviewed-by: Dongliang Mu +Acked-by: Peter Chen +Signed-off-by: Yinhao Hu +Link: https://lore.kernel.org/r/20230412055852.971991-1-dddddd@hust.edu.cn +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Oliver Neukum +--- + drivers/usb/chipidea/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c +index d1d252c87e4f..798cb077867a 100644 +--- a/drivers/usb/chipidea/core.c ++++ b/drivers/usb/chipidea/core.c +@@ -1108,7 +1108,7 @@ static int ci_hdrc_probe(struct platform_device *pdev) + ret = ci_usb_phy_init(ci); + if (ret) { + dev_err(dev, "unable to init phy: %d\n", ret); +- return ret; ++ goto ulpi_exit; + } + + ci->hw_bank.phys = res->start; +-- +2.40.1 + diff --git a/series.conf b/series.conf index f491c4e..db6d05b 100644 --- a/series.conf +++ b/series.conf @@ -63267,6 +63267,9 @@ patches.suse/powerpc-papr_scm-Update-the-NUMA-distance-table-for-.patch 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/usb-chipidea-fix-missing-goto-in-ci_hdrc_probe.patch patches.suse/xfs-verify-buffer-contents-when-we-skip-log-replay.patch # dhowells/linux-fs keys-uefi