From f599fcdc269b3faa5ecf0746c331e63e2f9e0a38 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 16 Mar 2013 09:06:01 +0100 Subject: [PATCH] 3.8: fix MUSB crash on reboot Signed-off-by: Koen Kooi --- ...ister-unregister-the-NOP-xceiver-onl.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 patches/usb/0010-make-sure-we-register-unregister-the-NOP-xceiver-onl.patch diff --git a/patches/usb/0010-make-sure-we-register-unregister-the-NOP-xceiver-onl.patch b/patches/usb/0010-make-sure-we-register-unregister-the-NOP-xceiver-onl.patch new file mode 100644 index 00000000..7f667f93 --- /dev/null +++ b/patches/usb/0010-make-sure-we-register-unregister-the-NOP-xceiver-onl.patch @@ -0,0 +1,51 @@ +From 56662092d7778d482d731c9aad3f0f73be36bbc2 Mon Sep 17 00:00:00 2001 +From: Vladimir Pantelic +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 +--- + 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 +