Skip to content

Commit

Permalink
3.8: fix MUSB crash on reboot
Browse files Browse the repository at this point in the history
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information
koenkooi committed Mar 16, 2013
1 parent bed676c commit f599fcd
Showing 1 changed file with 51 additions and 0 deletions.
@@ -0,0 +1,51 @@
From 56662092d7778d482d731c9aad3f0f73be36bbc2 Mon Sep 17 00:00:00 2001
From: Vladimir Pantelic <vladimir@lgf.net>
Date: Fri, 15 Mar 2013 23:33:31 +0100
Subject: [PATCH 10/10] make sure we register/unregister the NOP xceiver only
once

Signed-off-by: Vladimir Pantelic <vladimir@lgf.net>
---
drivers/usb/musb/musb_dsps.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 85a4502..077c1e7 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -417,7 +417,9 @@ static int dsps_musb_init(struct musb *musb)

#if 1
/* NOP driver needs change if supporting dual instance */
- usb_nop_xceiv_register();
+ if(!pdev->id) {
+ usb_nop_xceiv_register();
+ }
musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
#else
/* Get the NOP PHY */
@@ -462,7 +464,9 @@ static int dsps_musb_init(struct musb *musb)
return 0;
err0:
usb_put_phy(musb->xceiv);
- usb_nop_xceiv_unregister();
+ if(!pdev->id) {
+ usb_nop_xceiv_unregister();
+ }
return status;
}

@@ -479,7 +483,9 @@ static int dsps_musb_exit(struct musb *musb)

/* NOP driver needs change if supporting dual instance */
usb_put_phy(musb->xceiv);
- usb_nop_xceiv_unregister();
+ if(!pdev->id) {
+ usb_nop_xceiv_unregister();
+ }

return 0;
}
--
1.8.1.4

0 comments on commit f599fcd

Please sign in to comment.