Skip to content

Commit 4ed5476

Browse files
committed
Merge tag 'usb-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are none fixes for various USB driver problems. The majority are gadget/musb fixes, but there are some new device ids in here as well" * tag 'usb-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: chipidea: add Intel Clovertrail pci id usb: gadget: s3c-hsotg: fix can_write limit for non-periodic endpoints usb: gadget: f_fs: fix error handling usb: musb: dsps: do not bind to "musb-hdrc" USB: serial: option: Ignore card reader interface on Huawei E1750 usb: musb: gadget: fix otg active status flag usb: phy: gpio-vbus: fix deferred probe from __init usb: gadget: pxa25x_udc: fix deferred probe from __init usb: musb: fix otg default state
2 parents e3757a1 + a214339 commit 4ed5476

File tree

8 files changed

+29
-13
lines changed

8 files changed

+29
-13
lines changed

drivers/usb/chipidea/ci_hdrc_pci.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,12 @@ static DEFINE_PCI_DEVICE_TABLE(ci_hdrc_pci_id_table) = {
129129
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0829),
130130
.driver_data = (kernel_ulong_t)&penwell_pci_platdata,
131131
},
132-
{ 0, 0, 0, 0, 0, 0, 0 /* end: all zeroes */ }
132+
{
133+
/* Intel Clovertrail */
134+
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe006),
135+
.driver_data = (kernel_ulong_t)&penwell_pci_platdata,
136+
},
137+
{ 0 } /* end: all zeroes */
133138
};
134139
MODULE_DEVICE_TABLE(pci, ci_hdrc_pci_id_table);
135140

drivers/usb/gadget/f_fs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,6 +2256,8 @@ static int ffs_func_bind(struct usb_configuration *c,
22562256
data->raw_descs + ret,
22572257
(sizeof data->raw_descs) - ret,
22582258
__ffs_func_bind_do_descs, func);
2259+
if (unlikely(ret < 0))
2260+
goto error;
22592261
}
22602262

22612263
/*

drivers/usb/gadget/pxa25x_udc.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,7 +2054,7 @@ static struct pxa25x_udc memory = {
20542054
/*
20552055
* probe - binds to the platform device
20562056
*/
2057-
static int __init pxa25x_udc_probe(struct platform_device *pdev)
2057+
static int pxa25x_udc_probe(struct platform_device *pdev)
20582058
{
20592059
struct pxa25x_udc *dev = &memory;
20602060
int retval, irq;
@@ -2203,7 +2203,7 @@ static void pxa25x_udc_shutdown(struct platform_device *_dev)
22032203
pullup_off();
22042204
}
22052205

2206-
static int __exit pxa25x_udc_remove(struct platform_device *pdev)
2206+
static int pxa25x_udc_remove(struct platform_device *pdev)
22072207
{
22082208
struct pxa25x_udc *dev = platform_get_drvdata(pdev);
22092209

@@ -2294,7 +2294,8 @@ static int pxa25x_udc_resume(struct platform_device *dev)
22942294

22952295
static struct platform_driver udc_driver = {
22962296
.shutdown = pxa25x_udc_shutdown,
2297-
.remove = __exit_p(pxa25x_udc_remove),
2297+
.probe = pxa25x_udc_probe,
2298+
.remove = pxa25x_udc_remove,
22982299
.suspend = pxa25x_udc_suspend,
22992300
.resume = pxa25x_udc_resume,
23002301
.driver = {
@@ -2303,7 +2304,7 @@ static struct platform_driver udc_driver = {
23032304
},
23042305
};
23052306

2306-
module_platform_driver_probe(udc_driver, pxa25x_udc_probe);
2307+
module_platform_driver(udc_driver);
23072308

23082309
MODULE_DESCRIPTION(DRIVER_DESC);
23092310
MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell");

drivers/usb/gadget/s3c-hsotg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg,
543543
* FIFO, requests of >512 cause the endpoint to get stuck with a
544544
* fragment of the end of the transfer in it.
545545
*/
546-
if (can_write > 512)
546+
if (can_write > 512 && !periodic)
547547
can_write = 512;
548548

549549
/*

drivers/usb/musb/musb_dsps.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,9 @@ static int dsps_probe(struct platform_device *pdev)
535535
struct dsps_glue *glue;
536536
int ret;
537537

538+
if (!strcmp(pdev->name, "musb-hdrc"))
539+
return -ENODEV;
540+
538541
match = of_match_node(musb_dsps_of_match, pdev->dev.of_node);
539542
if (!match) {
540543
dev_err(&pdev->dev, "fail to get matching of_match struct\n");

drivers/usb/musb/musb_gadget.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1790,6 +1790,10 @@ int musb_gadget_setup(struct musb *musb)
17901790
musb->g.max_speed = USB_SPEED_HIGH;
17911791
musb->g.speed = USB_SPEED_UNKNOWN;
17921792

1793+
MUSB_DEV_MODE(musb);
1794+
musb->xceiv->otg->default_a = 0;
1795+
musb->xceiv->state = OTG_STATE_B_IDLE;
1796+
17931797
/* this "gadget" abstracts/virtualizes the controller */
17941798
musb->g.name = musb_driver_name;
17951799
musb->g.is_otg = 1;
@@ -1849,7 +1853,6 @@ static int musb_gadget_start(struct usb_gadget *g,
18491853
musb->gadget_driver = driver;
18501854

18511855
spin_lock_irqsave(&musb->lock, flags);
1852-
musb->is_active = 1;
18531856

18541857
otg_set_peripheral(otg, &musb->g);
18551858
musb->xceiv->state = OTG_STATE_B_IDLE;

drivers/usb/phy/phy-gpio-vbus-usb.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static int gpio_vbus_set_suspend(struct usb_phy *phy, int suspend)
241241

242242
/* platform driver interface */
243243

244-
static int __init gpio_vbus_probe(struct platform_device *pdev)
244+
static int gpio_vbus_probe(struct platform_device *pdev)
245245
{
246246
struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev);
247247
struct gpio_vbus_data *gpio_vbus;
@@ -349,7 +349,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev)
349349
return err;
350350
}
351351

352-
static int __exit gpio_vbus_remove(struct platform_device *pdev)
352+
static int gpio_vbus_remove(struct platform_device *pdev)
353353
{
354354
struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev);
355355
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 = {
398398
};
399399
#endif
400400

401-
/* NOTE: the gpio-vbus device may *NOT* be hotplugged */
402-
403401
MODULE_ALIAS("platform:gpio-vbus");
404402

405403
static struct platform_driver gpio_vbus_driver = {
@@ -410,10 +408,11 @@ static struct platform_driver gpio_vbus_driver = {
410408
.pm = &gpio_vbus_dev_pm_ops,
411409
#endif
412410
},
413-
.remove = __exit_p(gpio_vbus_remove),
411+
.probe = gpio_vbus_probe,
412+
.remove = gpio_vbus_remove,
414413
};
415414

416-
module_platform_driver_probe(gpio_vbus_driver, gpio_vbus_probe);
415+
module_platform_driver(gpio_vbus_driver);
417416

418417
MODULE_DESCRIPTION("simple GPIO controlled OTG transceiver driver");
419418
MODULE_AUTHOR("Philipp Zabel");

drivers/usb/serial/option.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static void option_instat_callback(struct urb *urb);
8181

8282
#define HUAWEI_VENDOR_ID 0x12D1
8383
#define HUAWEI_PRODUCT_E173 0x140C
84+
#define HUAWEI_PRODUCT_E1750 0x1406
8485
#define HUAWEI_PRODUCT_K4505 0x1464
8586
#define HUAWEI_PRODUCT_K3765 0x1465
8687
#define HUAWEI_PRODUCT_K4605 0x14C6
@@ -567,6 +568,8 @@ static const struct usb_device_id option_ids[] = {
567568
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) },
568569
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff),
569570
.driver_info = (kernel_ulong_t) &net_intf1_blacklist },
571+
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1750, 0xff, 0xff, 0xff),
572+
.driver_info = (kernel_ulong_t) &net_intf2_blacklist },
570573
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1441, USB_CLASS_COMM, 0x02, 0xff) },
571574
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1442, USB_CLASS_COMM, 0x02, 0xff) },
572575
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff),

0 commit comments

Comments
 (0)