RE: [PATCH 4/4] CI13xxx: Add USB host interrupt notifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 17 May 2012, Chen Peter-B29397 wrote:

> > > 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.

Also, IIRC Marek's proposal didn't check to see whether the controller 
was suspended (powered down) before trying to read the status register.

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux