On Wed, 11 Apr 2012, Chen Peter-B29397 wrote: > > Why would the host think the device had disconnected? Is this because > > the port is no longer suspended and has switched to its high-speed > > terminations, while the device is still using full-speed signalling? > > > Host works at high speed mode, the high speed disconnect condition is > differential voltage(dp/dm) larger than 625 mV. The device is still at > full speed idle, so dp is 3v, but dm is pull down by host, and it is 0v. Like I said: The port is trying to use high-speed signalling and the device is trying to use full-speed signalling. > In order to solve this problem, the current solution we use is set usbcmd.rs again > at controller's suspend if there is a device at port and it is remote wakeup > featured. If usbcmd.rs=1, the SOF will be sent out automatically once the resume > signal has finished, and the device will work at high speed mode. > So, it doesn't matter when the ehci_bus_resume is called. I suppose you could do that, although I would prefer not to leave the root hub running at times when it is supposed to be suspended. > > A better approach might be to have ehci_bus_resume check the port > > statuses before turning on CMD_RUN, and re-suspend any enabled port > > that isn't already suspended. Then when the controller starts sending > > SOF packets, the host shouldn't think the device had disconnected. > > Would that solve your problem? You didn't respond to this proposal. > > > Is it possible to use other conditions, like hcd->state == > > HC_STATE_SUSPENDED > > > to run usb_hcd_resume_root_hub at PCD interrupt? > > > > What's wrong with the existing condition (ehci->rh_state == > > EHCI_RH_SUSPENDED)? > > > I mean at ehci_irq, if PCD interrupt occurs, it uses usbcmd.rs=0 to call > usb_hcd_resume_root_hub, does it possible use some flags (ehci->rh_state == > EHCI_RH_SUSPENDED or hcd->state == HC_STATE_SUSPENDED)? Ah. I already have written a patch which changes the condition to ehci->rh_state == EHCI_RH_SUSPENDED -- and I forgot that this patch has not been submitted yet. Clearly you would need this if you turn the root hub on at controller suspend. 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