* [PATCH] MUSB HDRC: RMMOD fixing
@ 2007-01-17 19:39 Felipe Balbi
2007-01-17 19:57 ` David Brownell
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2007-01-17 19:39 UTC (permalink / raw)
To: OMAP-Linux
Hello guys,
musb_hdrc was failing when rmmoding,
this minimmun patch fixes the problem
[PATCH] MUSB HDRC: RMMOD Fail-fixing
musb_hdrc was failing when rmmoding. This little patch
fixes the problem.
Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br>
---
Index: linux-omap-2.6/drivers/usb/musb/plat_uds.c
===================================================================
--- linux-omap-2.6.orig/drivers/usb/musb/plat_uds.c
+++ linux-omap-2.6/drivers/usb/musb/plat_uds.c
@@ -1614,3 +1614,2 @@ static void musb_free(struct musb *musb)
musb_platform_exit(musb);
- musb_writeb(musb->pRegs, MGC_O_HDRC_DEVCTL, 0);
--
Best Regards,
Felipe Balbi
felipe.lima@indt.org.br
Nokia Institute of Technology - INdT
Kernel Developers Team
+55 92 8127 0839
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MUSB HDRC: RMMOD fixing
2007-01-17 19:39 [PATCH] MUSB HDRC: RMMOD fixing Felipe Balbi
@ 2007-01-17 19:57 ` David Brownell
2007-01-17 20:28 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: David Brownell @ 2007-01-17 19:57 UTC (permalink / raw)
To: Felipe Balbi; +Cc: OMAP-Linux
On Wednesday 17 January 2007 11:39 am, Felipe Balbi wrote:
> Hello guys,
>
> musb_hdrc was failing when rmmoding,
Failing how? Last several times I tried that it worked just fine...
Of course I still have a few patches to scrub out from my queue too;
but this isn't one of them.
- Dave
> this minimmun patch fixes the problem
>
>
>
> [PATCH] MUSB HDRC: RMMOD Fail-fixing
>
> musb_hdrc was failing when rmmoding. This little patch
> fixes the problem.
>
> Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br>
> ---
>
> Index: linux-omap-2.6/drivers/usb/musb/plat_uds.c
> ===================================================================
> --- linux-omap-2.6.orig/drivers/usb/musb/plat_uds.c
> +++ linux-omap-2.6/drivers/usb/musb/plat_uds.c
> @@ -1614,3 +1614,2 @@ static void musb_free(struct musb *musb)
> musb_platform_exit(musb);
> - musb_writeb(musb->pRegs, MGC_O_HDRC_DEVCTL, 0);
>
>
>
>
>
> --
> Best Regards,
>
> Felipe Balbi
> felipe.lima@indt.org.br
>
> Nokia Institute of Technology - INdT
> Kernel Developers Team
>
> +55 92 8127 0839
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MUSB HDRC: RMMOD fixing
2007-01-17 19:57 ` David Brownell
@ 2007-01-17 20:28 ` Felipe Balbi
2007-01-18 19:39 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2007-01-17 20:28 UTC (permalink / raw)
To: ext David Brownell; +Cc: OMAP-Linux
Hi Dave,
Of course I still have a few patches to scrub out from my queue too;
> but this isn't one of them.
>
> - Dave
If you check the source code itself, you'll see musb_writeb
duplicated...
could you clarify why we need that?
Here's the code I'm talking about:
static void musb_free(struct musb *musb)
{
/* this has multiple entry modes. it handles fault cleanup after
* probe(), where things may be partially set up, as well as rmmod
* cleanup after everything's been de-activated.
*/
#ifdef CONFIG_SYSFS
device_remove_file(musb->controller, &dev_attr_mode);
device_remove_file(musb->controller, &dev_attr_cable);
#endif
#ifdef CONFIG_USB_GADGET_MUSB_HDRC
musb_gadget_cleanup(musb);
#endif
if (musb->nIrq >= 0) {
disable_irq_wake(musb->nIrq);
free_irq(musb->nIrq, musb);
}
if (is_dma_capable() && musb->pDmaController) {
struct dma_controller *c = musb->pDmaController;
(void) c->stop(c->pPrivateData);
dma_controller_factory.destroy(c);
}
musb_writeb(musb->pRegs, MGC_O_HDRC_DEVCTL, 0);
musb_platform_exit(musb);
musb_writeb(musb->pRegs, MGC_O_HDRC_DEVCTL, 0);
if (musb->clock) {
clk_disable(musb->clock);
clk_put(musb->clock);
}
#ifdef CONFIG_USB_MUSB_HDRC_HCD
usb_put_hcd(musb_to_hcd(musb));
#else
kfree(musb);
#endif
}
--
Best Regards,
Felipe Balbi
felipe.lima@indt.org.br
Nokia Institute of Technology - INdT
Kernel Developers Team
+55 92 8127 0839
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] MUSB HDRC: RMMOD fixing
2007-01-17 20:28 ` Felipe Balbi
@ 2007-01-18 19:39 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2007-01-18 19:39 UTC (permalink / raw)
To: Felipe Balbi; +Cc: OMAP-Linux
* Felipe Balbi <felipe.lima@indt.org.br> [070117 12:28]:
>
> musb_writeb(musb->pRegs, MGC_O_HDRC_DEVCTL, 0);
> musb_platform_exit(musb);
> musb_writeb(musb->pRegs, MGC_O_HDRC_DEVCTL, 0);
Basically musb_platform_exit() powers off the device so
the musb_writeb() most likely fails unless the device
happens to stay on a little while after.
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-18 19:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-17 19:39 [PATCH] MUSB HDRC: RMMOD fixing Felipe Balbi
2007-01-17 19:57 ` David Brownell
2007-01-17 20:28 ` Felipe Balbi
2007-01-18 19:39 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox