usb: cdns3 fixes for usb-linus
Subsystems (3)
cover usb: cdns3 fixes for usb-linus
Two fixes reported by [email protected].
Peter Chen (2):
usb: cdns3: plat: fix leaked usb2_phy initialization on usb3_phy
acquisition failure
usb: cdns3: plat: fix unbalanced pm_runtime_forbid() call permanently
leaks the runtime PM usage counter across bind/unbind cycles
drivers/usb/cdns3/cdns3-plat.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
Signature · 1 line
2.50.1
PATCH 1/2 usb: cdns3: plat: fix leaked usb2_phy initialization on usb3_phy acquisition failure
Move usb2_phy initialization after usb3_phy acquisition.
Fixes f738957277ba ("usb: cdns3: Split core.c into cdns3-plat and core.c file")
Cc <[email protected]>
Reported-by sashiko-bot <[email protected]>
Closes https://lore.kernel.org/linux-devicetree/agKaEePSFknhDBg2@nchen-desktop/T/#m21e1d9c1574eb127ce03c0c2a1a49002ce435b52 open here
Signed-off-by Peter Chen <[email protected]>
--- drivers/usb/cdns3/cdns3-plat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/cdns3/cdns3-plat.c +4 -4
@@ -126,15 +126,15 @@ static int cdns3_plat_probe(struct platform_device *pdev)return dev_err_probe (dev,PTR_ERR (cdns->usb2_phy),"Failed to get cdn3,usb2-phy\n" ); - ret =phy_init (cdns->usb2_phy); -if (ret) -return ret; - cdns->usb3_phy =devm_phy_optional_get (dev,"cdns3,usb3-phy" );if (IS_ERR (cdns->usb3_phy))return dev_err_probe (dev,PTR_ERR (cdns->usb3_phy),"Failed to get cdn3,usb3-phy\n" ); + ret =phy_init (cdns->usb2_phy); +if (ret) +return ret; + ret =phy_init (cdns->usb3_phy);if (ret) goto err_phy3_init;
Signature · 1 line
2.50.1
PATCH 2/2 usb: cdns3: plat: fix unbalanced pm_runtime_forbid() call permanently leaks the runtime PM usage counter across bind/unbind cycles
In reply to Peter ChenCall pm_runtime_allow(dev) conditionally at cdns3_plat_remove.
Fixes f738957277ba ("usb: cdns3: Split core.c into cdns3-plat and core.c file")
Cc <[email protected]>
Reported-by sashiko-bot <[email protected]>
Closes https://lore.kernel.org/linux-devicetree/agKaEePSFknhDBg2@nchen-desktop/T/#m21e1d9c1574eb127ce03c0c2a1a49002ce435b52 open here
Signed-off-by Peter Chen <[email protected]>
--- drivers/usb/cdns3/cdns3-plat.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/cdns3/cdns3-plat.c +3 -0
@@ -186,6 +186,9 @@ static void cdns3_plat_remove(struct platform_device *pdev)struct device *dev = cdns->dev;pm_runtime_get_sync (dev); +if (!(cdns->pdata && (cdns->pdata->quirks &CDNS3_DEFAULT_PM_RUNTIME_ALLOW ))) +pm_runtime_allow (dev); +pm_runtime_disable (dev);pm_runtime_put_noidle (dev);cdns_remove (cdns);
Signature · 1 line
2.50.1