Re: [PATCH 1/2] usb: musb: Fix host mode error -71 regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 25, 2017 at 06:59:47AM -0600, Bin Liu wrote:
> On Wed, Jan 25, 2017 at 11:01:30AM +0100, Greg KH wrote:
> > On Tue, Jan 24, 2017 at 09:18:57AM -0600, Bin Liu wrote:
> > > From: Tony Lindgren <tony@xxxxxxxxxxx>
> > > 
> > > Commit 467d5c980709 ("usb: musb: Implement session bit based runtime PM for
> > > musb-core") started implementing musb generic runtime PM support by
> > > introducing devctl register session bit based state control.
> > > 
> > > This caused a regression where if a USB mass storage device is connected
> > > to a USB hub, we can get:
> > > 
> > > usb 1-1: reset high-speed USB device number 2 using musb-hdrc
> > > usb 1-1: device descriptor read/64, error -71
> > > usb 1-1.1: new high-speed USB device number 4 using musb-hdrc
> > > 
> > > This is because before the USB storage device is connected, musb is
> > > in OTG_STATE_A_SUSPEND. And we currently only set need_finish_resume
> > > in musb_stage0_irq() and the related code calling finish_resume_work
> > > in musb_resume() and musb_runtime_resume() never gets called.
> > > 
> > > To fix the issue, we can call schedule_delayed_work() directly in
> > > musb_stage0_irq() to have finish_resume_work run.
> > > 
> > > And we should no longer never get interrupts when when suspended.
> > > We have changed musb to no longer need pm_runtime_irqsafe().
> > > The need_finish_resume flag was added in commit 9298b4aad37e ("usb:
> > > musb: fix device hotplug behind hub") and no longer applies as far
> > > as I can tell. So let's just remove the earlier code that no longer
> > > is needed.
> > > 
> > > Fixes: 467d5c980709 ("usb: musb: Implement session bit based
> > > runtime PM for musb-core")
> > > Reported-by: Bin Liu <b-liu@xxxxxx>
> > > Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
> > > Signed-off-by: Bin Liu <b-liu@xxxxxx>
> > > ---
> > >  drivers/usb/musb/musb_core.c | 15 ++-------------
> > >  drivers/usb/musb/musb_core.h |  1 -
> > >  2 files changed, 2 insertions(+), 14 deletions(-)
> > 
> > As the problem showed up in 4.9, this should go into 4.9-stable, right?
> 
> Yes.

Great, please remember to add a cc: stable line for the patch next time
so I don't have to do it manually...
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux