> -----Original Message----- > From: Felipe Balbi [mailto:felipe.balbi@xxxxxxxxx] > Sent: Tuesday, December 15, 2009 5:41 PM > To: Gadiyar, Anand > Cc: Gupta, Ajay Kumar; Balbi Felipe (Nokia-D/Helsinki); linux- > usb@xxxxxxxxxxxxxxx; linux-omap@xxxxxxxxxxxxxxx; david-b@xxxxxxxxxxx > Subject: Re: [PATCH 2/3 v3] musb: Add context save and restore support > > Hi, > > On Tue, Dec 15, 2009 at 01:04:01PM +0100, ext Gadiyar, Anand wrote: > >> > I think we should only allow suspend if cable isn't connected. What > >> > would happend if you have mounted fs (using mass storage), user is > >> > transferring files and you force a disconnect ? > >> > >> We force a disconnect during suspend which is actually triggered by > user > >> Only. So do we need to consider this scenario? > >> > > > >Like Ajay says, the kernel would need to take a call either way: > > > >- Disallowing a system wide suspend, just because a USB cable is > connected > >- Allow a system-wide suspend, but disconnect the gadget device. > > > > > >I would vote to allow a system-wide suspend. A user that tries to put > >a phone to standby in the middle of a data transfer shouldn't be too > >surprised that the data transfer was aborted. > > yes, but the problem would be the data corrupted. I'm pretty sure user > will be a bit surprised that he now can't use his 27GB and lost all > contacts, movies, smses, etc. It should be system's responsibility for not entering into suspend mode when there is an ongoing active transfer. If this is reliable then there is no need for any force disconnect. On OMAP3EVM, I can see that system doesn't enter into suspend mode when cable is connected so should be fine for OMAP. Felipe/Ajay, What do you suggest, shall we remove this force disconnect code? -Ajay > > -- > balbi -- 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