Hi Alan, On Tue, May 26, 2015 at 11:32 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Tue, 26 May 2015, Rong Wang wrote: > >> > It seems that your customer wants to change the hardware, not the >> > software. >> >> Yes. We plan to do a hardware modification. But we want to make as little >> change as possible. So we plan to make the internal signal HostDisconnect >> , which is sent from PHY to indicate a disconnection event, configurable >> by software. >> We'll mask this signal at first, once the software determines that there's a >> disconnection event, we unmask this signal to notify the USB controller. >> The advantage of this implementation is that the disconnection indication >> signal will not go to USB controller directlly, thus no internal clean up work >> will be done, which will make software recovery possible. >> The disadvantage is that since there's no disconnection indication signal, >> there's no PCD interrupt and no CCS and CSC update avalable. It's totally >> determined by software. >> We don't konw whether this implementation can handle all the corner cases. > > Clearly it can't. For example, an unplug would not generate a wakeup > event. But maybe you can make it work well enough for your needs. We actually will disable the autosuspend for all USB device classes. We don't enable system sleep either. > >> BTW, how's the USB Device Controller (HS/FS) detetct the disconnection? >> Does it detect the disconnection by a SE0 line status or by VBUS status? > > SE0 line status indicates reset, not disconnect. USB devices detect > disconnection by monitoring VBus. Thanks for this Device side information. But there's one thing I'm still not quite sure What's the behavior of the USB device when the VBUS is always present while the D+/D- differential signal amplitude exceeds the disconnection threshold (525 mV)? > > 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