> > Does your case like below: > > Assume there is a intermediate hub which has two-port, and the hub > > connects to roothub (controller), one port is connecting 3G modem, > another port is > > connect u-disk. 3G is auto-suspend at runtime, when we plug out u-disk > from > > another port, the bus will go to suspend, later the PHY is going to > enter low power mode, > > at that time, remote wakeup occurs, the resume signal will go to > intermediate hub, > > then go to roothub. Please attention here, the intermediate hub must > not send resume to > > roothub until the bus enters idle 5ms later. > > > > So, the resume signal will not go to roothub within 5ms after we set > PORT_SUSPEND, > > then the resume signal will not go to roothub while the PHY is entering > low power > > mode if we put set PORT_SUSPEND and PHY enters low power mode code > together. > > 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. -- 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