[PATCH v2 2/4] USB: EHCI: Export the ehci_hub_control function

Alan Stern stern at rowland.harvard.edu
Tue Apr 15 10:57:51 PDT 2014

On Tue, 15 Apr 2014, Stephen Warren wrote:

> On 04/15/2014 10:06 AM, Laurent Pinchart wrote:
> > Platform drivers sometimes need to perform specific handling of hub
> > control requests. Make this possible by exporting the ehci_hub_control()
> > function which can then be called from a custom hub control handler in
> > the default case.
> I recall trying to do something like this in the past, but IIRC Alan
> Stern didn't want to make this easy for odd drivers needing this unusual
> case. Witness the comment right above the context of the modified code
> in ehci-tegra.c:
> > diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
> /*
>  * The Tegra HW has some unusual quirks, which require Tegra-specific
>  * workarounds. We override certain hc_driver functions here to
>  * achieve that. We explicitly do not enhance ehci_driver_overrides to
>  * allow this more easily, since this is an unusual case, and we don't
>  * want to encourage others to override these functions by making it
>  * too easy.
>  */

Yeah.  I sort of changed my mind about that.  While this sort of 
overriding is still discouraged, we may as well reduce the penalty for 
doing it.

Alan Stern

More information about the linux-arm-kernel mailing list