Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
Hi all, 2014-11-04 0:29 GMT+01:00 Greg KH : > On Mon, Nov 03, 2014 at 04:51:41PM +0530, Kishon Vijay Abraham I wrote: >> Hi Greg, >> >> On Tuesday 07 October 2014 04:32 PM, Oussama Ghorbel wrote: >> > The USB OTG port does not work since v3.16 on omap platform. >> > This is a regression introduced by the commit >> > eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure >> > and remove). >> > This because the call to pm_runtime_enable() function is moved after the >> > call to devm_phy_create() function, which has side effect since later in >> > the subsequent calls of devm_phy_create() there is a check with >> > pm_runtime_enabled() to configure few things. >> >> This is the only fix for this -rc cycle in the PHY susbsystem. So can you >> take >> this directly? Or else I can prepare a pull request. Let me know. >> >> Acked-by: Kishon Vijay Abraham I > > I don't have this in my archives anymore, please resend so that I can > apply it from an email. > > thanks, > > greg k-h I'm trying to use the OTG port as HOST on OMAP3-based platform (IGEPv2), I saw that this patch is already applied in kernel 3.18.0-rc4 so I expected it to work, but I've some problems. To explain the situation let me propose some test cases. The first tests I made were configuring the MUSB OTG as HOST only mode,In this mode test case A fails and test case B and C succeed. USB Mode Selection (HOST only mode) Test case A) Boot the system : mode : b_idle vbus : Vbus off, timeout 1100 msec 1) Ground ID-pin mode : a_idle vbus : Vbus off, timeout 1100 msec 2) Plug pendrive mode : a_idle vbus : Vbus off, timeout 1100 msec Failed: Pendrive is not detected. Test case B) Boot with ID-pin grounded : mode : a_idle vbus : Vbus off, timeout 1100 msec 1) Plug pendrive mode : a_host vbus : Vbus off, timeout 1100 msec Success: Pendrive is detected Test case C) Boot with ID-pin grounded and pendrive mode : a_host vbus : Vbus off, timeout 1100 msec Success: Pendrive is detected The second tests I made were configuring the MUSB OTG as Dual Role mode,In this mode all test cases failed. MUSB Mode Selection (Dual Role mode) Test case A) Boot the system : mode : b_idle vbus : Vbus off, timeout 1100 msec 1) Ground ID-pin: mode : a_idle mode : Vbus off, timeout 1100 msec 2) Plug pendrive mode : a_idle vbus : Vbus off, timeout 1100 msec Failed: Pendrive is not detected. Test case B) Boot with ID-pin grounded : mode : b_idle vbus : Vbus off, timeout 1100 msec 1) Plug pendrive mode : b_idle vbus : Vbus off, timeout 1100 msec Failed: Pendrive is not detected. Test case C) Boot with ID-pin grounded and pendrive mode : b_idle vbus : Vbus off, timeout 1100 msec Failed: Pendrive is not detected. I got the mode and vbus values from sysfs: cat /sys/bus/platform/drivers/musb-hdrc/musb-hdrc.0.auto/mode cat /sys/bus/platform/drivers/musb-hdrc/musb-hdrc.0.auto/vbus Did anybody test these test cases ? I'm a bit surprised with the vbus status because always reports Vbus off, although pendrive is working. I'm missing something ? Note that if you see at the mode transitions something looks wrong. For example, in Dual Role Mode test case B and C the mode is b_idle instead of a_idle. Thanks, Enric -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
On Mon, Nov 03, 2014 at 04:51:41PM +0530, Kishon Vijay Abraham I wrote: > Hi Greg, > > On Tuesday 07 October 2014 04:32 PM, Oussama Ghorbel wrote: > > The USB OTG port does not work since v3.16 on omap platform. > > This is a regression introduced by the commit > > eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure > > and remove). > > This because the call to pm_runtime_enable() function is moved after the > > call to devm_phy_create() function, which has side effect since later in > > the subsequent calls of devm_phy_create() there is a check with > > pm_runtime_enabled() to configure few things. > > This is the only fix for this -rc cycle in the PHY susbsystem. So can you take > this directly? Or else I can prepare a pull request. Let me know. > > Acked-by: Kishon Vijay Abraham I I don't have this in my archives anymore, please resend so that I can apply it from an email. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
Hi Greg, On Tuesday 07 October 2014 04:32 PM, Oussama Ghorbel wrote: > The USB OTG port does not work since v3.16 on omap platform. > This is a regression introduced by the commit > eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure > and remove). > This because the call to pm_runtime_enable() function is moved after the > call to devm_phy_create() function, which has side effect since later in > the subsequent calls of devm_phy_create() there is a check with > pm_runtime_enabled() to configure few things. This is the only fix for this -rc cycle in the PHY susbsystem. So can you take this directly? Or else I can prepare a pull request. Let me know. Acked-by: Kishon Vijay Abraham I Thanks Kishon > > Signed-off-by: Oussama Ghorbel > --- > drivers/phy/phy-omap-usb2.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c > index 93d7835..acc13f8 100644 > --- a/drivers/phy/phy-omap-usb2.c > +++ b/drivers/phy/phy-omap-usb2.c > @@ -262,14 +262,16 @@ static int omap_usb2_probe(struct platform_device *pdev) > otg->phy= &phy->phy; > > platform_set_drvdata(pdev, phy); > + pm_runtime_enable(phy->dev); > > generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL); > - if (IS_ERR(generic_phy)) > + if (IS_ERR(generic_phy)) { > + pm_runtime_disable(phy->dev); > return PTR_ERR(generic_phy); > + } > > phy_set_drvdata(generic_phy, phy); > > - pm_runtime_enable(phy->dev); > phy_provider = devm_of_phy_provider_register(phy->dev, > of_phy_simple_xlate); > if (IS_ERR(phy_provider)) { > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
On Thursday 30 October 2014 04:39 AM, Rabin Vincent wrote: > Unless I'm missing something, this patch appears to have still not been > picked up. It would be nice if it can go in for 3.18 so that we have > working USB on pandaboard again at least in that release. > > Tony, would you mind carrying it as OMAP maintainer since we haven't > heard anything from Kishon (the PHY maintainer) about this? It's been > acked by Roger (whose patch introduced the problem). I'll send this in this -rc cycle. Thanks Kishon > > Thanks. > > (leaving the patch intact below) > > On Tue, Oct 07, 2014 at 12:02:51PM +0100, Oussama Ghorbel wrote: >> The USB OTG port does not work since v3.16 on omap platform. >> This is a regression introduced by the commit >> eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure >> and remove). >> This because the call to pm_runtime_enable() function is moved after the >> call to devm_phy_create() function, which has side effect since later in >> the subsequent calls of devm_phy_create() there is a check with >> pm_runtime_enabled() to configure few things. >> >> Signed-off-by: Oussama Ghorbel >> --- >> drivers/phy/phy-omap-usb2.c | 6 -- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c >> index 93d7835..acc13f8 100644 >> --- a/drivers/phy/phy-omap-usb2.c >> +++ b/drivers/phy/phy-omap-usb2.c >> @@ -262,14 +262,16 @@ static int omap_usb2_probe(struct platform_device >> *pdev) >> otg->phy= &phy->phy; >> >> platform_set_drvdata(pdev, phy); >> +pm_runtime_enable(phy->dev); >> >> generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL); >> -if (IS_ERR(generic_phy)) >> +if (IS_ERR(generic_phy)) { >> +pm_runtime_disable(phy->dev); >> return PTR_ERR(generic_phy); >> +} >> >> phy_set_drvdata(generic_phy, phy); >> >> -pm_runtime_enable(phy->dev); >> phy_provider = devm_of_phy_provider_register(phy->dev, >> of_phy_simple_xlate); >> if (IS_ERR(phy_provider)) { >> -- >> 1.8.3.2 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-usb" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
Unless I'm missing something, this patch appears to have still not been picked up. It would be nice if it can go in for 3.18 so that we have working USB on pandaboard again at least in that release. Tony, would you mind carrying it as OMAP maintainer since we haven't heard anything from Kishon (the PHY maintainer) about this? It's been acked by Roger (whose patch introduced the problem). Thanks. (leaving the patch intact below) On Tue, Oct 07, 2014 at 12:02:51PM +0100, Oussama Ghorbel wrote: > The USB OTG port does not work since v3.16 on omap platform. > This is a regression introduced by the commit > eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure > and remove). > This because the call to pm_runtime_enable() function is moved after the > call to devm_phy_create() function, which has side effect since later in > the subsequent calls of devm_phy_create() there is a check with > pm_runtime_enabled() to configure few things. > > Signed-off-by: Oussama Ghorbel > --- > drivers/phy/phy-omap-usb2.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c > index 93d7835..acc13f8 100644 > --- a/drivers/phy/phy-omap-usb2.c > +++ b/drivers/phy/phy-omap-usb2.c > @@ -262,14 +262,16 @@ static int omap_usb2_probe(struct platform_device *pdev) > otg->phy= &phy->phy; > > platform_set_drvdata(pdev, phy); > + pm_runtime_enable(phy->dev); > > generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL); > - if (IS_ERR(generic_phy)) > + if (IS_ERR(generic_phy)) { > + pm_runtime_disable(phy->dev); > return PTR_ERR(generic_phy); > + } > > phy_set_drvdata(generic_phy, phy); > > - pm_runtime_enable(phy->dev); > phy_provider = devm_of_phy_provider_register(phy->dev, > of_phy_simple_xlate); > if (IS_ERR(phy_provider)) { > -- > 1.8.3.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
Nothing to send then. Oussama On 10/08/2014 02:26 PM, Greg KH wrote: On Wed, Oct 08, 2014 at 02:42:56PM +0300, Roger Quadros wrote: Oussama, On 10/08/2014 01:54 PM, Oussama Ghorbel wrote: Hi Roger, Should I resend this v2 version of the patch to sta...@vger.kernel.org which is suitable for v3.17 and which will require a very tiny adaptation? Or I should resend the first version of this patch which is suitable for 3.16 but might seems confusing a little sine I'm resend the outdated version. If it is a trivial conflict then I think you can just send the patch which applies to the most recent kernel. Greg can clarify if I'm wrong as he maintains the stable trees. Please read Documentation/stable_kernel_rules.txt for how to submit patches to the stable trees. Note, it has to be in Linus's tree _first_ before you ever worry about the stable trees. Do that first please. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
On Wed, Oct 08, 2014 at 02:42:56PM +0300, Roger Quadros wrote: > Oussama, > > On 10/08/2014 01:54 PM, Oussama Ghorbel wrote: > > Hi Roger, > > > > Should I resend this v2 version of the patch to sta...@vger.kernel.org > > which is suitable for v3.17 and which will require a very tiny adaptation? > > Or I should resend the first version of this patch which is suitable for > > 3.16 but might seems confusing a little sine I'm resend the outdated > > version. > > If it is a trivial conflict then I think you can just send the patch > which applies to the most recent kernel. > Greg can clarify if I'm wrong as he maintains the stable trees. Please read Documentation/stable_kernel_rules.txt for how to submit patches to the stable trees. Note, it has to be in Linus's tree _first_ before you ever worry about the stable trees. Do that first please. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
Oussama, On 10/08/2014 01:54 PM, Oussama Ghorbel wrote: > Hi Roger, > > Should I resend this v2 version of the patch to sta...@vger.kernel.org which > is suitable for v3.17 and which will require a very tiny adaptation? > Or I should resend the first version of this patch which is suitable for 3.16 > but might seems confusing a little sine I'm resend the outdated version. If it is a trivial conflict then I think you can just send the patch which applies to the most recent kernel. Greg can clarify if I'm wrong as he maintains the stable trees. cheers, -roger > > Thanks, > Oussama > On 10/08/2014 09:17 AM, Roger Quadros wrote: >> Hi Oussama, >> >> On 10/07/2014 02:02 PM, Oussama Ghorbel wrote: >>> The USB OTG port does not work since v3.16 on omap platform. >>> This is a regression introduced by the commit >>> eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure >>> and remove). >>> This because the call to pm_runtime_enable() function is moved after the >>> call to devm_phy_create() function, which has side effect since later in >>> the subsequent calls of devm_phy_create() there is a check with >>> pm_runtime_enabled() to configure few things. >>> >>> Signed-off-by: Oussama Ghorbel >> Acked-by: Roger Quadros >> >> Could you please send the patch to >> Cc: [3.16+] >> >> That way it will get into 3.16 onwards. Thanks. >> >> cheers, >> -roger >> > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
Hi Roger, Should I resend this v2 version of the patch to sta...@vger.kernel.org which is suitable for v3.17 and which will require a very tiny adaptation? Or I should resend the first version of this patch which is suitable for 3.16 but might seems confusing a little sine I'm resend the outdated version. Thanks, Oussama On 10/08/2014 09:17 AM, Roger Quadros wrote: Hi Oussama, On 10/07/2014 02:02 PM, Oussama Ghorbel wrote: The USB OTG port does not work since v3.16 on omap platform. This is a regression introduced by the commit eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove). This because the call to pm_runtime_enable() function is moved after the call to devm_phy_create() function, which has side effect since later in the subsequent calls of devm_phy_create() there is a check with pm_runtime_enabled() to configure few things. Signed-off-by: Oussama Ghorbel Acked-by: Roger Quadros Could you please send the patch to Cc: [3.16+] That way it will get into 3.16 onwards. Thanks. cheers, -roger -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
Hi Oussama, On 10/07/2014 02:02 PM, Oussama Ghorbel wrote: > The USB OTG port does not work since v3.16 on omap platform. > This is a regression introduced by the commit > eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure > and remove). > This because the call to pm_runtime_enable() function is moved after the > call to devm_phy_create() function, which has side effect since later in > the subsequent calls of devm_phy_create() there is a check with > pm_runtime_enabled() to configure few things. > > Signed-off-by: Oussama Ghorbel Acked-by: Roger Quadros Could you please send the patch to Cc: [3.16+] That way it will get into 3.16 onwards. Thanks. cheers, -roger -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
On Tue, Oct 07, 2014 at 12:02:51PM +0100, Oussama Ghorbel wrote: > The USB OTG port does not work since v3.16 on omap platform. > This is a regression introduced by the commit > eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure > and remove). > This because the call to pm_runtime_enable() function is moved after the > call to devm_phy_create() function, which has side effect since later in > the subsequent calls of devm_phy_create() there is a check with > pm_runtime_enabled() to configure few things. > > Signed-off-by: Oussama Ghorbel Tested-by: Rabin Vincent Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html