On Thu, 18 Oct 2012, Pavan Kondeti wrote: > Hi Alan, > > I have a theoretical question in EHCI driver. We ensure that there is > 5 msec window between suspend and next resume by keeping time_before() > check in ehci_bus_resume function. If the next_statechange update in > suspend occur just before the next timer tick (say 1 jiffies = 10 > msec), then time_before() return false even when the resume is > initiated <5 msec after suspend. I am not seeing any issue with this. > Just would like to get a clarification from you. should we replace > time_before with time_before_eq? In fact the whole thing shouldn't be using jiffies at all. We should use ktime_t instead. And instead of having a fixed 5-ms delay at the start of ehci_bus_suspend/resume, we should delay only by the amount of time remaining. Likewise for ehci_suspend/resume. Would you like to write a patch to do this? 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