diff mbox

USB: DWC3: Shutdown usb_phy when removing the device

Message ID 1350136218-25678-1-git-send-email-gautam.vivek@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vivek Gautam Oct. 13, 2012, 1:50 p.m. UTC
We do usb_phy_init() while doing core_init() in probe,
so adding usb_phy_shutdown() when we do core_exit()
while removing the device.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
---
 drivers/usb/dwc3/core.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Felipe Balbi Oct. 15, 2012, 12:14 p.m. UTC | #1
On Sat, Oct 13, 2012 at 07:20:18PM +0530, Vivek Gautam wrote:
> We do usb_phy_init() while doing core_init() in probe,
> so adding usb_phy_shutdown() when we do core_exit()
> while removing the device.
> 
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>

I believe this needs to be sent to stable too for v3.6, right ?

please resend with a proper Cc: stable@vger.kernel.org # v3.6 tag

> ---
>  drivers/usb/dwc3/core.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index b415c0c..c14ebc9 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -409,6 +409,10 @@ static void dwc3_core_exit(struct dwc3 *dwc)
>  {
>  	dwc3_event_buffers_cleanup(dwc);
>  	dwc3_free_event_buffers(dwc);
> +
> +	usb_phy_shutdown(dwc->usb2_phy);
> +	usb_phy_shutdown(dwc->usb3_phy);
> +
>  }
>  
>  #define DWC3_ALIGN_MASK		(16 - 1)
> -- 
> 1.7.6.5
>
Felipe Balbi Oct. 15, 2012, 1:24 p.m. UTC | #2
On Mon, Oct 15, 2012 at 06:56:13PM +0530, Vivek Gautam wrote:
> Hi Felipe,
> 
> On Mon, Oct 15, 2012 at 5:44 PM, Felipe Balbi <balbi@ti.com> wrote:
> > On Sat, Oct 13, 2012 at 07:20:18PM +0530, Vivek Gautam wrote:
> >> We do usb_phy_init() while doing core_init() in probe,
> >> so adding usb_phy_shutdown() when we do core_exit()
> >> while removing the device.
> >>
> >> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> >
> > I believe this needs to be sent to stable too for v3.6, right ?
> >
> As i can see, 51e1e7b usb: dwc3: add basic PHY support, is yet to be
> merged in stable. Then only it will be possible to merge this in
> stable, right ?

oh indeed. that was added on v3.7 merge window. My bad. No need to Cc
stable, I'll apply this as a fix.

cheers
Vivek Gautam Oct. 15, 2012, 1:26 p.m. UTC | #3
Hi Felipe,

On Mon, Oct 15, 2012 at 5:44 PM, Felipe Balbi <balbi@ti.com> wrote:
> On Sat, Oct 13, 2012 at 07:20:18PM +0530, Vivek Gautam wrote:
>> We do usb_phy_init() while doing core_init() in probe,
>> so adding usb_phy_shutdown() when we do core_exit()
>> while removing the device.
>>
>> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
>
> I believe this needs to be sent to stable too for v3.6, right ?
>
As i can see, 51e1e7b usb: dwc3: add basic PHY support, is yet to be
merged in stable. Then only it will be possible to merge this in stable, right ?

> please resend with a proper Cc: stable@vger.kernel.org # v3.6 tag
>
>> ---
>>  drivers/usb/dwc3/core.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index b415c0c..c14ebc9 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -409,6 +409,10 @@ static void dwc3_core_exit(struct dwc3 *dwc)
>>  {
>>       dwc3_event_buffers_cleanup(dwc);
>>       dwc3_free_event_buffers(dwc);
>> +
>> +     usb_phy_shutdown(dwc->usb2_phy);
>> +     usb_phy_shutdown(dwc->usb3_phy);
>> +
>>  }
>>
>>  #define DWC3_ALIGN_MASK              (16 - 1)
>> --
>> 1.7.6.5
>>
>
> --
> balbi

Thanks & Regards
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vivek Gautam Oct. 15, 2012, 1:52 p.m. UTC | #4
Hi,

On Mon, Oct 15, 2012 at 6:54 PM, Felipe Balbi <balbi@ti.com> wrote:
> On Mon, Oct 15, 2012 at 06:56:13PM +0530, Vivek Gautam wrote:
>> Hi Felipe,
>>
>> On Mon, Oct 15, 2012 at 5:44 PM, Felipe Balbi <balbi@ti.com> wrote:
>> > On Sat, Oct 13, 2012 at 07:20:18PM +0530, Vivek Gautam wrote:
>> >> We do usb_phy_init() while doing core_init() in probe,
>> >> so adding usb_phy_shutdown() when we do core_exit()
>> >> while removing the device.
>> >>
>> >> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
>> >
>> > I believe this needs to be sent to stable too for v3.6, right ?
>> >
>> As i can see, 51e1e7b usb: dwc3: add basic PHY support, is yet to be
>> merged in stable. Then only it will be possible to merge this in
>> stable, right ?
>
> oh indeed. that was added on v3.7 merge window. My bad. No need to Cc
> stable, I'll apply this as a fix.
>
Ok, Thank you.
> cheers
>
> --
> balbi

Regards
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index b415c0c..c14ebc9 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -409,6 +409,10 @@  static void dwc3_core_exit(struct dwc3 *dwc)
 {
 	dwc3_event_buffers_cleanup(dwc);
 	dwc3_free_event_buffers(dwc);
+
+	usb_phy_shutdown(dwc->usb2_phy);
+	usb_phy_shutdown(dwc->usb3_phy);
+
 }
 
 #define DWC3_ALIGN_MASK		(16 - 1)