> > > > > It's reasonable to assume that other controllers in the future may > have > > > > similar needs -- they may even require multiple PHYs to be notified > > > > about connect changes on multiple ports. I see nothing wrong with > > > > implementing a callback just for this purpose. Something like: > > > > > > > > void (*phy_connect_change)(unsigned port, int connected); > > > > > > > > Then in the port loop in ehci_irq(), you could do: > > > > > > > > if (unlikely(ehci->phy_connect_change && (pstatus & > PORT_CSC))) > > > > (ehci->phy_connect_change)(i, pstatus & PORT_CONNECT); > > Hi Alan & Marek, > > > > It is just FSL PHY's limitation, we can override ehci_irq at platform > driver > > to finish the same thing. Better not to change common code, the cleaner > the better > > for common code. > > The common code is already full of special-case quirk code for devices > from individual vendors. One more won't hurt. > > Besides, doing this in the interrupt handler is a hack, and it adds > overhead to all the I/O operations. Doing it as I suggested adds > overhead only when a port changes state. Currently, there is only one phy pointer (struct usb_phy *transceiver) per controller, so it can't know individual phy per port at multiple ports controller situation. It needs us consider phy_user's port number when design phy driver. Any suggestions that how phy driver know its user's port number at phy's probe. phy driver will load earlier than hcd driver, and at phy driver's probe, it will add itself to phy_list, it needs to know port number at that time. -- 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