diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-13 18:03:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-13 18:03:48 -0400 |
commit | ad8395e149e86ca3a76b6ae300c0d0a92b7f7e17 (patch) | |
tree | 4179afaeb0bd079467fb614fe9ad66f50aa17f9a /drivers/usb | |
parent | cad9d5664a74702d3df7a1bf4ab1221428c3ff87 (diff) | |
parent | 27b351c5546008c640b3e65152f60ca74b3706f1 (diff) |
Merge tag 'usb-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg Kroah-Hartman:
"Here are a number of tiny USB fixes and new USB device ids for your
3.9 tree.
The "largest" one here is a revert of a usb-storage patch that turned
out to be incorrect, breaking existing users, which is never a good
thing. Everything else is pretty simple and small"
* tag 'usb-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (43 commits)
USB: quatech2: only write to the tty if the port is open.
qcserial: bind to DM/DIAG port on Gobi 1K devices
USB: cdc-wdm: fix buffer overflow
usb: serial: Add Rigblaster Advantage to device table
qcaux: add Franklin U600
usb: musb: core: fix possible build error with randconfig
usb: cp210x new Vendor/Device IDs
usb: gadget: pxa25x: fix disconnect reporting
usb: dwc3: ep0: fix sparc64 build
usb: c67x00 RetryCnt value in c67x00 TD should be 3
usb: Correction to c67x00 TD data length mask
usb: Makefile: fix drivers/usb/phy/ Makefile entry
USB: added support for Cinterion's products AH6 and PLS8
usb: gadget: fix omap_udc build errors
USB: storage: fix Huawei mode switching regression
USB: storage: in-kernel modeswitching is deprecated
tools: usb: ffs-test: Fix build failure
USB: option: add Huawei E5331
usb: musb: omap2430: fix sparse warning
usb: musb: omap2430: fix omap_musb_mailbox glue check again
...
Diffstat (limited to 'drivers/usb')
36 files changed, 528 insertions, 216 deletions
diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index f5ed3d75fa5a..8f5ebced5df0 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile | |||
@@ -46,7 +46,7 @@ obj-$(CONFIG_USB_MICROTEK) += image/ | |||
46 | obj-$(CONFIG_USB_SERIAL) += serial/ | 46 | obj-$(CONFIG_USB_SERIAL) += serial/ |
47 | 47 | ||
48 | obj-$(CONFIG_USB) += misc/ | 48 | obj-$(CONFIG_USB) += misc/ |
49 | obj-$(CONFIG_USB_COMMON) += phy/ | 49 | obj-$(CONFIG_USB_OTG_UTILS) += phy/ |
50 | obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/ | 50 | obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/ |
51 | 51 | ||
52 | obj-$(CONFIG_USB_ATM) += atm/ | 52 | obj-$(CONFIG_USB_ATM) += atm/ |
diff --git a/drivers/usb/c67x00/c67x00-sched.c b/drivers/usb/c67x00/c67x00-sched.c index a03fbc15fa9c..aa491627a45b 100644 --- a/drivers/usb/c67x00/c67x00-sched.c +++ b/drivers/usb/c67x00/c67x00-sched.c | |||
@@ -100,7 +100,7 @@ struct c67x00_urb_priv { | |||
100 | #define TD_PIDEP_OFFSET 0x04 | 100 | #define TD_PIDEP_OFFSET 0x04 |
101 | #define TD_PIDEPMASK_PID 0xF0 | 101 | #define TD_PIDEPMASK_PID 0xF0 |
102 | #define TD_PIDEPMASK_EP 0x0F | 102 | #define TD_PIDEPMASK_EP 0x0F |
103 | #define TD_PORTLENMASK_DL 0x02FF | 103 | #define TD_PORTLENMASK_DL 0x03FF |
104 | #define TD_PORTLENMASK_PN 0xC000 | 104 | #define TD_PORTLENMASK_PN 0xC000 |
105 | 105 | ||
106 | #define TD_STATUS_OFFSET 0x07 | 106 | #define TD_STATUS_OFFSET 0x07 |
@@ -590,7 +590,7 @@ static int c67x00_create_td(struct c67x00_hcd *c67x00, struct urb *urb, | |||
590 | { | 590 | { |
591 | struct c67x00_td *td; | 591 | struct c67x00_td *td; |
592 | struct c67x00_urb_priv *urbp = urb->hcpriv; | 592 | struct c67x00_urb_priv *urbp = urb->hcpriv; |
593 | const __u8 active_flag = 1, retry_cnt = 1; | 593 | const __u8 active_flag = 1, retry_cnt = 3; |
594 | __u8 cmd = 0; | 594 | __u8 cmd = 0; |
595 | int tt = 0; | 595 | int tt = 0; |
596 | 596 | ||
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 2f45bba8561d..f64fbea1cf20 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1767,7 +1767,7 @@ static int udc_start(struct ci13xxx *ci) | |||
1767 | goto put_transceiver; | 1767 | goto put_transceiver; |
1768 | } | 1768 | } |
1769 | 1769 | ||
1770 | retval = dbg_create_files(&ci->gadget.dev); | 1770 | retval = dbg_create_files(ci->dev); |
1771 | if (retval) | 1771 | if (retval) |
1772 | goto unreg_device; | 1772 | goto unreg_device; |
1773 | 1773 | ||
@@ -1796,7 +1796,7 @@ remove_trans: | |||
1796 | 1796 | ||
1797 | dev_err(dev, "error = %i\n", retval); | 1797 | dev_err(dev, "error = %i\n", retval); |
1798 | remove_dbg: | 1798 | remove_dbg: |
1799 | dbg_remove_files(&ci->gadget.dev); | 1799 | dbg_remove_files(ci->dev); |
1800 | unreg_device: | 1800 | unreg_device: |
1801 | device_unregister(&ci->gadget.dev); | 1801 | device_unregister(&ci->gadget.dev); |
1802 | put_transceiver: | 1802 | put_transceiver: |
@@ -1836,7 +1836,7 @@ static void udc_stop(struct ci13xxx *ci) | |||
1836 | if (ci->global_phy) | 1836 | if (ci->global_phy) |
1837 | usb_put_phy(ci->transceiver); | 1837 | usb_put_phy(ci->transceiver); |
1838 | } | 1838 | } |
1839 | dbg_remove_files(&ci->gadget.dev); | 1839 | dbg_remove_files(ci->dev); |
1840 | device_unregister(&ci->gadget.dev); | 1840 | device_unregister(&ci->gadget.dev); |
1841 | /* my kobject is dynamic, I swear! */ | 1841 | /* my kobject is dynamic, I swear! */ |
1842 | memset(&ci->gadget, 0, sizeof(ci->gadget)); | 1842 | memset(&ci->gadget, 0, sizeof(ci->gadget)); |
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 5f0cb417b736..122d056d96d5 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -56,6 +56,7 @@ MODULE_DEVICE_TABLE (usb, wdm_ids); | |||
56 | #define WDM_RESPONDING 7 | 56 | #define WDM_RESPONDING 7 |
57 | #define WDM_SUSPENDING 8 | 57 | #define WDM_SUSPENDING 8 |
58 | #define WDM_RESETTING 9 | 58 | #define WDM_RESETTING 9 |
59 | #define WDM_OVERFLOW 10 | ||
59 | 60 | ||
60 | #define WDM_MAX 16 | 61 | #define WDM_MAX 16 |
61 | 62 | ||
@@ -155,6 +156,7 @@ static void wdm_in_callback(struct urb *urb) | |||
155 | { | 156 | { |
156 | struct wdm_device *desc = urb->context; | 157 | struct wdm_device *desc = urb->context; |
157 | int status = urb->status; | 158 | int status = urb->status; |
159 | int length = urb->actual_length; | ||
158 | 160 | ||
159 | spin_lock(&desc->iuspin); | 161 | spin_lock(&desc->iuspin); |
160 | clear_bit(WDM_RESPONDING, &desc->flags); | 162 | clear_bit(WDM_RESPONDING, &desc->flags); |
@@ -185,9 +187,17 @@ static void wdm_in_callback(struct urb *urb) | |||
185 | } | 187 | } |
186 | 188 | ||
187 | desc->rerr = status; | 189 | desc->rerr = status; |
188 | desc->reslength = urb->actual_length; | 190 | if (length + desc->length > desc->wMaxCommand) { |
189 | memmove(desc->ubuf + desc->length, desc->inbuf, desc->reslength); | 191 | /* The buffer would overflow */ |
190 | desc->length += desc->reslength; | 192 | set_bit(WDM_OVERFLOW, &desc->flags); |
193 | } else { | ||
194 | /* we may already be in overflow */ | ||
195 | if (!test_bit(WDM_OVERFLOW, &desc->flags)) { | ||
196 | memmove(desc->ubuf + desc->length, desc->inbuf, length); | ||
197 | desc->length += length; | ||
198 | desc->reslength = length; | ||
199 | } | ||
200 | } | ||
191 | skip_error: | 201 | skip_error: |
192 | wake_up(&desc->wait); | 202 | wake_up(&desc->wait); |
193 | 203 | ||
@@ -435,6 +445,11 @@ retry: | |||
435 | rv = -ENODEV; | 445 | rv = -ENODEV; |
436 | goto err; | 446 | goto err; |
437 | } | 447 | } |
448 | if (test_bit(WDM_OVERFLOW, &desc->flags)) { | ||
449 | clear_bit(WDM_OVERFLOW, &desc->flags); | ||
450 | rv = -ENOBUFS; | ||
451 | goto err; | ||
452 | } | ||
438 | i++; | 453 | i++; |
439 | if (file->f_flags & O_NONBLOCK) { | 454 | if (file->f_flags & O_NONBLOCK) { |
440 | if (!test_bit(WDM_READ, &desc->flags)) { | 455 | if (!test_bit(WDM_READ, &desc->flags)) { |
@@ -478,6 +493,7 @@ retry: | |||
478 | spin_unlock_irq(&desc->iuspin); | 493 | spin_unlock_irq(&desc->iuspin); |
479 | goto retry; | 494 | goto retry; |
480 | } | 495 | } |
496 | |||
481 | if (!desc->reslength) { /* zero length read */ | 497 | if (!desc->reslength) { /* zero length read */ |
482 | dev_dbg(&desc->intf->dev, "%s: zero length - clearing WDM_READ\n", __func__); | 498 | dev_dbg(&desc->intf->dev, "%s: zero length - clearing WDM_READ\n", __func__); |
483 | clear_bit(WDM_READ, &desc->flags); | 499 | clear_bit(WDM_READ, &desc->flags); |
@@ -1004,6 +1020,7 @@ static int wdm_post_reset(struct usb_interface *intf) | |||
1004 | struct wdm_device *desc = wdm_find_device(intf); | 1020 | struct wdm_device *desc = wdm_find_device(intf); |
1005 | int rv; | 1021 | int rv; |
1006 | 1022 | ||
1023 | clear_bit(WDM_OVERFLOW, &desc->flags); | ||
1007 | clear_bit(WDM_RESETTING, &desc->flags); | 1024 | clear_bit(WDM_RESETTING, &desc->flags); |
1008 | rv = recover_from_urb_loss(desc); | 1025 | rv = recover_from_urb_loss(desc); |
1009 | mutex_unlock(&desc->wlock); | 1026 | mutex_unlock(&desc->wlock); |
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 999909451e37..ffa6b004a84b 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -583,6 +583,7 @@ static int dwc3_remove(struct platform_device *pdev) | |||
583 | break; | 583 | break; |
584 | } | 584 | } |
585 | 585 | ||
586 | dwc3_free_event_buffers(dwc); | ||
586 | dwc3_core_exit(dwc); | 587 | dwc3_core_exit(dwc); |
587 | 588 | ||
588 | return 0; | 589 | return 0; |
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index b50da53e9a52..b082bec7343e 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c | |||
@@ -23,8 +23,6 @@ | |||
23 | #include <linux/usb/nop-usb-xceiv.h> | 23 | #include <linux/usb/nop-usb-xceiv.h> |
24 | #include <linux/of.h> | 24 | #include <linux/of.h> |
25 | 25 | ||
26 | #include "core.h" | ||
27 | |||
28 | struct dwc3_exynos { | 26 | struct dwc3_exynos { |
29 | struct platform_device *dwc3; | 27 | struct platform_device *dwc3; |
30 | struct platform_device *usb2_phy; | 28 | struct platform_device *usb2_phy; |
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 22f337f57219..afa05e3c9cf4 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c | |||
@@ -54,8 +54,6 @@ | |||
54 | #include <linux/usb/otg.h> | 54 | #include <linux/usb/otg.h> |
55 | #include <linux/usb/nop-usb-xceiv.h> | 55 | #include <linux/usb/nop-usb-xceiv.h> |
56 | 56 | ||
57 | #include "core.h" | ||
58 | |||
59 | /* | 57 | /* |
60 | * All these registers belong to OMAP's Wrapper around the | 58 | * All these registers belong to OMAP's Wrapper around the |
61 | * DesignWare USB3 Core. | 59 | * DesignWare USB3 Core. |
@@ -465,20 +463,20 @@ static int dwc3_omap_remove(struct platform_device *pdev) | |||
465 | return 0; | 463 | return 0; |
466 | } | 464 | } |
467 | 465 | ||
468 | static const struct of_device_id of_dwc3_matach[] = { | 466 | static const struct of_device_id of_dwc3_match[] = { |
469 | { | 467 | { |
470 | "ti,dwc3", | 468 | "ti,dwc3", |
471 | }, | 469 | }, |
472 | { }, | 470 | { }, |
473 | }; | 471 | }; |
474 | MODULE_DEVICE_TABLE(of, of_dwc3_matach); | 472 | MODULE_DEVICE_TABLE(of, of_dwc3_match); |
475 | 473 | ||
476 | static struct platform_driver dwc3_omap_driver = { | 474 | static struct platform_driver dwc3_omap_driver = { |
477 | .probe = dwc3_omap_probe, | 475 | .probe = dwc3_omap_probe, |
478 | .remove = dwc3_omap_remove, | 476 | .remove = dwc3_omap_remove, |
479 | .driver = { | 477 | .driver = { |
480 | .name = "omap-dwc3", | 478 | .name = "omap-dwc3", |
481 | .of_match_table = of_dwc3_matach, | 479 | .of_match_table = of_dwc3_match, |
482 | }, | 480 | }, |
483 | }; | 481 | }; |
484 | 482 | ||
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 7d70f44567d2..e8d77689a322 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c | |||
@@ -45,8 +45,6 @@ | |||
45 | #include <linux/usb/otg.h> | 45 | #include <linux/usb/otg.h> |
46 | #include <linux/usb/nop-usb-xceiv.h> | 46 | #include <linux/usb/nop-usb-xceiv.h> |
47 | 47 | ||
48 | #include "core.h" | ||
49 | |||
50 | /* FIXME define these in <linux/pci_ids.h> */ | 48 | /* FIXME define these in <linux/pci_ids.h> */ |
51 | #define PCI_VENDOR_ID_SYNOPSYS 0x16c3 | 49 | #define PCI_VENDOR_ID_SYNOPSYS 0x16c3 |
52 | #define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd | 50 | #define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd |
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index d7da073a23fe..1d139ca05ef1 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c | |||
@@ -891,7 +891,8 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, | |||
891 | DWC3_TRBCTL_CONTROL_DATA); | 891 | DWC3_TRBCTL_CONTROL_DATA); |
892 | } else if (!IS_ALIGNED(req->request.length, dep->endpoint.maxpacket) | 892 | } else if (!IS_ALIGNED(req->request.length, dep->endpoint.maxpacket) |
893 | && (dep->number == 0)) { | 893 | && (dep->number == 0)) { |
894 | u32 transfer_size; | 894 | u32 transfer_size; |
895 | u32 maxpacket; | ||
895 | 896 | ||
896 | ret = usb_gadget_map_request(&dwc->gadget, &req->request, | 897 | ret = usb_gadget_map_request(&dwc->gadget, &req->request, |
897 | dep->number); | 898 | dep->number); |
@@ -902,8 +903,8 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, | |||
902 | 903 | ||
903 | WARN_ON(req->request.length > DWC3_EP0_BOUNCE_SIZE); | 904 | WARN_ON(req->request.length > DWC3_EP0_BOUNCE_SIZE); |
904 | 905 | ||
905 | transfer_size = roundup(req->request.length, | 906 | maxpacket = dep->endpoint.maxpacket; |
906 | (u32) dep->endpoint.maxpacket); | 907 | transfer_size = roundup(req->request.length, maxpacket); |
907 | 908 | ||
908 | dwc->ep0_bounced = true; | 909 | dwc->ep0_bounced = true; |
909 | 910 | ||
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index a04342f6cbfa..82e160e96fca 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -2159,7 +2159,6 @@ static void dwc3_gadget_phy_suspend(struct dwc3 *dwc, u8 speed) | |||
2159 | 2159 | ||
2160 | static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) | 2160 | static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) |
2161 | { | 2161 | { |
2162 | struct dwc3_gadget_ep_cmd_params params; | ||
2163 | struct dwc3_ep *dep; | 2162 | struct dwc3_ep *dep; |
2164 | int ret; | 2163 | int ret; |
2165 | u32 reg; | 2164 | u32 reg; |
@@ -2167,8 +2166,6 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) | |||
2167 | 2166 | ||
2168 | dev_vdbg(dwc->dev, "%s\n", __func__); | 2167 | dev_vdbg(dwc->dev, "%s\n", __func__); |
2169 | 2168 | ||
2170 | memset(¶ms, 0x00, sizeof(params)); | ||
2171 | |||
2172 | reg = dwc3_readl(dwc->regs, DWC3_DSTS); | 2169 | reg = dwc3_readl(dwc->regs, DWC3_DSTS); |
2173 | speed = reg & DWC3_DSTS_CONNECTSPD; | 2170 | speed = reg & DWC3_DSTS_CONNECTSPD; |
2174 | dwc->speed = speed; | 2171 | dwc->speed = speed; |
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index 97a13c349cc5..82fb22511356 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile | |||
@@ -35,6 +35,12 @@ mv_udc-y := mv_udc_core.o | |||
35 | obj-$(CONFIG_USB_FUSB300) += fusb300_udc.o | 35 | obj-$(CONFIG_USB_FUSB300) += fusb300_udc.o |
36 | obj-$(CONFIG_USB_MV_U3D) += mv_u3d_core.o | 36 | obj-$(CONFIG_USB_MV_U3D) += mv_u3d_core.o |
37 | 37 | ||
38 | # USB Functions | ||
39 | obj-$(CONFIG_USB_F_ACM) += f_acm.o | ||
40 | f_ss_lb-y := f_loopback.o f_sourcesink.o | ||
41 | obj-$(CONFIG_USB_F_SS_LB) += f_ss_lb.o | ||
42 | obj-$(CONFIG_USB_U_SERIAL) += u_serial.o | ||
43 | |||
38 | # | 44 | # |
39 | # USB gadget drivers | 45 | # USB gadget drivers |
40 | # | 46 | # |
@@ -74,9 +80,3 @@ obj-$(CONFIG_USB_G_WEBCAM) += g_webcam.o | |||
74 | obj-$(CONFIG_USB_G_NCM) += g_ncm.o | 80 | obj-$(CONFIG_USB_G_NCM) += g_ncm.o |
75 | obj-$(CONFIG_USB_G_ACM_MS) += g_acm_ms.o | 81 | obj-$(CONFIG_USB_G_ACM_MS) += g_acm_ms.o |
76 | obj-$(CONFIG_USB_GADGET_TARGET) += tcm_usb_gadget.o | 82 | obj-$(CONFIG_USB_GADGET_TARGET) += tcm_usb_gadget.o |
77 | |||
78 | # USB Functions | ||
79 | obj-$(CONFIG_USB_F_ACM) += f_acm.o | ||
80 | f_ss_lb-y := f_loopback.o f_sourcesink.o | ||
81 | obj-$(CONFIG_USB_F_SS_LB) += f_ss_lb.o | ||
82 | obj-$(CONFIG_USB_U_SERIAL) += u_serial.o | ||
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 7c821de8ce3d..c0d62b278610 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
@@ -1757,10 +1757,7 @@ static const struct usb_gadget_driver composite_driver_template = { | |||
1757 | /** | 1757 | /** |
1758 | * usb_composite_probe() - register a composite driver | 1758 | * usb_composite_probe() - register a composite driver |
1759 | * @driver: the driver to register | 1759 | * @driver: the driver to register |
1760 | * @bind: the callback used to allocate resources that are shared across the | 1760 | * |
1761 | * whole device, such as string IDs, and add its configurations using | ||
1762 | * @usb_add_config(). This may fail by returning a negative errno | ||
1763 | * value; it should return zero on successful initialization. | ||
1764 | * Context: single threaded during gadget setup | 1761 | * Context: single threaded during gadget setup |
1765 | * | 1762 | * |
1766 | * This function is used to register drivers using the composite driver | 1763 | * This function is used to register drivers using the composite driver |
diff --git a/drivers/usb/gadget/f_uac1.c b/drivers/usb/gadget/f_uac1.c index f570e667a640..fa8ea4ea00c1 100644 --- a/drivers/usb/gadget/f_uac1.c +++ b/drivers/usb/gadget/f_uac1.c | |||
@@ -418,6 +418,7 @@ static int audio_get_intf_req(struct usb_function *f, | |||
418 | 418 | ||
419 | req->context = audio; | 419 | req->context = audio; |
420 | req->complete = f_audio_complete; | 420 | req->complete = f_audio_complete; |
421 | len = min_t(size_t, sizeof(value), len); | ||
421 | memcpy(req->buf, &value, len); | 422 | memcpy(req->buf, &value, len); |
422 | 423 | ||
423 | return len; | 424 | return len; |
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index 8efd7555fa21..5bd930d779b9 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c | |||
@@ -1334,27 +1334,18 @@ static int imx_udc_start(struct usb_gadget *gadget, | |||
1334 | struct usb_gadget_driver *driver) | 1334 | struct usb_gadget_driver *driver) |
1335 | { | 1335 | { |
1336 | struct imx_udc_struct *imx_usb; | 1336 | struct imx_udc_struct *imx_usb; |
1337 | int retval; | ||
1338 | 1337 | ||
1339 | imx_usb = container_of(gadget, struct imx_udc_struct, gadget); | 1338 | imx_usb = container_of(gadget, struct imx_udc_struct, gadget); |
1340 | /* first hook up the driver ... */ | 1339 | /* first hook up the driver ... */ |
1341 | imx_usb->driver = driver; | 1340 | imx_usb->driver = driver; |
1342 | imx_usb->gadget.dev.driver = &driver->driver; | 1341 | imx_usb->gadget.dev.driver = &driver->driver; |
1343 | 1342 | ||
1344 | retval = device_add(&imx_usb->gadget.dev); | ||
1345 | if (retval) | ||
1346 | goto fail; | ||
1347 | |||
1348 | D_INI(imx_usb->dev, "<%s> registered gadget driver '%s'\n", | 1343 | D_INI(imx_usb->dev, "<%s> registered gadget driver '%s'\n", |
1349 | __func__, driver->driver.name); | 1344 | __func__, driver->driver.name); |
1350 | 1345 | ||
1351 | imx_udc_enable(imx_usb); | 1346 | imx_udc_enable(imx_usb); |
1352 | 1347 | ||
1353 | return 0; | 1348 | return 0; |
1354 | fail: | ||
1355 | imx_usb->driver = NULL; | ||
1356 | imx_usb->gadget.dev.driver = NULL; | ||
1357 | return retval; | ||
1358 | } | 1349 | } |
1359 | 1350 | ||
1360 | static int imx_udc_stop(struct usb_gadget *gadget, | 1351 | static int imx_udc_stop(struct usb_gadget *gadget, |
@@ -1370,8 +1361,6 @@ static int imx_udc_stop(struct usb_gadget *gadget, | |||
1370 | imx_usb->gadget.dev.driver = NULL; | 1361 | imx_usb->gadget.dev.driver = NULL; |
1371 | imx_usb->driver = NULL; | 1362 | imx_usb->driver = NULL; |
1372 | 1363 | ||
1373 | device_del(&imx_usb->gadget.dev); | ||
1374 | |||
1375 | D_INI(imx_usb->dev, "<%s> unregistered gadget driver '%s'\n", | 1364 | D_INI(imx_usb->dev, "<%s> unregistered gadget driver '%s'\n", |
1376 | __func__, driver->driver.name); | 1365 | __func__, driver->driver.name); |
1377 | 1366 | ||
@@ -1477,6 +1466,10 @@ static int __init imx_udc_probe(struct platform_device *pdev) | |||
1477 | imx_usb->gadget.dev.parent = &pdev->dev; | 1466 | imx_usb->gadget.dev.parent = &pdev->dev; |
1478 | imx_usb->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1467 | imx_usb->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1479 | 1468 | ||
1469 | ret = device_add(&imx_usb->gadget.dev); | ||
1470 | if (retval) | ||
1471 | goto fail4; | ||
1472 | |||
1480 | platform_set_drvdata(pdev, imx_usb); | 1473 | platform_set_drvdata(pdev, imx_usb); |
1481 | 1474 | ||
1482 | usb_init_data(imx_usb); | 1475 | usb_init_data(imx_usb); |
@@ -1488,9 +1481,11 @@ static int __init imx_udc_probe(struct platform_device *pdev) | |||
1488 | 1481 | ||
1489 | ret = usb_add_gadget_udc(&pdev->dev, &imx_usb->gadget); | 1482 | ret = usb_add_gadget_udc(&pdev->dev, &imx_usb->gadget); |
1490 | if (ret) | 1483 | if (ret) |
1491 | goto fail4; | 1484 | goto fail5; |
1492 | 1485 | ||
1493 | return 0; | 1486 | return 0; |
1487 | fail5: | ||
1488 | device_unregister(&imx_usb->gadget.dev); | ||
1494 | fail4: | 1489 | fail4: |
1495 | for (i = 0; i < IMX_USB_NB_EP + 1; i++) | 1490 | for (i = 0; i < IMX_USB_NB_EP + 1; i++) |
1496 | free_irq(imx_usb->usbd_int[i], imx_usb); | 1491 | free_irq(imx_usb->usbd_int[i], imx_usb); |
@@ -1514,6 +1509,7 @@ static int __exit imx_udc_remove(struct platform_device *pdev) | |||
1514 | int i; | 1509 | int i; |
1515 | 1510 | ||
1516 | usb_del_gadget_udc(&imx_usb->gadget); | 1511 | usb_del_gadget_udc(&imx_usb->gadget); |
1512 | device_unregister(&imx_usb->gadget.dev); | ||
1517 | imx_udc_disable(imx_usb); | 1513 | imx_udc_disable(imx_usb); |
1518 | del_timer(&imx_usb->timer); | 1514 | del_timer(&imx_usb->timer); |
1519 | 1515 | ||
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 06be85c2b233..f8445653577f 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #define DRIVER_VERSION "4 October 2004" | 62 | #define DRIVER_VERSION "4 October 2004" |
63 | 63 | ||
64 | #define OMAP_DMA_USB_W2FC_TX0 29 | 64 | #define OMAP_DMA_USB_W2FC_TX0 29 |
65 | #define OMAP_DMA_USB_W2FC_RX0 26 | ||
65 | 66 | ||
66 | /* | 67 | /* |
67 | * The OMAP UDC needs _very_ early endpoint setup: before enabling the | 68 | * The OMAP UDC needs _very_ early endpoint setup: before enabling the |
@@ -1310,7 +1311,7 @@ static int omap_pullup(struct usb_gadget *gadget, int is_on) | |||
1310 | } | 1311 | } |
1311 | 1312 | ||
1312 | static int omap_udc_start(struct usb_gadget *g, | 1313 | static int omap_udc_start(struct usb_gadget *g, |
1313 | struct usb_gadget_driver *driver) | 1314 | struct usb_gadget_driver *driver); |
1314 | static int omap_udc_stop(struct usb_gadget *g, | 1315 | static int omap_udc_stop(struct usb_gadget *g, |
1315 | struct usb_gadget_driver *driver); | 1316 | struct usb_gadget_driver *driver); |
1316 | 1317 | ||
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index 2bbcdce942dc..d0f37484b6b0 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
@@ -1266,13 +1266,6 @@ static int pxa25x_udc_start(struct usb_gadget *g, | |||
1266 | dev->gadget.dev.driver = &driver->driver; | 1266 | dev->gadget.dev.driver = &driver->driver; |
1267 | dev->pullup = 1; | 1267 | dev->pullup = 1; |
1268 | 1268 | ||
1269 | retval = device_add (&dev->gadget.dev); | ||
1270 | if (retval) { | ||
1271 | dev->driver = NULL; | ||
1272 | dev->gadget.dev.driver = NULL; | ||
1273 | return retval; | ||
1274 | } | ||
1275 | |||
1276 | /* ... then enable host detection and ep0; and we're ready | 1269 | /* ... then enable host detection and ep0; and we're ready |
1277 | * for set_configuration as well as eventual disconnect. | 1270 | * for set_configuration as well as eventual disconnect. |
1278 | */ | 1271 | */ |
@@ -1310,6 +1303,10 @@ stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver) | |||
1310 | } | 1303 | } |
1311 | del_timer_sync(&dev->timer); | 1304 | del_timer_sync(&dev->timer); |
1312 | 1305 | ||
1306 | /* report disconnect; the driver is already quiesced */ | ||
1307 | if (driver) | ||
1308 | driver->disconnect(&dev->gadget); | ||
1309 | |||
1313 | /* re-init driver-visible data structures */ | 1310 | /* re-init driver-visible data structures */ |
1314 | udc_reinit(dev); | 1311 | udc_reinit(dev); |
1315 | } | 1312 | } |
@@ -1331,7 +1328,6 @@ static int pxa25x_udc_stop(struct usb_gadget*g, | |||
1331 | dev->gadget.dev.driver = NULL; | 1328 | dev->gadget.dev.driver = NULL; |
1332 | dev->driver = NULL; | 1329 | dev->driver = NULL; |
1333 | 1330 | ||
1334 | device_del (&dev->gadget.dev); | ||
1335 | dump_state(dev); | 1331 | dump_state(dev); |
1336 | 1332 | ||
1337 | return 0; | 1333 | return 0; |
@@ -2146,6 +2142,13 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) | |||
2146 | dev->gadget.dev.parent = &pdev->dev; | 2142 | dev->gadget.dev.parent = &pdev->dev; |
2147 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; | 2143 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; |
2148 | 2144 | ||
2145 | retval = device_add(&dev->gadget.dev); | ||
2146 | if (retval) { | ||
2147 | dev->driver = NULL; | ||
2148 | dev->gadget.dev.driver = NULL; | ||
2149 | goto err_device_add; | ||
2150 | } | ||
2151 | |||
2149 | the_controller = dev; | 2152 | the_controller = dev; |
2150 | platform_set_drvdata(pdev, dev); | 2153 | platform_set_drvdata(pdev, dev); |
2151 | 2154 | ||
@@ -2196,6 +2199,8 @@ lubbock_fail0: | |||
2196 | free_irq(irq, dev); | 2199 | free_irq(irq, dev); |
2197 | #endif | 2200 | #endif |
2198 | err_irq1: | 2201 | err_irq1: |
2202 | device_unregister(&dev->gadget.dev); | ||
2203 | err_device_add: | ||
2199 | if (gpio_is_valid(dev->mach->gpio_pullup)) | 2204 | if (gpio_is_valid(dev->mach->gpio_pullup)) |
2200 | gpio_free(dev->mach->gpio_pullup); | 2205 | gpio_free(dev->mach->gpio_pullup); |
2201 | err_gpio_pullup: | 2206 | err_gpio_pullup: |
@@ -2217,10 +2222,11 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev) | |||
2217 | { | 2222 | { |
2218 | struct pxa25x_udc *dev = platform_get_drvdata(pdev); | 2223 | struct pxa25x_udc *dev = platform_get_drvdata(pdev); |
2219 | 2224 | ||
2220 | usb_del_gadget_udc(&dev->gadget); | ||
2221 | if (dev->driver) | 2225 | if (dev->driver) |
2222 | return -EBUSY; | 2226 | return -EBUSY; |
2223 | 2227 | ||
2228 | usb_del_gadget_udc(&dev->gadget); | ||
2229 | device_unregister(&dev->gadget.dev); | ||
2224 | dev->pullup = 0; | 2230 | dev->pullup = 0; |
2225 | pullup(dev); | 2231 | pullup(dev); |
2226 | 2232 | ||
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index f7d25795821a..2fc867652ef5 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -1814,11 +1814,6 @@ static int pxa27x_udc_start(struct usb_gadget *g, | |||
1814 | udc->gadget.dev.driver = &driver->driver; | 1814 | udc->gadget.dev.driver = &driver->driver; |
1815 | dplus_pullup(udc, 1); | 1815 | dplus_pullup(udc, 1); |
1816 | 1816 | ||
1817 | retval = device_add(&udc->gadget.dev); | ||
1818 | if (retval) { | ||
1819 | dev_err(udc->dev, "device_add error %d\n", retval); | ||
1820 | goto fail; | ||
1821 | } | ||
1822 | if (!IS_ERR_OR_NULL(udc->transceiver)) { | 1817 | if (!IS_ERR_OR_NULL(udc->transceiver)) { |
1823 | retval = otg_set_peripheral(udc->transceiver->otg, | 1818 | retval = otg_set_peripheral(udc->transceiver->otg, |
1824 | &udc->gadget); | 1819 | &udc->gadget); |
@@ -1876,7 +1871,6 @@ static int pxa27x_udc_stop(struct usb_gadget *g, | |||
1876 | 1871 | ||
1877 | udc->driver = NULL; | 1872 | udc->driver = NULL; |
1878 | 1873 | ||
1879 | device_del(&udc->gadget.dev); | ||
1880 | 1874 | ||
1881 | if (!IS_ERR_OR_NULL(udc->transceiver)) | 1875 | if (!IS_ERR_OR_NULL(udc->transceiver)) |
1882 | return otg_set_peripheral(udc->transceiver->otg, NULL); | 1876 | return otg_set_peripheral(udc->transceiver->otg, NULL); |
@@ -2480,13 +2474,24 @@ static int __init pxa_udc_probe(struct platform_device *pdev) | |||
2480 | driver_name, udc->irq, retval); | 2474 | driver_name, udc->irq, retval); |
2481 | goto err_irq; | 2475 | goto err_irq; |
2482 | } | 2476 | } |
2477 | |||
2478 | retval = device_add(&udc->gadget.dev); | ||
2479 | if (retval) { | ||
2480 | dev_err(udc->dev, "device_add error %d\n", retval); | ||
2481 | goto err_dev_add; | ||
2482 | } | ||
2483 | |||
2483 | retval = usb_add_gadget_udc(&pdev->dev, &udc->gadget); | 2484 | retval = usb_add_gadget_udc(&pdev->dev, &udc->gadget); |
2484 | if (retval) | 2485 | if (retval) |
2485 | goto err_add_udc; | 2486 | goto err_add_udc; |
2486 | 2487 | ||
2487 | pxa_init_debugfs(udc); | 2488 | pxa_init_debugfs(udc); |
2489 | |||
2488 | return 0; | 2490 | return 0; |
2491 | |||
2489 | err_add_udc: | 2492 | err_add_udc: |
2493 | device_unregister(&udc->gadget.dev); | ||
2494 | err_dev_add: | ||
2490 | free_irq(udc->irq, udc); | 2495 | free_irq(udc->irq, udc); |
2491 | err_irq: | 2496 | err_irq: |
2492 | iounmap(udc->regs); | 2497 | iounmap(udc->regs); |
@@ -2507,6 +2512,7 @@ static int __exit pxa_udc_remove(struct platform_device *_dev) | |||
2507 | int gpio = udc->mach->gpio_pullup; | 2512 | int gpio = udc->mach->gpio_pullup; |
2508 | 2513 | ||
2509 | usb_del_gadget_udc(&udc->gadget); | 2514 | usb_del_gadget_udc(&udc->gadget); |
2515 | device_del(&udc->gadget.dev); | ||
2510 | usb_gadget_unregister_driver(udc->driver); | 2516 | usb_gadget_unregister_driver(udc->driver); |
2511 | free_irq(udc->irq, udc); | 2517 | free_irq(udc->irq, udc); |
2512 | pxa_cleanup_debugfs(udc); | 2518 | pxa_cleanup_debugfs(udc); |
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index fc07b4381286..08f89652533b 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c | |||
@@ -1668,8 +1668,7 @@ static void s3c2410_udc_enable(struct s3c2410_udc *dev) | |||
1668 | static int s3c2410_udc_start(struct usb_gadget *g, | 1668 | static int s3c2410_udc_start(struct usb_gadget *g, |
1669 | struct usb_gadget_driver *driver) | 1669 | struct usb_gadget_driver *driver) |
1670 | { | 1670 | { |
1671 | struct s3c2410_udc *udc = to_s3c2410(g) | 1671 | struct s3c2410_udc *udc = to_s3c2410(g); |
1672 | int retval; | ||
1673 | 1672 | ||
1674 | dprintk(DEBUG_NORMAL, "%s() '%s'\n", __func__, driver->driver.name); | 1673 | dprintk(DEBUG_NORMAL, "%s() '%s'\n", __func__, driver->driver.name); |
1675 | 1674 | ||
@@ -1677,22 +1676,10 @@ static int s3c2410_udc_start(struct usb_gadget *g, | |||
1677 | udc->driver = driver; | 1676 | udc->driver = driver; |
1678 | udc->gadget.dev.driver = &driver->driver; | 1677 | udc->gadget.dev.driver = &driver->driver; |
1679 | 1678 | ||
1680 | /* Bind the driver */ | ||
1681 | retval = device_add(&udc->gadget.dev); | ||
1682 | if (retval) { | ||
1683 | dev_err(&udc->gadget.dev, "Error in device_add() : %d\n", retval); | ||
1684 | goto register_error; | ||
1685 | } | ||
1686 | |||
1687 | /* Enable udc */ | 1679 | /* Enable udc */ |
1688 | s3c2410_udc_enable(udc); | 1680 | s3c2410_udc_enable(udc); |
1689 | 1681 | ||
1690 | return 0; | 1682 | return 0; |
1691 | |||
1692 | register_error: | ||
1693 | udc->driver = NULL; | ||
1694 | udc->gadget.dev.driver = NULL; | ||
1695 | return retval; | ||
1696 | } | 1683 | } |
1697 | 1684 | ||
1698 | static int s3c2410_udc_stop(struct usb_gadget *g, | 1685 | static int s3c2410_udc_stop(struct usb_gadget *g, |
@@ -1700,7 +1687,6 @@ static int s3c2410_udc_stop(struct usb_gadget *g, | |||
1700 | { | 1687 | { |
1701 | struct s3c2410_udc *udc = to_s3c2410(g); | 1688 | struct s3c2410_udc *udc = to_s3c2410(g); |
1702 | 1689 | ||
1703 | device_del(&udc->gadget.dev); | ||
1704 | udc->driver = NULL; | 1690 | udc->driver = NULL; |
1705 | 1691 | ||
1706 | /* Disable udc */ | 1692 | /* Disable udc */ |
@@ -1842,6 +1828,13 @@ static int s3c2410_udc_probe(struct platform_device *pdev) | |||
1842 | udc->gadget.dev.parent = &pdev->dev; | 1828 | udc->gadget.dev.parent = &pdev->dev; |
1843 | udc->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1829 | udc->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1844 | 1830 | ||
1831 | /* Bind the driver */ | ||
1832 | retval = device_add(&udc->gadget.dev); | ||
1833 | if (retval) { | ||
1834 | dev_err(&udc->gadget.dev, "Error in device_add() : %d\n", retval); | ||
1835 | goto err_device_add; | ||
1836 | } | ||
1837 | |||
1845 | the_controller = udc; | 1838 | the_controller = udc; |
1846 | platform_set_drvdata(pdev, udc); | 1839 | platform_set_drvdata(pdev, udc); |
1847 | 1840 | ||
@@ -1930,6 +1923,8 @@ err_gpio_claim: | |||
1930 | err_int: | 1923 | err_int: |
1931 | free_irq(IRQ_USBD, udc); | 1924 | free_irq(IRQ_USBD, udc); |
1932 | err_map: | 1925 | err_map: |
1926 | device_unregister(&udc->gadget.dev); | ||
1927 | err_device_add: | ||
1933 | iounmap(base_addr); | 1928 | iounmap(base_addr); |
1934 | err_mem: | 1929 | err_mem: |
1935 | release_mem_region(rsrc_start, rsrc_len); | 1930 | release_mem_region(rsrc_start, rsrc_len); |
@@ -1947,10 +1942,11 @@ static int s3c2410_udc_remove(struct platform_device *pdev) | |||
1947 | 1942 | ||
1948 | dev_dbg(&pdev->dev, "%s()\n", __func__); | 1943 | dev_dbg(&pdev->dev, "%s()\n", __func__); |
1949 | 1944 | ||
1950 | usb_del_gadget_udc(&udc->gadget); | ||
1951 | if (udc->driver) | 1945 | if (udc->driver) |
1952 | return -EBUSY; | 1946 | return -EBUSY; |
1953 | 1947 | ||
1948 | usb_del_gadget_udc(&udc->gadget); | ||
1949 | device_unregister(&udc->gadget.dev); | ||
1954 | debugfs_remove(udc->regs_info); | 1950 | debugfs_remove(udc->regs_info); |
1955 | 1951 | ||
1956 | if (udc_info && !udc_info->udc_command && | 1952 | if (udc_info && !udc_info->udc_command && |
diff --git a/drivers/usb/gadget/u_uac1.c b/drivers/usb/gadget/u_uac1.c index e0c5e88e03ed..c7d460f43390 100644 --- a/drivers/usb/gadget/u_uac1.c +++ b/drivers/usb/gadget/u_uac1.c | |||
@@ -240,8 +240,11 @@ static int gaudio_open_snd_dev(struct gaudio *card) | |||
240 | snd = &card->playback; | 240 | snd = &card->playback; |
241 | snd->filp = filp_open(fn_play, O_WRONLY, 0); | 241 | snd->filp = filp_open(fn_play, O_WRONLY, 0); |
242 | if (IS_ERR(snd->filp)) { | 242 | if (IS_ERR(snd->filp)) { |
243 | int ret = PTR_ERR(snd->filp); | ||
244 | |||
243 | ERROR(card, "No such PCM playback device: %s\n", fn_play); | 245 | ERROR(card, "No such PCM playback device: %s\n", fn_play); |
244 | snd->filp = NULL; | 246 | snd->filp = NULL; |
247 | return ret; | ||
245 | } | 248 | } |
246 | pcm_file = snd->filp->private_data; | 249 | pcm_file = snd->filp->private_data; |
247 | snd->substream = pcm_file->substream; | 250 | snd->substream = pcm_file->substream; |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index b416a3fc9959..5726cb144abf 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -748,11 +748,9 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
748 | /* guard against (alleged) silicon errata */ | 748 | /* guard against (alleged) silicon errata */ |
749 | if (cmd & CMD_IAAD) | 749 | if (cmd & CMD_IAAD) |
750 | ehci_dbg(ehci, "IAA with IAAD still set?\n"); | 750 | ehci_dbg(ehci, "IAA with IAAD still set?\n"); |
751 | if (ehci->async_iaa) { | 751 | if (ehci->async_iaa) |
752 | COUNT(ehci->stats.iaa); | 752 | COUNT(ehci->stats.iaa); |
753 | end_unlink_async(ehci); | 753 | end_unlink_async(ehci); |
754 | } else | ||
755 | ehci_dbg(ehci, "IAA with nothing unlinked?\n"); | ||
756 | } | 754 | } |
757 | 755 | ||
758 | /* remote wakeup [4.3.1] */ | 756 | /* remote wakeup [4.3.1] */ |
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index fd252f0cfb3a..5464665f0b6a 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
@@ -135,7 +135,7 @@ qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
135 | * qtd is updated in qh_completions(). Update the QH | 135 | * qtd is updated in qh_completions(). Update the QH |
136 | * overlay here. | 136 | * overlay here. |
137 | */ | 137 | */ |
138 | if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw->hw_current) { | 138 | if (qh->hw->hw_token & ACTIVE_BIT(ehci)) { |
139 | qh->hw->hw_qtd_next = qtd->hw_next; | 139 | qh->hw->hw_qtd_next = qtd->hw_next; |
140 | qtd = NULL; | 140 | qtd = NULL; |
141 | } | 141 | } |
@@ -449,11 +449,19 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
449 | else if (last_status == -EINPROGRESS && !urb->unlinked) | 449 | else if (last_status == -EINPROGRESS && !urb->unlinked) |
450 | continue; | 450 | continue; |
451 | 451 | ||
452 | /* qh unlinked; token in overlay may be most current */ | 452 | /* |
453 | if (state == QH_STATE_IDLE | 453 | * If this was the active qtd when the qh was unlinked |
454 | && cpu_to_hc32(ehci, qtd->qtd_dma) | 454 | * and the overlay's token is active, then the overlay |
455 | == hw->hw_current) { | 455 | * hasn't been written back to the qtd yet so use its |
456 | * token instead of the qtd's. After the qtd is | ||
457 | * processed and removed, the overlay won't be valid | ||
458 | * any more. | ||
459 | */ | ||
460 | if (state == QH_STATE_IDLE && | ||
461 | qh->qtd_list.next == &qtd->qtd_list && | ||
462 | (hw->hw_token & ACTIVE_BIT(ehci))) { | ||
456 | token = hc32_to_cpu(ehci, hw->hw_token); | 463 | token = hc32_to_cpu(ehci, hw->hw_token); |
464 | hw->hw_token &= ~ACTIVE_BIT(ehci); | ||
457 | 465 | ||
458 | /* An unlink may leave an incomplete | 466 | /* An unlink may leave an incomplete |
459 | * async transaction in the TT buffer. | 467 | * async transaction in the TT buffer. |
@@ -1170,7 +1178,7 @@ static void single_unlink_async(struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
1170 | struct ehci_qh *prev; | 1178 | struct ehci_qh *prev; |
1171 | 1179 | ||
1172 | /* Add to the end of the list of QHs waiting for the next IAAD */ | 1180 | /* Add to the end of the list of QHs waiting for the next IAAD */ |
1173 | qh->qh_state = QH_STATE_UNLINK; | 1181 | qh->qh_state = QH_STATE_UNLINK_WAIT; |
1174 | if (ehci->async_unlink) | 1182 | if (ehci->async_unlink) |
1175 | ehci->async_unlink_last->unlink_next = qh; | 1183 | ehci->async_unlink_last->unlink_next = qh; |
1176 | else | 1184 | else |
@@ -1213,9 +1221,19 @@ static void start_iaa_cycle(struct ehci_hcd *ehci, bool nested) | |||
1213 | 1221 | ||
1214 | /* Do only the first waiting QH (nVidia bug?) */ | 1222 | /* Do only the first waiting QH (nVidia bug?) */ |
1215 | qh = ehci->async_unlink; | 1223 | qh = ehci->async_unlink; |
1216 | ehci->async_iaa = qh; | 1224 | |
1217 | ehci->async_unlink = qh->unlink_next; | 1225 | /* |
1218 | qh->unlink_next = NULL; | 1226 | * Intel (?) bug: The HC can write back the overlay region |
1227 | * even after the IAA interrupt occurs. In self-defense, | ||
1228 | * always go through two IAA cycles for each QH. | ||
1229 | */ | ||
1230 | if (qh->qh_state == QH_STATE_UNLINK_WAIT) { | ||
1231 | qh->qh_state = QH_STATE_UNLINK; | ||
1232 | } else { | ||
1233 | ehci->async_iaa = qh; | ||
1234 | ehci->async_unlink = qh->unlink_next; | ||
1235 | qh->unlink_next = NULL; | ||
1236 | } | ||
1219 | 1237 | ||
1220 | /* Make sure the unlinks are all visible to the hardware */ | 1238 | /* Make sure the unlinks are all visible to the hardware */ |
1221 | wmb(); | 1239 | wmb(); |
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index 45b19e2c60ba..05e51432dd2f 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig | |||
@@ -7,11 +7,6 @@ | |||
7 | config USB_MUSB_HDRC | 7 | config USB_MUSB_HDRC |
8 | tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' | 8 | tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' |
9 | depends on USB && USB_GADGET | 9 | depends on USB && USB_GADGET |
10 | select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN) | ||
11 | select NOP_USB_XCEIV if (SOC_TI81XX || SOC_AM33XX) | ||
12 | select TWL4030_USB if MACH_OMAP_3430SDP | ||
13 | select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA | ||
14 | select OMAP_CONTROL_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA | ||
15 | select USB_OTG_UTILS | 10 | select USB_OTG_UTILS |
16 | help | 11 | help |
17 | Say Y here if your system has a dual role high speed USB | 12 | Say Y here if your system has a dual role high speed USB |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 60b41cc28da4..daec6e0f7e38 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1624,8 +1624,6 @@ EXPORT_SYMBOL_GPL(musb_dma_completion); | |||
1624 | 1624 | ||
1625 | /*-------------------------------------------------------------------------*/ | 1625 | /*-------------------------------------------------------------------------*/ |
1626 | 1626 | ||
1627 | #ifdef CONFIG_SYSFS | ||
1628 | |||
1629 | static ssize_t | 1627 | static ssize_t |
1630 | musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf) | 1628 | musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf) |
1631 | { | 1629 | { |
@@ -1742,8 +1740,6 @@ static const struct attribute_group musb_attr_group = { | |||
1742 | .attrs = musb_attributes, | 1740 | .attrs = musb_attributes, |
1743 | }; | 1741 | }; |
1744 | 1742 | ||
1745 | #endif /* sysfs */ | ||
1746 | |||
1747 | /* Only used to provide driver mode change events */ | 1743 | /* Only used to provide driver mode change events */ |
1748 | static void musb_irq_work(struct work_struct *data) | 1744 | static void musb_irq_work(struct work_struct *data) |
1749 | { | 1745 | { |
@@ -1968,11 +1964,9 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
1968 | if (status < 0) | 1964 | if (status < 0) |
1969 | goto fail4; | 1965 | goto fail4; |
1970 | 1966 | ||
1971 | #ifdef CONFIG_SYSFS | ||
1972 | status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group); | 1967 | status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group); |
1973 | if (status) | 1968 | if (status) |
1974 | goto fail5; | 1969 | goto fail5; |
1975 | #endif | ||
1976 | 1970 | ||
1977 | pm_runtime_put(musb->controller); | 1971 | pm_runtime_put(musb->controller); |
1978 | 1972 | ||
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 1762354fe793..1a42a458f2c4 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -51,7 +51,7 @@ struct omap2430_glue { | |||
51 | }; | 51 | }; |
52 | #define glue_to_musb(g) platform_get_drvdata(g->musb) | 52 | #define glue_to_musb(g) platform_get_drvdata(g->musb) |
53 | 53 | ||
54 | struct omap2430_glue *_glue; | 54 | static struct omap2430_glue *_glue; |
55 | 55 | ||
56 | static struct timer_list musb_idle_timer; | 56 | static struct timer_list musb_idle_timer; |
57 | 57 | ||
@@ -237,9 +237,13 @@ void omap_musb_mailbox(enum omap_musb_vbus_id_status status) | |||
237 | { | 237 | { |
238 | struct omap2430_glue *glue = _glue; | 238 | struct omap2430_glue *glue = _glue; |
239 | 239 | ||
240 | if (glue && glue_to_musb(glue)) { | 240 | if (!glue) { |
241 | glue->status = status; | 241 | pr_err("%s: musb core is not yet initialized\n", __func__); |
242 | } else { | 242 | return; |
243 | } | ||
244 | glue->status = status; | ||
245 | |||
246 | if (!glue_to_musb(glue)) { | ||
243 | pr_err("%s: musb core is not yet ready\n", __func__); | 247 | pr_err("%s: musb core is not yet ready\n", __func__); |
244 | return; | 248 | return; |
245 | } | 249 | } |
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c index e1814397ca3a..2bd03d261a50 100644 --- a/drivers/usb/otg/otg.c +++ b/drivers/usb/otg/otg.c | |||
@@ -130,7 +130,7 @@ struct usb_phy *usb_get_phy(enum usb_phy_type type) | |||
130 | spin_lock_irqsave(&phy_lock, flags); | 130 | spin_lock_irqsave(&phy_lock, flags); |
131 | 131 | ||
132 | phy = __usb_find_phy(&phy_list, type); | 132 | phy = __usb_find_phy(&phy_list, type); |
133 | if (IS_ERR(phy)) { | 133 | if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { |
134 | pr_err("unable to find transceiver of type %s\n", | 134 | pr_err("unable to find transceiver of type %s\n", |
135 | usb_phy_type_string(type)); | 135 | usb_phy_type_string(type)); |
136 | goto err0; | 136 | goto err0; |
@@ -228,7 +228,7 @@ struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index) | |||
228 | spin_lock_irqsave(&phy_lock, flags); | 228 | spin_lock_irqsave(&phy_lock, flags); |
229 | 229 | ||
230 | phy = __usb_find_phy_dev(dev, &phy_bind_list, index); | 230 | phy = __usb_find_phy_dev(dev, &phy_bind_list, index); |
231 | if (IS_ERR(phy)) { | 231 | if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { |
232 | pr_err("unable to find transceiver\n"); | 232 | pr_err("unable to find transceiver\n"); |
233 | goto err0; | 233 | goto err0; |
234 | } | 234 | } |
@@ -301,8 +301,12 @@ EXPORT_SYMBOL(devm_usb_put_phy); | |||
301 | */ | 301 | */ |
302 | void usb_put_phy(struct usb_phy *x) | 302 | void usb_put_phy(struct usb_phy *x) |
303 | { | 303 | { |
304 | if (x) | 304 | if (x) { |
305 | struct module *owner = x->dev->driver->owner; | ||
306 | |||
305 | put_device(x->dev); | 307 | put_device(x->dev); |
308 | module_put(owner); | ||
309 | } | ||
306 | } | 310 | } |
307 | EXPORT_SYMBOL(usb_put_phy); | 311 | EXPORT_SYMBOL(usb_put_phy); |
308 | 312 | ||
diff --git a/drivers/usb/phy/omap-control-usb.c b/drivers/usb/phy/omap-control-usb.c index 5323b71c3521..1419ceda9759 100644 --- a/drivers/usb/phy/omap-control-usb.c +++ b/drivers/usb/phy/omap-control-usb.c | |||
@@ -219,32 +219,26 @@ static int omap_control_usb_probe(struct platform_device *pdev) | |||
219 | 219 | ||
220 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, | 220 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, |
221 | "control_dev_conf"); | 221 | "control_dev_conf"); |
222 | control_usb->dev_conf = devm_request_and_ioremap(&pdev->dev, res); | 222 | control_usb->dev_conf = devm_ioremap_resource(&pdev->dev, res); |
223 | if (!control_usb->dev_conf) { | 223 | if (IS_ERR(control_usb->dev_conf)) |
224 | dev_err(&pdev->dev, "Failed to obtain io memory\n"); | 224 | return PTR_ERR(control_usb->dev_conf); |
225 | return -EADDRNOTAVAIL; | ||
226 | } | ||
227 | 225 | ||
228 | if (control_usb->type == OMAP_CTRL_DEV_TYPE1) { | 226 | if (control_usb->type == OMAP_CTRL_DEV_TYPE1) { |
229 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, | 227 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, |
230 | "otghs_control"); | 228 | "otghs_control"); |
231 | control_usb->otghs_control = devm_request_and_ioremap( | 229 | control_usb->otghs_control = devm_ioremap_resource( |
232 | &pdev->dev, res); | 230 | &pdev->dev, res); |
233 | if (!control_usb->otghs_control) { | 231 | if (IS_ERR(control_usb->otghs_control)) |
234 | dev_err(&pdev->dev, "Failed to obtain io memory\n"); | 232 | return PTR_ERR(control_usb->otghs_control); |
235 | return -EADDRNOTAVAIL; | ||
236 | } | ||
237 | } | 233 | } |
238 | 234 | ||
239 | if (control_usb->type == OMAP_CTRL_DEV_TYPE2) { | 235 | if (control_usb->type == OMAP_CTRL_DEV_TYPE2) { |
240 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, | 236 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, |
241 | "phy_power_usb"); | 237 | "phy_power_usb"); |
242 | control_usb->phy_power = devm_request_and_ioremap( | 238 | control_usb->phy_power = devm_ioremap_resource( |
243 | &pdev->dev, res); | 239 | &pdev->dev, res); |
244 | if (!control_usb->phy_power) { | 240 | if (IS_ERR(control_usb->phy_power)) |
245 | dev_dbg(&pdev->dev, "Failed to obtain io memory\n"); | 241 | return PTR_ERR(control_usb->phy_power); |
246 | return -EADDRNOTAVAIL; | ||
247 | } | ||
248 | 242 | ||
249 | control_usb->sys_clk = devm_clk_get(control_usb->dev, | 243 | control_usb->sys_clk = devm_clk_get(control_usb->dev, |
250 | "sys_clkin"); | 244 | "sys_clkin"); |
diff --git a/drivers/usb/phy/omap-usb3.c b/drivers/usb/phy/omap-usb3.c index fadc0c2b65bb..a6e60b1e102e 100644 --- a/drivers/usb/phy/omap-usb3.c +++ b/drivers/usb/phy/omap-usb3.c | |||
@@ -212,11 +212,9 @@ static int omap_usb3_probe(struct platform_device *pdev) | |||
212 | } | 212 | } |
213 | 213 | ||
214 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pll_ctrl"); | 214 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pll_ctrl"); |
215 | phy->pll_ctrl_base = devm_request_and_ioremap(&pdev->dev, res); | 215 | phy->pll_ctrl_base = devm_ioremap_resource(&pdev->dev, res); |
216 | if (!phy->pll_ctrl_base) { | 216 | if (IS_ERR(phy->pll_ctrl_base)) |
217 | dev_err(&pdev->dev, "ioremap of pll_ctrl failed\n"); | 217 | return PTR_ERR(phy->pll_ctrl_base); |
218 | return -ENOMEM; | ||
219 | } | ||
220 | 218 | ||
221 | phy->dev = &pdev->dev; | 219 | phy->dev = &pdev->dev; |
222 | 220 | ||
diff --git a/drivers/usb/phy/samsung-usbphy.c b/drivers/usb/phy/samsung-usbphy.c index 6ea553733832..967101ec15fd 100644 --- a/drivers/usb/phy/samsung-usbphy.c +++ b/drivers/usb/phy/samsung-usbphy.c | |||
@@ -787,11 +787,9 @@ static int samsung_usbphy_probe(struct platform_device *pdev) | |||
787 | return -ENODEV; | 787 | return -ENODEV; |
788 | } | 788 | } |
789 | 789 | ||
790 | phy_base = devm_request_and_ioremap(dev, phy_mem); | 790 | phy_base = devm_ioremap_resource(dev, phy_mem); |
791 | if (!phy_base) { | 791 | if (IS_ERR(phy_base)) |
792 | dev_err(dev, "%s: register mapping failed\n", __func__); | 792 | return PTR_ERR(phy_base); |
793 | return -ENXIO; | ||
794 | } | ||
795 | 793 | ||
796 | sphy = devm_kzalloc(dev, sizeof(*sphy), GFP_KERNEL); | 794 | sphy = devm_kzalloc(dev, sizeof(*sphy), GFP_KERNEL); |
797 | if (!sphy) | 795 | if (!sphy) |
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index edc0f0dcad83..4747d1c328ff 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -85,6 +85,7 @@ static const struct usb_device_id id_table[] = { | |||
85 | { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ | 85 | { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ |
86 | { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ | 86 | { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ |
87 | { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ | 87 | { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ |
88 | { USB_DEVICE(0x2405, 0x0003) }, /* West Mountain Radio RIGblaster Advantage */ | ||
88 | { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ | 89 | { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ |
89 | { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ | 90 | { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ |
90 | { USB_DEVICE(0x10C4, 0x815F) }, /* Timewave HamLinkUSB */ | 91 | { USB_DEVICE(0x10C4, 0x815F) }, /* Timewave HamLinkUSB */ |
@@ -150,6 +151,25 @@ static const struct usb_device_id id_table[] = { | |||
150 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ | 151 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ |
151 | { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ | 152 | { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ |
152 | { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */ | 153 | { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */ |
154 | { USB_DEVICE(0x1FB9, 0x0100) }, /* Lake Shore Model 121 Current Source */ | ||
155 | { USB_DEVICE(0x1FB9, 0x0200) }, /* Lake Shore Model 218A Temperature Monitor */ | ||
156 | { USB_DEVICE(0x1FB9, 0x0201) }, /* Lake Shore Model 219 Temperature Monitor */ | ||
157 | { USB_DEVICE(0x1FB9, 0x0202) }, /* Lake Shore Model 233 Temperature Transmitter */ | ||
158 | { USB_DEVICE(0x1FB9, 0x0203) }, /* Lake Shore Model 235 Temperature Transmitter */ | ||
159 | { USB_DEVICE(0x1FB9, 0x0300) }, /* Lake Shore Model 335 Temperature Controller */ | ||
160 | { USB_DEVICE(0x1FB9, 0x0301) }, /* Lake Shore Model 336 Temperature Controller */ | ||
161 | { USB_DEVICE(0x1FB9, 0x0302) }, /* Lake Shore Model 350 Temperature Controller */ | ||
162 | { USB_DEVICE(0x1FB9, 0x0303) }, /* Lake Shore Model 371 AC Bridge */ | ||
163 | { USB_DEVICE(0x1FB9, 0x0400) }, /* Lake Shore Model 411 Handheld Gaussmeter */ | ||
164 | { USB_DEVICE(0x1FB9, 0x0401) }, /* Lake Shore Model 425 Gaussmeter */ | ||
165 | { USB_DEVICE(0x1FB9, 0x0402) }, /* Lake Shore Model 455A Gaussmeter */ | ||
166 | { USB_DEVICE(0x1FB9, 0x0403) }, /* Lake Shore Model 475A Gaussmeter */ | ||
167 | { USB_DEVICE(0x1FB9, 0x0404) }, /* Lake Shore Model 465 Three Axis Gaussmeter */ | ||
168 | { USB_DEVICE(0x1FB9, 0x0600) }, /* Lake Shore Model 625A Superconducting MPS */ | ||
169 | { USB_DEVICE(0x1FB9, 0x0601) }, /* Lake Shore Model 642A Magnet Power Supply */ | ||
170 | { USB_DEVICE(0x1FB9, 0x0602) }, /* Lake Shore Model 648 Magnet Power Supply */ | ||
171 | { USB_DEVICE(0x1FB9, 0x0700) }, /* Lake Shore Model 737 VSM Controller */ | ||
172 | { USB_DEVICE(0x1FB9, 0x0701) }, /* Lake Shore Model 776 Hall Matrix */ | ||
153 | { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */ | 173 | { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */ |
154 | { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */ | 174 | { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */ |
155 | { USB_DEVICE(0x3195, 0xF281) }, /* Link Instruments MSO-28 */ | 175 | { USB_DEVICE(0x3195, 0xF281) }, /* Link Instruments MSO-28 */ |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index f7d339d8187b..558adfc05007 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -341,6 +341,8 @@ static void option_instat_callback(struct urb *urb); | |||
341 | #define CINTERION_PRODUCT_EU3_E 0x0051 | 341 | #define CINTERION_PRODUCT_EU3_E 0x0051 |
342 | #define CINTERION_PRODUCT_EU3_P 0x0052 | 342 | #define CINTERION_PRODUCT_EU3_P 0x0052 |
343 | #define CINTERION_PRODUCT_PH8 0x0053 | 343 | #define CINTERION_PRODUCT_PH8 0x0053 |
344 | #define CINTERION_PRODUCT_AH6 0x0055 | ||
345 | #define CINTERION_PRODUCT_PLS8 0x0060 | ||
344 | 346 | ||
345 | /* Olivetti products */ | 347 | /* Olivetti products */ |
346 | #define OLIVETTI_VENDOR_ID 0x0b3c | 348 | #define OLIVETTI_VENDOR_ID 0x0b3c |
@@ -579,6 +581,7 @@ static const struct usb_device_id option_ids[] = { | |||
579 | { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), | 581 | { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), |
580 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 582 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
581 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c05, USB_CLASS_COMM, 0x02, 0xff) }, | 583 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c05, USB_CLASS_COMM, 0x02, 0xff) }, |
584 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c1f, USB_CLASS_COMM, 0x02, 0xff) }, | ||
582 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) }, | 585 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) }, |
583 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff), | 586 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff), |
584 | .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, | 587 | .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, |
@@ -1260,6 +1263,8 @@ static const struct usb_device_id option_ids[] = { | |||
1260 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_E) }, | 1263 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_E) }, |
1261 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, | 1264 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, |
1262 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8) }, | 1265 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8) }, |
1266 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AH6) }, | ||
1267 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLS8) }, | ||
1263 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, | 1268 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, |
1264 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, | 1269 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, |
1265 | { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDM) }, | 1270 | { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDM) }, |
diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c index 9b1b96f2d095..31f81c3c15eb 100644 --- a/drivers/usb/serial/qcaux.c +++ b/drivers/usb/serial/qcaux.c | |||
@@ -69,6 +69,7 @@ static struct usb_device_id id_table[] = { | |||
69 | { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfd, 0xff) }, /* NMEA */ | 69 | { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfd, 0xff) }, /* NMEA */ |
70 | { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfe, 0xff) }, /* WMC */ | 70 | { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfe, 0xff) }, /* WMC */ |
71 | { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xff, 0xff) }, /* DIAG */ | 71 | { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xff, 0xff) }, /* DIAG */ |
72 | { USB_DEVICE_AND_INTERFACE_INFO(0x1fac, 0x0151, 0xff, 0xff, 0xff) }, | ||
72 | { }, | 73 | { }, |
73 | }; | 74 | }; |
74 | MODULE_DEVICE_TABLE(usb, id_table); | 75 | MODULE_DEVICE_TABLE(usb, id_table); |
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index 24662547dc5b..59b32b782126 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c | |||
@@ -197,12 +197,15 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
197 | 197 | ||
198 | if (is_gobi1k) { | 198 | if (is_gobi1k) { |
199 | /* Gobi 1K USB layout: | 199 | /* Gobi 1K USB layout: |
200 | * 0: serial port (doesn't respond) | 200 | * 0: DM/DIAG (use libqcdm from ModemManager for communication) |
201 | * 1: serial port (doesn't respond) | 201 | * 1: serial port (doesn't respond) |
202 | * 2: AT-capable modem port | 202 | * 2: AT-capable modem port |
203 | * 3: QMI/net | 203 | * 3: QMI/net |
204 | */ | 204 | */ |
205 | if (ifnum == 2) | 205 | if (ifnum == 0) { |
206 | dev_dbg(dev, "Gobi 1K DM/DIAG interface found\n"); | ||
207 | altsetting = 1; | ||
208 | } else if (ifnum == 2) | ||
206 | dev_dbg(dev, "Modem port found\n"); | 209 | dev_dbg(dev, "Modem port found\n"); |
207 | else | 210 | else |
208 | altsetting = -1; | 211 | altsetting = -1; |
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index 00e6c9bac8a3..d643a4d4d770 100644 --- a/drivers/usb/serial/quatech2.c +++ b/drivers/usb/serial/quatech2.c | |||
@@ -661,7 +661,9 @@ void qt2_process_read_urb(struct urb *urb) | |||
661 | __func__); | 661 | __func__); |
662 | break; | 662 | break; |
663 | } | 663 | } |
664 | tty_flip_buffer_push(&port->port); | 664 | |
665 | if (port_priv->is_open) | ||
666 | tty_flip_buffer_push(&port->port); | ||
665 | 667 | ||
666 | newport = *(ch + 3); | 668 | newport = *(ch + 3); |
667 | 669 | ||
@@ -704,7 +706,8 @@ void qt2_process_read_urb(struct urb *urb) | |||
704 | tty_insert_flip_string(&port->port, ch, 1); | 706 | tty_insert_flip_string(&port->port, ch, 1); |
705 | } | 707 | } |
706 | 708 | ||
707 | tty_flip_buffer_push(&port->port); | 709 | if (port_priv->is_open) |
710 | tty_flip_buffer_push(&port->port); | ||
708 | } | 711 | } |
709 | 712 | ||
710 | static void qt2_write_bulk_callback(struct urb *urb) | 713 | static void qt2_write_bulk_callback(struct urb *urb) |
diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c index 7ab9046ae0ec..105d900150c1 100644 --- a/drivers/usb/storage/initializers.c +++ b/drivers/usb/storage/initializers.c | |||
@@ -92,8 +92,8 @@ int usb_stor_ucr61s2b_init(struct us_data *us) | |||
92 | return 0; | 92 | return 0; |
93 | } | 93 | } |
94 | 94 | ||
95 | /* This places the HUAWEI usb dongles in multi-port mode */ | 95 | /* This places the HUAWEI E220 devices in multi-port mode */ |
96 | static int usb_stor_huawei_feature_init(struct us_data *us) | 96 | int usb_stor_huawei_e220_init(struct us_data *us) |
97 | { | 97 | { |
98 | int result; | 98 | int result; |
99 | 99 | ||
@@ -104,75 +104,3 @@ static int usb_stor_huawei_feature_init(struct us_data *us) | |||
104 | US_DEBUGP("Huawei mode set result is %d\n", result); | 104 | US_DEBUGP("Huawei mode set result is %d\n", result); |
105 | return 0; | 105 | return 0; |
106 | } | 106 | } |
107 | |||
108 | /* | ||
109 | * It will send a scsi switch command called rewind' to huawei dongle. | ||
110 | * When the dongle receives this command at the first time, | ||
111 | * it will reboot immediately. After rebooted, it will ignore this command. | ||
112 | * So it is unnecessary to read its response. | ||
113 | */ | ||
114 | static int usb_stor_huawei_scsi_init(struct us_data *us) | ||
115 | { | ||
116 | int result = 0; | ||
117 | int act_len = 0; | ||
118 | struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf; | ||
119 | char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00, | ||
120 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; | ||
121 | |||
122 | bcbw->Signature = cpu_to_le32(US_BULK_CB_SIGN); | ||
123 | bcbw->Tag = 0; | ||
124 | bcbw->DataTransferLength = 0; | ||
125 | bcbw->Flags = bcbw->Lun = 0; | ||
126 | bcbw->Length = sizeof(rewind_cmd); | ||
127 | memset(bcbw->CDB, 0, sizeof(bcbw->CDB)); | ||
128 | memcpy(bcbw->CDB, rewind_cmd, sizeof(rewind_cmd)); | ||
129 | |||
130 | result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcbw, | ||
131 | US_BULK_CB_WRAP_LEN, &act_len); | ||
132 | US_DEBUGP("transfer actual length=%d, result=%d\n", act_len, result); | ||
133 | return result; | ||
134 | } | ||
135 | |||
136 | /* | ||
137 | * It tries to find the supported Huawei USB dongles. | ||
138 | * In Huawei, they assign the following product IDs | ||
139 | * for all of their mobile broadband dongles, | ||
140 | * including the new dongles in the future. | ||
141 | * So if the product ID is not included in this list, | ||
142 | * it means it is not Huawei's mobile broadband dongles. | ||
143 | */ | ||
144 | static int usb_stor_huawei_dongles_pid(struct us_data *us) | ||
145 | { | ||
146 | struct usb_interface_descriptor *idesc; | ||
147 | int idProduct; | ||
148 | |||
149 | idesc = &us->pusb_intf->cur_altsetting->desc; | ||
150 | idProduct = le16_to_cpu(us->pusb_dev->descriptor.idProduct); | ||
151 | /* The first port is CDROM, | ||
152 | * means the dongle in the single port mode, | ||
153 | * and a switch command is required to be sent. */ | ||
154 | if (idesc && idesc->bInterfaceNumber == 0) { | ||
155 | if ((idProduct == 0x1001) | ||
156 | || (idProduct == 0x1003) | ||
157 | || (idProduct == 0x1004) | ||
158 | || (idProduct >= 0x1401 && idProduct <= 0x1500) | ||
159 | || (idProduct >= 0x1505 && idProduct <= 0x1600) | ||
160 | || (idProduct >= 0x1c02 && idProduct <= 0x2202)) { | ||
161 | return 1; | ||
162 | } | ||
163 | } | ||
164 | return 0; | ||
165 | } | ||
166 | |||
167 | int usb_stor_huawei_init(struct us_data *us) | ||
168 | { | ||
169 | int result = 0; | ||
170 | |||
171 | if (usb_stor_huawei_dongles_pid(us)) { | ||
172 | if (le16_to_cpu(us->pusb_dev->descriptor.idProduct) >= 0x1446) | ||
173 | result = usb_stor_huawei_scsi_init(us); | ||
174 | else | ||
175 | result = usb_stor_huawei_feature_init(us); | ||
176 | } | ||
177 | return result; | ||
178 | } | ||
diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h index 5376d4fc76f0..529327fbb06b 100644 --- a/drivers/usb/storage/initializers.h +++ b/drivers/usb/storage/initializers.h | |||
@@ -46,5 +46,5 @@ int usb_stor_euscsi_init(struct us_data *us); | |||
46 | * flash reader */ | 46 | * flash reader */ |
47 | int usb_stor_ucr61s2b_init(struct us_data *us); | 47 | int usb_stor_ucr61s2b_init(struct us_data *us); |
48 | 48 | ||
49 | /* This places the HUAWEI usb dongles in multi-port mode */ | 49 | /* This places the HUAWEI E220 devices in multi-port mode */ |
50 | int usb_stor_huawei_init(struct us_data *us); | 50 | int usb_stor_huawei_e220_init(struct us_data *us); |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 72923b56bbf6..da04a074e790 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -53,6 +53,14 @@ | |||
53 | * as opposed to devices that do something strangely or wrongly. | 53 | * as opposed to devices that do something strangely or wrongly. |
54 | */ | 54 | */ |
55 | 55 | ||
56 | /* In-kernel mode switching is deprecated. Do not add new devices to | ||
57 | * this list for the sole purpose of switching them to a different | ||
58 | * mode. Existing userspace solutions are superior. | ||
59 | * | ||
60 | * New mode switching devices should instead be added to the database | ||
61 | * maintained at http://www.draisberghof.de/usb_modeswitch/ | ||
62 | */ | ||
63 | |||
56 | #if !defined(CONFIG_USB_STORAGE_SDDR09) && \ | 64 | #if !defined(CONFIG_USB_STORAGE_SDDR09) && \ |
57 | !defined(CONFIG_USB_STORAGE_SDDR09_MODULE) | 65 | !defined(CONFIG_USB_STORAGE_SDDR09_MODULE) |
58 | #define NO_SDDR09 | 66 | #define NO_SDDR09 |
@@ -1527,10 +1535,335 @@ UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x0100, | |||
1527 | /* Reported by fangxiaozhi <huananhu@huawei.com> | 1535 | /* Reported by fangxiaozhi <huananhu@huawei.com> |
1528 | * This brings the HUAWEI data card devices into multi-port mode | 1536 | * This brings the HUAWEI data card devices into multi-port mode |
1529 | */ | 1537 | */ |
1530 | UNUSUAL_VENDOR_INTF(0x12d1, 0x08, 0x06, 0x50, | 1538 | UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000, |
1539 | "HUAWEI MOBILE", | ||
1540 | "Mass Storage", | ||
1541 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1542 | 0), | ||
1543 | UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000, | ||
1544 | "HUAWEI MOBILE", | ||
1545 | "Mass Storage", | ||
1546 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1547 | 0), | ||
1548 | UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000, | ||
1549 | "HUAWEI MOBILE", | ||
1550 | "Mass Storage", | ||
1551 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1552 | 0), | ||
1553 | UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000, | ||
1554 | "HUAWEI MOBILE", | ||
1555 | "Mass Storage", | ||
1556 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1557 | 0), | ||
1558 | UNUSUAL_DEV( 0x12d1, 0x1402, 0x0000, 0x0000, | ||
1559 | "HUAWEI MOBILE", | ||
1560 | "Mass Storage", | ||
1561 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1562 | 0), | ||
1563 | UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000, | ||
1564 | "HUAWEI MOBILE", | ||
1565 | "Mass Storage", | ||
1566 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1567 | 0), | ||
1568 | UNUSUAL_DEV( 0x12d1, 0x1404, 0x0000, 0x0000, | ||
1569 | "HUAWEI MOBILE", | ||
1570 | "Mass Storage", | ||
1571 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1572 | 0), | ||
1573 | UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000, | ||
1574 | "HUAWEI MOBILE", | ||
1575 | "Mass Storage", | ||
1576 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1577 | 0), | ||
1578 | UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000, | ||
1579 | "HUAWEI MOBILE", | ||
1580 | "Mass Storage", | ||
1581 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1582 | 0), | ||
1583 | UNUSUAL_DEV( 0x12d1, 0x1407, 0x0000, 0x0000, | ||
1584 | "HUAWEI MOBILE", | ||
1585 | "Mass Storage", | ||
1586 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1587 | 0), | ||
1588 | UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000, | ||
1589 | "HUAWEI MOBILE", | ||
1590 | "Mass Storage", | ||
1591 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1592 | 0), | ||
1593 | UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000, | ||
1594 | "HUAWEI MOBILE", | ||
1595 | "Mass Storage", | ||
1596 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1597 | 0), | ||
1598 | UNUSUAL_DEV( 0x12d1, 0x140A, 0x0000, 0x0000, | ||
1599 | "HUAWEI MOBILE", | ||
1600 | "Mass Storage", | ||
1601 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1602 | 0), | ||
1603 | UNUSUAL_DEV( 0x12d1, 0x140B, 0x0000, 0x0000, | ||
1604 | "HUAWEI MOBILE", | ||
1605 | "Mass Storage", | ||
1606 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1607 | 0), | ||
1608 | UNUSUAL_DEV( 0x12d1, 0x140C, 0x0000, 0x0000, | ||
1609 | "HUAWEI MOBILE", | ||
1610 | "Mass Storage", | ||
1611 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1612 | 0), | ||
1613 | UNUSUAL_DEV( 0x12d1, 0x140D, 0x0000, 0x0000, | ||
1614 | "HUAWEI MOBILE", | ||
1615 | "Mass Storage", | ||
1616 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1617 | 0), | ||
1618 | UNUSUAL_DEV( 0x12d1, 0x140E, 0x0000, 0x0000, | ||
1619 | "HUAWEI MOBILE", | ||
1620 | "Mass Storage", | ||
1621 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1622 | 0), | ||
1623 | UNUSUAL_DEV( 0x12d1, 0x140F, 0x0000, 0x0000, | ||
1624 | "HUAWEI MOBILE", | ||
1625 | "Mass Storage", | ||
1626 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1627 | 0), | ||
1628 | UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000, | ||
1629 | "HUAWEI MOBILE", | ||
1630 | "Mass Storage", | ||
1631 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1632 | 0), | ||
1633 | UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000, | ||
1634 | "HUAWEI MOBILE", | ||
1635 | "Mass Storage", | ||
1636 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1637 | 0), | ||
1638 | UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000, | ||
1639 | "HUAWEI MOBILE", | ||
1640 | "Mass Storage", | ||
1641 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1642 | 0), | ||
1643 | UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000, | ||
1644 | "HUAWEI MOBILE", | ||
1645 | "Mass Storage", | ||
1646 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1647 | 0), | ||
1648 | UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000, | ||
1649 | "HUAWEI MOBILE", | ||
1650 | "Mass Storage", | ||
1651 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1652 | 0), | ||
1653 | UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000, | ||
1654 | "HUAWEI MOBILE", | ||
1655 | "Mass Storage", | ||
1656 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1657 | 0), | ||
1658 | UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000, | ||
1659 | "HUAWEI MOBILE", | ||
1660 | "Mass Storage", | ||
1661 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1662 | 0), | ||
1663 | UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000, | ||
1664 | "HUAWEI MOBILE", | ||
1665 | "Mass Storage", | ||
1666 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1667 | 0), | ||
1668 | UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000, | ||
1669 | "HUAWEI MOBILE", | ||
1670 | "Mass Storage", | ||
1671 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1672 | 0), | ||
1673 | UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000, | ||
1674 | "HUAWEI MOBILE", | ||
1675 | "Mass Storage", | ||
1676 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1677 | 0), | ||
1678 | UNUSUAL_DEV( 0x12d1, 0x141A, 0x0000, 0x0000, | ||
1679 | "HUAWEI MOBILE", | ||
1680 | "Mass Storage", | ||
1681 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1682 | 0), | ||
1683 | UNUSUAL_DEV( 0x12d1, 0x141B, 0x0000, 0x0000, | ||
1684 | "HUAWEI MOBILE", | ||
1685 | "Mass Storage", | ||
1686 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1687 | 0), | ||
1688 | UNUSUAL_DEV( 0x12d1, 0x141C, 0x0000, 0x0000, | ||
1689 | "HUAWEI MOBILE", | ||
1690 | "Mass Storage", | ||
1691 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1692 | 0), | ||
1693 | UNUSUAL_DEV( 0x12d1, 0x141D, 0x0000, 0x0000, | ||
1694 | "HUAWEI MOBILE", | ||
1695 | "Mass Storage", | ||
1696 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1697 | 0), | ||
1698 | UNUSUAL_DEV( 0x12d1, 0x141E, 0x0000, 0x0000, | ||
1699 | "HUAWEI MOBILE", | ||
1700 | "Mass Storage", | ||
1701 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1702 | 0), | ||
1703 | UNUSUAL_DEV( 0x12d1, 0x141F, 0x0000, 0x0000, | ||
1704 | "HUAWEI MOBILE", | ||
1705 | "Mass Storage", | ||
1706 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1707 | 0), | ||
1708 | UNUSUAL_DEV( 0x12d1, 0x1420, 0x0000, 0x0000, | ||
1709 | "HUAWEI MOBILE", | ||
1710 | "Mass Storage", | ||
1711 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1712 | 0), | ||
1713 | UNUSUAL_DEV( 0x12d1, 0x1421, 0x0000, 0x0000, | ||
1714 | "HUAWEI MOBILE", | ||
1715 | "Mass Storage", | ||
1716 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1717 | 0), | ||
1718 | UNUSUAL_DEV( 0x12d1, 0x1422, 0x0000, 0x0000, | ||
1719 | "HUAWEI MOBILE", | ||
1720 | "Mass Storage", | ||
1721 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1722 | 0), | ||
1723 | UNUSUAL_DEV( 0x12d1, 0x1423, 0x0000, 0x0000, | ||
1724 | "HUAWEI MOBILE", | ||
1725 | "Mass Storage", | ||
1726 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1727 | 0), | ||
1728 | UNUSUAL_DEV( 0x12d1, 0x1424, 0x0000, 0x0000, | ||
1729 | "HUAWEI MOBILE", | ||
1730 | "Mass Storage", | ||
1731 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1732 | 0), | ||
1733 | UNUSUAL_DEV( 0x12d1, 0x1425, 0x0000, 0x0000, | ||
1734 | "HUAWEI MOBILE", | ||
1735 | "Mass Storage", | ||
1736 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1737 | 0), | ||
1738 | UNUSUAL_DEV( 0x12d1, 0x1426, 0x0000, 0x0000, | ||
1739 | "HUAWEI MOBILE", | ||
1740 | "Mass Storage", | ||
1741 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1742 | 0), | ||
1743 | UNUSUAL_DEV( 0x12d1, 0x1427, 0x0000, 0x0000, | ||
1744 | "HUAWEI MOBILE", | ||
1745 | "Mass Storage", | ||
1746 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1747 | 0), | ||
1748 | UNUSUAL_DEV( 0x12d1, 0x1428, 0x0000, 0x0000, | ||
1749 | "HUAWEI MOBILE", | ||
1750 | "Mass Storage", | ||
1751 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1752 | 0), | ||
1753 | UNUSUAL_DEV( 0x12d1, 0x1429, 0x0000, 0x0000, | ||
1754 | "HUAWEI MOBILE", | ||
1755 | "Mass Storage", | ||
1756 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1757 | 0), | ||
1758 | UNUSUAL_DEV( 0x12d1, 0x142A, 0x0000, 0x0000, | ||
1759 | "HUAWEI MOBILE", | ||
1760 | "Mass Storage", | ||
1761 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1762 | 0), | ||
1763 | UNUSUAL_DEV( 0x12d1, 0x142B, 0x0000, 0x0000, | ||
1764 | "HUAWEI MOBILE", | ||
1765 | "Mass Storage", | ||
1766 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1767 | 0), | ||
1768 | UNUSUAL_DEV( 0x12d1, 0x142C, 0x0000, 0x0000, | ||
1769 | "HUAWEI MOBILE", | ||
1770 | "Mass Storage", | ||
1771 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1772 | 0), | ||
1773 | UNUSUAL_DEV( 0x12d1, 0x142D, 0x0000, 0x0000, | ||
1774 | "HUAWEI MOBILE", | ||
1775 | "Mass Storage", | ||
1776 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1777 | 0), | ||
1778 | UNUSUAL_DEV( 0x12d1, 0x142E, 0x0000, 0x0000, | ||
1779 | "HUAWEI MOBILE", | ||
1780 | "Mass Storage", | ||
1781 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1782 | 0), | ||
1783 | UNUSUAL_DEV( 0x12d1, 0x142F, 0x0000, 0x0000, | ||
1784 | "HUAWEI MOBILE", | ||
1785 | "Mass Storage", | ||
1786 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1787 | 0), | ||
1788 | UNUSUAL_DEV( 0x12d1, 0x1430, 0x0000, 0x0000, | ||
1789 | "HUAWEI MOBILE", | ||
1790 | "Mass Storage", | ||
1791 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1792 | 0), | ||
1793 | UNUSUAL_DEV( 0x12d1, 0x1431, 0x0000, 0x0000, | ||
1794 | "HUAWEI MOBILE", | ||
1795 | "Mass Storage", | ||
1796 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1797 | 0), | ||
1798 | UNUSUAL_DEV( 0x12d1, 0x1432, 0x0000, 0x0000, | ||
1799 | "HUAWEI MOBILE", | ||
1800 | "Mass Storage", | ||
1801 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1802 | 0), | ||
1803 | UNUSUAL_DEV( 0x12d1, 0x1433, 0x0000, 0x0000, | ||
1804 | "HUAWEI MOBILE", | ||
1805 | "Mass Storage", | ||
1806 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1807 | 0), | ||
1808 | UNUSUAL_DEV( 0x12d1, 0x1434, 0x0000, 0x0000, | ||
1809 | "HUAWEI MOBILE", | ||
1810 | "Mass Storage", | ||
1811 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1812 | 0), | ||
1813 | UNUSUAL_DEV( 0x12d1, 0x1435, 0x0000, 0x0000, | ||
1814 | "HUAWEI MOBILE", | ||
1815 | "Mass Storage", | ||
1816 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1817 | 0), | ||
1818 | UNUSUAL_DEV( 0x12d1, 0x1436, 0x0000, 0x0000, | ||
1819 | "HUAWEI MOBILE", | ||
1820 | "Mass Storage", | ||
1821 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1822 | 0), | ||
1823 | UNUSUAL_DEV( 0x12d1, 0x1437, 0x0000, 0x0000, | ||
1824 | "HUAWEI MOBILE", | ||
1825 | "Mass Storage", | ||
1826 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1827 | 0), | ||
1828 | UNUSUAL_DEV( 0x12d1, 0x1438, 0x0000, 0x0000, | ||
1829 | "HUAWEI MOBILE", | ||
1830 | "Mass Storage", | ||
1831 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1832 | 0), | ||
1833 | UNUSUAL_DEV( 0x12d1, 0x1439, 0x0000, 0x0000, | ||
1834 | "HUAWEI MOBILE", | ||
1835 | "Mass Storage", | ||
1836 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1837 | 0), | ||
1838 | UNUSUAL_DEV( 0x12d1, 0x143A, 0x0000, 0x0000, | ||
1839 | "HUAWEI MOBILE", | ||
1840 | "Mass Storage", | ||
1841 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1842 | 0), | ||
1843 | UNUSUAL_DEV( 0x12d1, 0x143B, 0x0000, 0x0000, | ||
1844 | "HUAWEI MOBILE", | ||
1845 | "Mass Storage", | ||
1846 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1847 | 0), | ||
1848 | UNUSUAL_DEV( 0x12d1, 0x143C, 0x0000, 0x0000, | ||
1849 | "HUAWEI MOBILE", | ||
1850 | "Mass Storage", | ||
1851 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1852 | 0), | ||
1853 | UNUSUAL_DEV( 0x12d1, 0x143D, 0x0000, 0x0000, | ||
1854 | "HUAWEI MOBILE", | ||
1855 | "Mass Storage", | ||
1856 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1857 | 0), | ||
1858 | UNUSUAL_DEV( 0x12d1, 0x143E, 0x0000, 0x0000, | ||
1859 | "HUAWEI MOBILE", | ||
1860 | "Mass Storage", | ||
1861 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1862 | 0), | ||
1863 | UNUSUAL_DEV( 0x12d1, 0x143F, 0x0000, 0x0000, | ||
1531 | "HUAWEI MOBILE", | 1864 | "HUAWEI MOBILE", |
1532 | "Mass Storage", | 1865 | "Mass Storage", |
1533 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_init, | 1866 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, |
1534 | 0), | 1867 | 0), |
1535 | 1868 | ||
1536 | /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */ | 1869 | /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */ |