usb: fixes for v3.6-rc1

Here are three fixes for v3.6-rc1. All on the MUSB driver and
 quite obvious. First there's a Kconfig change which was missed
 earlier, then there is a fix for the usage of the resource name
 and lastly a fix for pm_runtime usage and device initialization.
 
 The last fix is rather critical as it can end up in situations
 where we try to access device's register with clocks disabled,
 which will cause a Data Abort exception (on ARM).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQG5VwAAoJEIaOsuA1yqREa6YP/ROmLh9WlwNhDiw8Rdpimwn1
 /03nZGkogwaFQwy2O7sHcJqcZABSG0V+5IrI1kU2R8pZVtKcAS6kxYSMazxhmKl7
 ByyUv0xBHCjzm3M9mSfW0RrM+Kjo/bC+nVgfVOCrFZMrCnCNHj8013lm2RA5S4Vw
 cAKQFXfb80Bd6yqic78+9oOvN4Dy7ikOYDEuNQSfpG8T1r8hD2kMeiCmlAsTDdKs
 xiCfYvoNx87etwa77vlAG+lCdflREtouIG3/egLaW78MouF4vkGlMu2Zy2P+m+gW
 1DY2TUJlW/Olbj+NrLgfpXRsJTE7PgusKVO74E5xAf28tu01/Pg3rmPP2/6C1Ioz
 rNcVecsxAqYXwW3MU9kxfIMRBKOT7CYzVB+7S8wOmfyVCgetZcDuOq70WJ5iBllp
 d+kp5yRkP/3OZLq6LbvWYakeptpCz9anGpryBiEZEwvHoA37V5lCbKE6poyHNtyI
 0xvDJi++YzXn9gSZ0q9F4xsFtuMyFBfn9q+KIAwT6/R4+DiIQ3u+Gom4eQWYKroo
 566bmYRvlgQcrcQ8GVg1u2IouM/fehaLWFMGWOD3HHpFh2YobsJOhiBuyBG9he08
 PpZI7WWLPYlem8nO2qqBdn3kD6+c6JgpW7UdheQ4MjHhJ7MIutBuaodN4wdc/ZkJ
 p3KjRLp8kYe7rpucpI2K
 =bAd9
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

usb: fixes for v3.6-rc1

Here are three fixes for v3.6-rc1. All on the MUSB driver and
quite obvious. First there's a Kconfig change which was missed
earlier, then there is a fix for the usage of the resource name
and lastly a fix for pm_runtime usage and device initialization.

The last fix is rather critical as it can end up in situations
where we try to access device's register with clocks disabled,
which will cause a Data Abort exception (on ARM).
This commit is contained in:
Greg Kroah-Hartman 2012-08-07 17:07:35 -07:00
commit 010ccce0fa
2 changed files with 12 additions and 11 deletions

View File

@ -8,7 +8,7 @@ config USB_MUSB_HDRC
tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
depends on USB && USB_GADGET
select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
select NOP_USB_XCEIV if (SOC_OMAPTI81XX || SOC_OMAPAM33XX)
select NOP_USB_XCEIV if (SOC_TI81XX || SOC_AM33XX)
select TWL4030_USB if MACH_OMAP_3430SDP
select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
select USB_OTG_UTILS
@ -57,7 +57,7 @@ config USB_MUSB_AM35X
config USB_MUSB_DSPS
tristate "TI DSPS platforms"
depends on SOC_OMAPTI81XX || SOC_OMAPAM33XX
depends on SOC_TI81XX || SOC_AM33XX
config USB_MUSB_BLACKFIN
tristate "Blackfin"

View File

@ -479,9 +479,9 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id)
ret = -ENODEV;
goto err0;
}
strcpy((u8 *)res->name, "mc");
res->parent = NULL;
resources[1] = *res;
resources[1].name = "mc";
/* allocate the child platform device */
musb = platform_device_alloc("musb-hdrc", -1);
@ -566,27 +566,28 @@ static int __devinit dsps_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, glue);
/* create the child platform device for first instances of musb */
ret = dsps_create_musb_pdev(glue, 0);
if (ret != 0) {
dev_err(&pdev->dev, "failed to create child pdev\n");
goto err2;
}
/* enable the usbss clocks */
pm_runtime_enable(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0) {
dev_err(&pdev->dev, "pm_runtime_get_sync FAILED");
goto err2;
}
/* create the child platform device for first instances of musb */
ret = dsps_create_musb_pdev(glue, 0);
if (ret != 0) {
dev_err(&pdev->dev, "failed to create child pdev\n");
goto err3;
}
return 0;
err3:
pm_runtime_disable(&pdev->dev);
pm_runtime_put(&pdev->dev);
err2:
pm_runtime_disable(&pdev->dev);
kfree(glue->wrp);
err1:
kfree(glue);