>> Is 3rd situation you mentioned above the function will be called is >> hcd->bus_suspend? > > hcd->bus_suspend will be called first, and shortly afterward > ehci->suspend will be called (if this is an EHCI controller). > >> > Fourthly, you should realize that "controller itself will also be put >> > into runtime suspend" means the controller itself will be put into >> > runtime suspend. >> is 4th situation you mentioned above the function will be called is >> ehci_suspend, (take ehci for example)? > > Yes. after tracing the source, I only can find the ehci_suspend is called when system hibernate/suspend. rpm_suspend use below method to find out suspend callback if (dev->pm_domain) callback = dev->pm_domain->ops.runtime_suspend; else if (dev->type && dev->type->pm) callback = dev->type->pm->runtime_suspend; else if (dev->class && dev->class->pm) callback = dev->class->pm->runtime_suspend; else if (dev->bus && dev->bus->pm) callback = dev->bus->pm->runtime_suspend; else callback = NULL; ehci_suspend doesn't register any one of above function. > >> but ehci_supend is called when system is going to suspend/hibernate, >> or it will be called even in runtime suspend? > > Both. > >> BTW, when I turn off the led on the keyboard, the keyboard can >> successfully go to runtime suspend. > > Good. > >> Would you mind to let us know how you find out the problem from mon files? >> Is it due there is no remote wake control message on the mon file? > > The usbmon trace showed that the interrupt URB for one of the HID > interfaces was cancelled (indicating that the interface had been > suspended) but the interrupt URB for the other HID interface was not > cancelled (indicating that the interface had failed to suspend). > > Reading the source code for the usbhid driver showed that there are > only a few reasons for failing to suspend an interface, and one of > those reasons was if an LED was illuminated. Sincerely appreciate your kind help, -- 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