RE: The corner case for USB remote wakeup

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

 



On Fri, 27 Apr 2012, Chen Peter-B29397 wrote:

> > No, that's not what I meant.  Suppose there is no intermediate hub,
> > only a 3G modem plugged directly into the root hub.  The 3G modem does
> > a runtime autosuspend, and then 2 seconds later sends a wakeup request.
> > 
> > But the autosuspend timeout for the root hub is also 2 seconds, so the
> > root hub suspends and the PHY goes into low-power mode at just the same
> > time as when the wakeup request arrives.
> 
> At your case, if we put PHY enters low power mode code at both ehci_hub_control 
> and ehci_bus_suspend, once 3G modem is suspended, the ehci_hub_control
> (USB_PORT_FEAT_SUSPEND) will be called, then PHY enters low power mode code
> will be called. roohub suspend (ehci_bus_suspend) will not set PORT_SUSPEND
> at portsc and call PHY enters low power mode code again.

Okay, I didn't realize you wanted to change the PHY state in 
ehci_hub_control also.  You would power-down the PHY whenever every 
connected port was suspended, right?

So consider this scenario instead.  There is no intermediate hub, but 
there are two devices plugged directly into the root hub: a 3G modem 
and a flash drive.  The 3G modem goes into runtime suspend.  A minute 
later, the user unplugs the flash drive, and at that point the PHY is 
powered down.  What's to prevent the modem from sending a wakeup signal 
at the same time?

Are you going to say that this can't happen on the systems you're
talking about because their EHCI root hubs have only one port?  What
about other systems that have more than one port?

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