Re: [PATCH 2/5] usb: musb: call musb_port_suspend from musb_bus_suspend

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

 



Hi,

On Mon, Nov 25, 2013 at 08:58:22PM +0100, Daniel Mack wrote:
> On 11/25/2013 08:46 PM, Felipe Balbi wrote:
> > On Mon, Nov 25, 2013 at 08:39:50PM +0100, Daniel Mack wrote:
> >> Make musb_port_suspend() externally available, and call it when to host
> >> goes into suspend. This allows the core to go into suspend while a
> >> device is connected.
> >>
> >> Signed-off-by: Daniel Mack <zonque@xxxxxxxxx>
> >> ---
> >>  drivers/usb/musb/musb_host.c    | 2 ++
> >>  drivers/usb/musb/musb_host.h    | 2 ++
> >>  drivers/usb/musb/musb_virthub.c | 2 +-
> >>  3 files changed, 5 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
> >> index 6582a20..81caf9f 100644
> >> --- a/drivers/usb/musb/musb_host.c
> >> +++ b/drivers/usb/musb/musb_host.c
> >> @@ -2433,6 +2433,8 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
> >>  	struct musb	*musb = hcd_to_musb(hcd);
> >>  	u8		devctl;
> >>  
> >> +	musb_port_suspend(musb, true);
> > 
> > have you considered the fact that when musb looses context it'll cause a
> > disconnect on the bus because soft_connect bit is lost ?
> >
> > What if you have a mounted file system on a pendrive ? Should we allow
> > suspend in that case ?
> 
> Well, I would have expected that, but in fact, the opposite is true.
> With 3.12, mounting a filesystem on a USB media and accessing it after
> resume was exactly my test case, and it worked just fine with that patch.

so you had a mounted file system, suspend, resume, it was still mounted?
or did it reenumerate and you remounted it ?

Try to do the same with transfers in flight, it's likely to corrupt your
file system.

> In 3.13, something about the parition table reading seems to be broken
> currently, I'll have a closer look.

cool

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux