aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/Kconfig6
-rw-r--r--drivers/usb/core/driver.c7
-rw-r--r--drivers/usb/gadget/imx_udc.c2
-rw-r--r--drivers/usb/gadget/langwell_udc.c4
-rw-r--r--drivers/usb/gadget/storage_common.c7
-rw-r--r--drivers/usb/host/fhci-hcd.c4
-rw-r--r--drivers/usb/host/fhci-tds.c4
-rw-r--r--drivers/usb/host/imx21-hcd.c2
-rw-r--r--drivers/usb/host/oxu210hp-hcd.c2
-rw-r--r--drivers/usb/misc/adutux.c2
-rw-r--r--drivers/usb/misc/iowarrior.c2
-rw-r--r--drivers/usb/misc/ldusb.c2
-rw-r--r--drivers/usb/musb/musb_debugfs.c1
-rw-r--r--drivers/usb/musb/musb_gadget.c4
-rw-r--r--drivers/usb/serial/option.c1
-rw-r--r--drivers/usb/wusbcore/wa-rpipe.c2
16 files changed, 23 insertions, 29 deletions
diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig
index bcc24779ba0e..18d02e32a3d5 100644
--- a/drivers/usb/core/Kconfig
+++ b/drivers/usb/core/Kconfig
@@ -123,9 +123,9 @@ config USB_OTG
123 123
124config USB_OTG_WHITELIST 124config USB_OTG_WHITELIST
125 bool "Rely on OTG Targeted Peripherals List" 125 bool "Rely on OTG Targeted Peripherals List"
126 depends on USB_OTG || EMBEDDED 126 depends on USB_OTG || EXPERT
127 default y if USB_OTG 127 default y if USB_OTG
128 default n if EMBEDDED 128 default n if EXPERT
129 help 129 help
130 If you say Y here, the "otg_whitelist.h" file will be used as a 130 If you say Y here, the "otg_whitelist.h" file will be used as a
131 product whitelist, so USB peripherals not listed there will be 131 product whitelist, so USB peripherals not listed there will be
@@ -141,7 +141,7 @@ config USB_OTG_WHITELIST
141 141
142config USB_OTG_BLACKLIST_HUB 142config USB_OTG_BLACKLIST_HUB
143 bool "Disable external hubs" 143 bool "Disable external hubs"
144 depends on USB_OTG || EMBEDDED 144 depends on USB_OTG || EXPERT
145 help 145 help
146 If you say Y here, then Linux will refuse to enumerate 146 If you say Y here, then Linux will refuse to enumerate
147 external hubs. OTG hosts are allowed to reduce hardware 147 external hubs. OTG hosts are allowed to reduce hardware
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index b9278a1fb9e5..fca61720b873 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -375,7 +375,7 @@ static int usb_unbind_interface(struct device *dev)
375 * Just re-enable it without affecting the endpoint toggles. 375 * Just re-enable it without affecting the endpoint toggles.
376 */ 376 */
377 usb_enable_interface(udev, intf, false); 377 usb_enable_interface(udev, intf, false);
378 } else if (!error && intf->dev.power.status == DPM_ON) { 378 } else if (!error && !intf->dev.power.in_suspend) {
379 r = usb_set_interface(udev, intf->altsetting[0]. 379 r = usb_set_interface(udev, intf->altsetting[0].
380 desc.bInterfaceNumber, 0); 380 desc.bInterfaceNumber, 0);
381 if (r < 0) 381 if (r < 0)
@@ -960,7 +960,7 @@ void usb_rebind_intf(struct usb_interface *intf)
960 } 960 }
961 961
962 /* Try to rebind the interface */ 962 /* Try to rebind the interface */
963 if (intf->dev.power.status == DPM_ON) { 963 if (!intf->dev.power.in_suspend) {
964 intf->needs_binding = 0; 964 intf->needs_binding = 0;
965 rc = device_attach(&intf->dev); 965 rc = device_attach(&intf->dev);
966 if (rc < 0) 966 if (rc < 0)
@@ -1107,8 +1107,7 @@ static int usb_resume_interface(struct usb_device *udev,
1107 if (intf->condition == USB_INTERFACE_UNBOUND) { 1107 if (intf->condition == USB_INTERFACE_UNBOUND) {
1108 1108
1109 /* Carry out a deferred switch to altsetting 0 */ 1109 /* Carry out a deferred switch to altsetting 0 */
1110 if (intf->needs_altsetting0 && 1110 if (intf->needs_altsetting0 && !intf->dev.power.in_suspend) {
1111 intf->dev.power.status == DPM_ON) {
1112 usb_set_interface(udev, intf->altsetting[0]. 1111 usb_set_interface(udev, intf->altsetting[0].
1113 desc.bInterfaceNumber, 0); 1112 desc.bInterfaceNumber, 0);
1114 intf->needs_altsetting0 = 0; 1113 intf->needs_altsetting0 = 0;
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c
index 1210534822d6..5408186afc35 100644
--- a/drivers/usb/gadget/imx_udc.c
+++ b/drivers/usb/gadget/imx_udc.c
@@ -1320,7 +1320,7 @@ static struct imx_udc_struct controller = {
1320}; 1320};
1321 1321
1322/******************************************************************************* 1322/*******************************************************************************
1323 * USB gadged driver functions 1323 * USB gadget driver functions
1324 ******************************************************************************* 1324 *******************************************************************************
1325 */ 1325 */
1326int usb_gadget_probe_driver(struct usb_gadget_driver *driver, 1326int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c
index 777972454e3e..1eca8b47ce3c 100644
--- a/drivers/usb/gadget/langwell_udc.c
+++ b/drivers/usb/gadget/langwell_udc.c
@@ -3086,7 +3086,7 @@ static void langwell_udc_remove(struct pci_dev *pdev)
3086 3086
3087 kfree(dev->ep); 3087 kfree(dev->ep);
3088 3088
3089 /* diable IRQ handler */ 3089 /* disable IRQ handler */
3090 if (dev->got_irq) 3090 if (dev->got_irq)
3091 free_irq(pdev->irq, dev); 3091 free_irq(pdev->irq, dev);
3092 3092
@@ -3406,7 +3406,7 @@ static int langwell_udc_suspend(struct pci_dev *pdev, pm_message_t state)
3406 /* disable interrupt and set controller to stop state */ 3406 /* disable interrupt and set controller to stop state */
3407 langwell_udc_stop(dev); 3407 langwell_udc_stop(dev);
3408 3408
3409 /* diable IRQ handler */ 3409 /* disable IRQ handler */
3410 if (dev->got_irq) 3410 if (dev->got_irq)
3411 free_irq(pdev->irq, dev); 3411 free_irq(pdev->irq, dev);
3412 dev->got_irq = 0; 3412 dev->got_irq = 0;
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index 3b513bafaf2a..b015561fd602 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -543,7 +543,7 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
543 ro = curlun->initially_ro; 543 ro = curlun->initially_ro;
544 if (!ro) { 544 if (!ro) {
545 filp = filp_open(filename, O_RDWR | O_LARGEFILE, 0); 545 filp = filp_open(filename, O_RDWR | O_LARGEFILE, 0);
546 if (-EROFS == PTR_ERR(filp)) 546 if (PTR_ERR(filp) == -EROFS || PTR_ERR(filp) == -EACCES)
547 ro = 1; 547 ro = 1;
548 } 548 }
549 if (ro) 549 if (ro)
@@ -558,10 +558,7 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
558 558
559 if (filp->f_path.dentry) 559 if (filp->f_path.dentry)
560 inode = filp->f_path.dentry->d_inode; 560 inode = filp->f_path.dentry->d_inode;
561 if (inode && S_ISBLK(inode->i_mode)) { 561 if (!inode || (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))) {
562 if (bdev_read_only(inode->i_bdev))
563 ro = 1;
564 } else if (!inode || !S_ISREG(inode->i_mode)) {
565 LINFO(curlun, "invalid file type: %s\n", filename); 562 LINFO(curlun, "invalid file type: %s\n", filename);
566 goto out; 563 goto out;
567 } 564 }
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index 20092a27a1e8..12fd184226f2 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -98,13 +98,13 @@ void fhci_usb_enable_interrupt(struct fhci_usb *usb)
98 usb->intr_nesting_cnt--; 98 usb->intr_nesting_cnt--;
99} 99}
100 100
101/* diable the usb interrupt */ 101/* disable the usb interrupt */
102void fhci_usb_disable_interrupt(struct fhci_usb *usb) 102void fhci_usb_disable_interrupt(struct fhci_usb *usb)
103{ 103{
104 struct fhci_hcd *fhci = usb->fhci; 104 struct fhci_hcd *fhci = usb->fhci;
105 105
106 if (usb->intr_nesting_cnt == 0) { 106 if (usb->intr_nesting_cnt == 0) {
107 /* diable the timer interrupt */ 107 /* disable the timer interrupt */
108 disable_irq_nosync(fhci->timer->irq); 108 disable_irq_nosync(fhci->timer->irq);
109 109
110 /* disable the usb interrupt */ 110 /* disable the usb interrupt */
diff --git a/drivers/usb/host/fhci-tds.c b/drivers/usb/host/fhci-tds.c
index 7be548ca2183..38fe058fbe61 100644
--- a/drivers/usb/host/fhci-tds.c
+++ b/drivers/usb/host/fhci-tds.c
@@ -271,8 +271,8 @@ void fhci_init_ep_registers(struct fhci_usb *usb, struct endpoint *ep,
271 271
272/* 272/*
273 * Collect the submitted frames and inform the application about them 273 * Collect the submitted frames and inform the application about them
274 * It is also prepearing the TDs for new frames. If the Tx interrupts 274 * It is also preparing the TDs for new frames. If the Tx interrupts
275 * are diabled, the application should call that routine to get 275 * are disabled, the application should call that routine to get
276 * confirmation about the submitted frames. Otherwise, the routine is 276 * confirmation about the submitted frames. Otherwise, the routine is
277 * called frome the interrupt service routine during the Tx interrupt. 277 * called frome the interrupt service routine during the Tx interrupt.
278 * In that case the application is informed by calling the application 278 * In that case the application is informed by calling the application
diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c
index e49b75a78000..f90d003f2302 100644
--- a/drivers/usb/host/imx21-hcd.c
+++ b/drivers/usb/host/imx21-hcd.c
@@ -1658,7 +1658,7 @@ static int imx21_hc_reset(struct usb_hcd *hcd)
1658 1658
1659 spin_lock_irqsave(&imx21->lock, flags); 1659 spin_lock_irqsave(&imx21->lock, flags);
1660 1660
1661 /* Reset the Host controler modules */ 1661 /* Reset the Host controller modules */
1662 writel(USBOTG_RST_RSTCTRL | USBOTG_RST_RSTRH | 1662 writel(USBOTG_RST_RSTCTRL | USBOTG_RST_RSTRH |
1663 USBOTG_RST_RSTHSIE | USBOTG_RST_RSTHC, 1663 USBOTG_RST_RSTHSIE | USBOTG_RST_RSTHC,
1664 imx21->regs + USBOTG_RST_CTRL); 1664 imx21->regs + USBOTG_RST_CTRL);
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 32149be4ad8e..e0cb12b573f9 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -3094,7 +3094,7 @@ static int oxu_hub_status_data(struct usb_hcd *hcd, char *buf)
3094 3094
3095 /* Some boards (mostly VIA?) report bogus overcurrent indications, 3095 /* Some boards (mostly VIA?) report bogus overcurrent indications,
3096 * causing massive log spam unless we completely ignore them. It 3096 * causing massive log spam unless we completely ignore them. It
3097 * may be relevant that VIA VT8235 controlers, where PORT_POWER is 3097 * may be relevant that VIA VT8235 controllers, where PORT_POWER is
3098 * always set, seem to clear PORT_OCC and PORT_CSC when writing to 3098 * always set, seem to clear PORT_OCC and PORT_CSC when writing to
3099 * PORT_POWER; that's surprising, but maybe within-spec. 3099 * PORT_POWER; that's surprising, but maybe within-spec.
3100 */ 3100 */
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index 44f8b9225054..a6afd15f6a46 100644
--- a/drivers/usb/misc/adutux.c
+++ b/drivers/usb/misc/adutux.c
@@ -717,7 +717,7 @@ static int adu_probe(struct usb_interface *interface,
717 goto exit; 717 goto exit;
718 } 718 }
719 719
720 /* allocate memory for our device state and intialize it */ 720 /* allocate memory for our device state and initialize it */
721 dev = kzalloc(sizeof(struct adu_device), GFP_KERNEL); 721 dev = kzalloc(sizeof(struct adu_device), GFP_KERNEL);
722 if (dev == NULL) { 722 if (dev == NULL) {
723 dev_err(&interface->dev, "Out of memory\n"); 723 dev_err(&interface->dev, "Out of memory\n");
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index c9078e4e1f4d..e573e4704015 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -769,7 +769,7 @@ static int iowarrior_probe(struct usb_interface *interface,
769 int i; 769 int i;
770 int retval = -ENOMEM; 770 int retval = -ENOMEM;
771 771
772 /* allocate memory for our device state and intialize it */ 772 /* allocate memory for our device state and initialize it */
773 dev = kzalloc(sizeof(struct iowarrior), GFP_KERNEL); 773 dev = kzalloc(sizeof(struct iowarrior), GFP_KERNEL);
774 if (dev == NULL) { 774 if (dev == NULL) {
775 dev_err(&interface->dev, "Out of memory\n"); 775 dev_err(&interface->dev, "Out of memory\n");
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index edffef642337..eefb8275bb7e 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -642,7 +642,7 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *
642 int i; 642 int i;
643 int retval = -ENOMEM; 643 int retval = -ENOMEM;
644 644
645 /* allocate memory for our device state and intialize it */ 645 /* allocate memory for our device state and initialize it */
646 646
647 dev = kzalloc(sizeof(*dev), GFP_KERNEL); 647 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
648 if (dev == NULL) { 648 if (dev == NULL) {
diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c
index 9e8639d4e862..b0176e4569e0 100644
--- a/drivers/usb/musb/musb_debugfs.c
+++ b/drivers/usb/musb/musb_debugfs.c
@@ -36,7 +36,6 @@
36#include <linux/sched.h> 36#include <linux/sched.h>
37#include <linux/init.h> 37#include <linux/init.h>
38#include <linux/list.h> 38#include <linux/list.h>
39#include <linux/kobject.h>
40#include <linux/platform_device.h> 39#include <linux/platform_device.h>
41#include <linux/io.h> 40#include <linux/io.h>
42#include <linux/debugfs.h> 41#include <linux/debugfs.h>
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 9b162dfaa4fb..ed58c6c8f15c 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1684,7 +1684,7 @@ static inline void __init musb_g_init_endpoints(struct musb *musb)
1684 struct musb_hw_ep *hw_ep; 1684 struct musb_hw_ep *hw_ep;
1685 unsigned count = 0; 1685 unsigned count = 0;
1686 1686
1687 /* intialize endpoint list just once */ 1687 /* initialize endpoint list just once */
1688 INIT_LIST_HEAD(&(musb->g.ep_list)); 1688 INIT_LIST_HEAD(&(musb->g.ep_list));
1689 1689
1690 for (epnum = 0, hw_ep = musb->endpoints; 1690 for (epnum = 0, hw_ep = musb->endpoints;
@@ -1765,7 +1765,7 @@ void musb_gadget_cleanup(struct musb *musb)
1765 * 1765 *
1766 * -EINVAL something went wrong (not driver) 1766 * -EINVAL something went wrong (not driver)
1767 * -EBUSY another gadget is already using the controller 1767 * -EBUSY another gadget is already using the controller
1768 * -ENOMEM no memeory to perform the operation 1768 * -ENOMEM no memory to perform the operation
1769 * 1769 *
1770 * @param driver the gadget driver 1770 * @param driver the gadget driver
1771 * @param bind the driver's bind function 1771 * @param bind the driver's bind function
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index cdfb1868caef..748778288d94 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -615,7 +615,6 @@ static const struct usb_device_id option_ids[] = {
615 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0004, 0xff, 0xff, 0xff) }, 615 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0004, 0xff, 0xff, 0xff) },
616 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0005, 0xff, 0xff, 0xff) }, 616 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0005, 0xff, 0xff, 0xff) },
617 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0006, 0xff, 0xff, 0xff) }, 617 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0006, 0xff, 0xff, 0xff) },
618 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0007, 0xff, 0xff, 0xff) },
619 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0008, 0xff, 0xff, 0xff) }, 618 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0008, 0xff, 0xff, 0xff) },
620 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0009, 0xff, 0xff, 0xff) }, 619 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0009, 0xff, 0xff, 0xff) },
621 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000a, 0xff, 0xff, 0xff) }, 620 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000a, 0xff, 0xff, 0xff) },
diff --git a/drivers/usb/wusbcore/wa-rpipe.c b/drivers/usb/wusbcore/wa-rpipe.c
index c7b1d8108de9..8cb9d80207fa 100644
--- a/drivers/usb/wusbcore/wa-rpipe.c
+++ b/drivers/usb/wusbcore/wa-rpipe.c
@@ -49,7 +49,7 @@
49 * 49 *
50 * USB Stack port number 4 (1 based) 50 * USB Stack port number 4 (1 based)
51 * WUSB code port index 3 (0 based) 51 * WUSB code port index 3 (0 based)
52 * USB Addresss 5 (2 based -- 0 is for default, 1 for root hub) 52 * USB Address 5 (2 based -- 0 is for default, 1 for root hub)
53 * 53 *
54 * Now, because we don't use the concept as default address exactly 54 * Now, because we don't use the concept as default address exactly
55 * like the (wired) USB code does, we need to kind of skip it. So we 55 * like the (wired) USB code does, we need to kind of skip it. So we