Re: [PATCH v3 4/7] USB: EHCI: export ehci_shutdown

2013-03-29 Thread Alan Stern
On Fri, 29 Mar 2013, Geoff Levand wrote:

> Hi Alan,
> 
> > Actually, I think this is not necessary.  Instead those three glue
> > files ought to be changed.  They should not need to call
> > ehci_shutdown() directly.
> 
> I sent out a separate patch that removes the ehci_shutdown()
> call in ps3_ehci_remove().  I tested it by removing and
> installing the ehci_hcd module and it seems to work OK.

Thanks!  I'll send it on up.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 4/7] USB: EHCI: export ehci_shutdown

2013-03-29 Thread Geoff Levand
Hi Alan,

> Actually, I think this is not necessary.  Instead those three glue
> files ought to be changed.  They should not need to call
> ehci_shutdown() directly.

I sent out a separate patch that removes the ehci_shutdown()
call in ps3_ehci_remove().  I tested it by removing and
installing the ehci_hcd module and it seems to work OK.

-Geoff

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 4/7] USB: EHCI: export ehci_shutdown

2013-03-29 Thread Alan Stern
On Thu, 28 Mar 2013, Arnd Bergmann wrote:

> The ehci_shutdown function is used by the platform specific ehci backends
> for at91, tegra and ps3. In order to turn any of these into separate
> modules, we need to make this function globally visible and export it.

Actually, I think this is not necessary.  Instead those three glue
files ought to be changed.  They should not need to call
ehci_shutdown() directly.

The references to ehci_shutdown() in ehci-atmel.c and ehci-ps3.c seem
totally unnecesary.  That routine does a hard shutdown -- but the calls
are immediately followed by usb_remove_hcd(), which calls ehci_stop(),
which does an orderly shutdown followed by a reset.  While it certainly
would be good to check with the authors of these drivers, it would be
surprising if removing those calls led to any trouble.

The reference in ehci-tegra.c is there only so that
tegra_ehci_shutdown() can call tegra_ehci_power_up() before doing its
real work.  Instead, tegra_ehci_power_up() should be called by 
tegra_ehci_hcd_shutdown().  Then there would be no need to have the 
tegra_ehci_shutdown() routine at all.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 4/7] USB: EHCI: export ehci_shutdown

2013-03-28 Thread Arnd Bergmann
The ehci_shutdown function is used by the platform specific ehci backends
for at91, tegra and ps3. In order to turn any of these into separate
modules, we need to make this function globally visible and export it.

Signed-off-by: Arnd Bergmann 
Cc: Greg KH 
Cc: Alan Stern 
Cc: linux-usb@vger.kernel.org
---
 drivers/usb/host/ehci-hcd.c | 3 ++-
 drivers/usb/host/ehci.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 8f1f4b4..1c9aa17 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -353,7 +353,7 @@ static void ehci_silence_controller(struct ehci_hcd *ehci)
  * This forcibly disables dma and IRQs, helping kexec and other cases
  * where the next system software may expect clean state.
  */
-static void ehci_shutdown(struct usb_hcd *hcd)
+void ehci_shutdown(struct usb_hcd *hcd)
 {
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
 
@@ -367,6 +367,7 @@ static void ehci_shutdown(struct usb_hcd *hcd)
 
hrtimer_cancel(&ehci->hrtimer);
 }
+EXPORT_SYMBOL_GPL(ehci_shutdown);
 
 /*-*/
 
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index e666999..915739d 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -799,6 +799,7 @@ struct ehci_driver_overrides {
 extern voidehci_init_driver(struct hc_driver *drv,
const struct ehci_driver_overrides *over);
 extern int ehci_setup(struct usb_hcd *hcd);
+extern voidehci_shutdown(struct usb_hcd *hcd);
 
 #ifdef CONFIG_PM
 extern int ehci_suspend(struct usb_hcd *hcd, bool do_wakeup);
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html