MUSB HDRC: RMMOD fixing
Subsystems (2)
PATCH 1/1 MUSB HDRC: RMMOD fixing
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.
---
drivers/usb/musb/plat_uds.c +0 -1
@@ -1614,3 +1614,2 @@ static void musb_free(struct musb *musb)musb_platform_exit (musb); -musb_writeb (musb->pRegs,MGC_O_HDRC_DEVCTL ,0 );
Signature · 9 lines
Best Regards, Felipe Balbi [email protected] Nokia Institute of Technology - INdT Kernel Developers Team +55 92 8127 0839
Quoted 3 lines · Felipe Balbi
Hello guys,
musb_hdrcwas 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
Quoted 35 lines
this minimmun patch fixes the problem
[PATCH] MUSB HDRC: RMMOD Fail-fixing
musb_hdrcwas failing when rmmoding. This little patch fixes the problem.Signed-off-by Felipe Balbi <[email protected]>---
Index:
linux-omap-2.6/drivers/usb/musb/plat_uds.c
===================================================================drivers/usb/musb/plat_uds.c +0
-1@@ -1614,3 +1614,2 @@ static void musb_free(struct musb *musb)musb_platform_exit (musb); -musb_writeb (musb->pRegs,MGC_O_HDRC_DEVCTL ,0 );Signature · 10 lines
-- Best Regards, Felipe Balbi [email protected] Nokia Institute of Technology - INdT Kernel Developers Team +55 92 8127 0839
Hi Dave,
Of course I still have a few patches to scrub out from my queue too;
Quoted 3 lines
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
}
Signature · 9 lines
Best Regards, Felipe Balbi [email protected] Nokia Institute of Technology - INdT Kernel Developers Team +55 92 8127 0839
Quoted 4 lines · Felipe Balbi
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