usb: fixes for v3.12-rc4

Here are some more fixes to musb's OTG support and a regression
 caused on latest merge window; pxa25x_udc and gpio-vbus learned
 to cope with deferred probe; s3c-hsotg got a fix for non-periodic
 endpoints write size and f_fs got an error handling fix for cases
 where ffs_do_descs() fail.
 
 Signed-of-by: Felipe Balbi <balbi@ti.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSStwTAAoJEIaOsuA1yqREpMgP/2BbaC0hCO3wA6NPul2drke2
 lb1yKU9bKhk3R0McRWhV9iJGjStpIBYLlbE66sjAvu2r53JktMysb6xPwnPwgNPK
 RabFpQnNiS/voyaAKyLq69WIPC9dfT/LwUXS4NouwTgEjPJuYs3La69NJRZlHx8A
 iFXsQtgS2h6gIKm2r71TYamgO/jYmwZsetpwOrjCz1AlTt/6wjy5ilQthHs+F0de
 iNFRsvRYyuMO2BEmqI286U7FWPK4FAO3bsqwP4EWZ7VqTLBBHqxFA3jscbeidbB4
 U6qRbekMfYCrYjYkKwuQAsFpvt6WHh8peCsWLxJ9SnyugwcXG4UwimP4qqkS6GhC
 VJpyYhE8AAHiPnXSigEFUPo3uwcylXdwg3viybezlSI/7X/NlQvhGWJZBDdSESS2
 ThieH2sFuqtk5XkG8lXySCeab/qp3NUNVVJf81G0sIjsgU2kmkTkE9913ird0kN8
 k+fkggtrK5YqbPoEIhhIdhwloyM6dxL3pLe3LHCwkyZ8Aeze8Wv1nd31OHWU1uVh
 ZjHA202MzpkHnj2gykzKS808h12S8czzIe5jTyiPPAwOz87DIxx64MqG2OGM8Rtv
 +/N+E3K/b0//Fg/GGFN2du+7SrRW4U8cAhBX9mh9j9eI2X9Yd3HclviSNM9lVTcN
 iCIY3ivMFg29aTVFIYFC
 =BQeb
 -----END PGP SIGNATURE-----

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

Felipe writes:

usb: fixes for v3.12-rc4

Here are some more fixes to musb's OTG support and a regression
caused on latest merge window; pxa25x_udc and gpio-vbus learned
to cope with deferred probe; s3c-hsotg got a fix for non-periodic
endpoints write size and f_fs got an error handling fix for cases
where ffs_do_descs() fail.

Signed-of-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Greg Kroah-Hartman 2013-10-01 14:22:05 -07:00
commit bdd78f22ff
6 changed files with 20 additions and 12 deletions

View File

@ -2256,6 +2256,8 @@ static int ffs_func_bind(struct usb_configuration *c,
data->raw_descs + ret,
(sizeof data->raw_descs) - ret,
__ffs_func_bind_do_descs, func);
if (unlikely(ret < 0))
goto error;
}
/*

View File

@ -2054,7 +2054,7 @@ static struct pxa25x_udc memory = {
/*
* probe - binds to the platform device
*/
static int __init pxa25x_udc_probe(struct platform_device *pdev)
static int pxa25x_udc_probe(struct platform_device *pdev)
{
struct pxa25x_udc *dev = &memory;
int retval, irq;
@ -2203,7 +2203,7 @@ static void pxa25x_udc_shutdown(struct platform_device *_dev)
pullup_off();
}
static int __exit pxa25x_udc_remove(struct platform_device *pdev)
static int pxa25x_udc_remove(struct platform_device *pdev)
{
struct pxa25x_udc *dev = platform_get_drvdata(pdev);
@ -2294,7 +2294,8 @@ static int pxa25x_udc_resume(struct platform_device *dev)
static struct platform_driver udc_driver = {
.shutdown = pxa25x_udc_shutdown,
.remove = __exit_p(pxa25x_udc_remove),
.probe = pxa25x_udc_probe,
.remove = pxa25x_udc_remove,
.suspend = pxa25x_udc_suspend,
.resume = pxa25x_udc_resume,
.driver = {
@ -2303,7 +2304,7 @@ static struct platform_driver udc_driver = {
},
};
module_platform_driver_probe(udc_driver, pxa25x_udc_probe);
module_platform_driver(udc_driver);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell");

View File

@ -543,7 +543,7 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg,
* FIFO, requests of >512 cause the endpoint to get stuck with a
* fragment of the end of the transfer in it.
*/
if (can_write > 512)
if (can_write > 512 && !periodic)
can_write = 512;
/*

View File

@ -535,6 +535,9 @@ static int dsps_probe(struct platform_device *pdev)
struct dsps_glue *glue;
int ret;
if (!strcmp(pdev->name, "musb-hdrc"))
return -ENODEV;
match = of_match_node(musb_dsps_of_match, pdev->dev.of_node);
if (!match) {
dev_err(&pdev->dev, "fail to get matching of_match struct\n");

View File

@ -1790,6 +1790,10 @@ int musb_gadget_setup(struct musb *musb)
musb->g.max_speed = USB_SPEED_HIGH;
musb->g.speed = USB_SPEED_UNKNOWN;
MUSB_DEV_MODE(musb);
musb->xceiv->otg->default_a = 0;
musb->xceiv->state = OTG_STATE_B_IDLE;
/* this "gadget" abstracts/virtualizes the controller */
musb->g.name = musb_driver_name;
musb->g.is_otg = 1;
@ -1849,7 +1853,6 @@ static int musb_gadget_start(struct usb_gadget *g,
musb->gadget_driver = driver;
spin_lock_irqsave(&musb->lock, flags);
musb->is_active = 1;
otg_set_peripheral(otg, &musb->g);
musb->xceiv->state = OTG_STATE_B_IDLE;

View File

@ -241,7 +241,7 @@ static int gpio_vbus_set_suspend(struct usb_phy *phy, int suspend)
/* platform driver interface */
static int __init gpio_vbus_probe(struct platform_device *pdev)
static int gpio_vbus_probe(struct platform_device *pdev)
{
struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev);
struct gpio_vbus_data *gpio_vbus;
@ -349,7 +349,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev)
return err;
}
static int __exit gpio_vbus_remove(struct platform_device *pdev)
static int gpio_vbus_remove(struct platform_device *pdev)
{
struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev);
struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev);
@ -398,8 +398,6 @@ static const struct dev_pm_ops gpio_vbus_dev_pm_ops = {
};
#endif
/* NOTE: the gpio-vbus device may *NOT* be hotplugged */
MODULE_ALIAS("platform:gpio-vbus");
static struct platform_driver gpio_vbus_driver = {
@ -410,10 +408,11 @@ static struct platform_driver gpio_vbus_driver = {
.pm = &gpio_vbus_dev_pm_ops,
#endif
},
.remove = __exit_p(gpio_vbus_remove),
.probe = gpio_vbus_probe,
.remove = gpio_vbus_remove,
};
module_platform_driver_probe(gpio_vbus_driver, gpio_vbus_probe);
module_platform_driver(gpio_vbus_driver);
MODULE_DESCRIPTION("simple GPIO controlled OTG transceiver driver");
MODULE_AUTHOR("Philipp Zabel");