Re: [PATCH] USB: Force disconnect Huawei 4G modem during suspend

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

 



On Thu, 12 Oct 2017, Daniel Drake wrote:

> On Wed, Oct 11, 2017 at 11:04 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > Also, you should check whether this is for a runtime suspend or a
> > system suspend.  You don't want to go around disconnecting a device
> > whenever it gets runtime suspended!
> 
> Good point, I had not considered runtime suspend. It's not quite so
> simple though.
> 
> I make your suggested change (testing PMSG_IS_AUTO in this codepath),
> then enable autosuspend with:
>  echo auto > /sys/bus/usb/devices/1-9/power/control
> 
> then the device gets suspended (no interface drivers are loaded)
> without the port disconnect happening.
> 
> Now if I go into S3 suspend, the original problem returns: the system
> wakes up immediately.

Nasty!

> So that is an imperfection with this approach. Any suggestions for how
> to proceed?

How about moving the test into usb_suspend() in driver.c?  If the quirk 
flag is set at that point, call hub_port_disable().  You'll have to add 
a glue routine to hub.c for this purpose.

Alan Stern

--
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