aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 16:27:36 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 16:27:36 -0500
commit9f9cba810f36d16f4e64477e879a69f6c47b389d (patch)
treed787abcbead1439d3f82f0719efe520fd9689f79 /drivers/usb
parentdbf5bef8da169b38db804996a661f8d634df8295 (diff)
parent949db153b6466c6f7cad5a427ecea94985927311 (diff)
Merge 3.8-rc5 into tty-next
This resolves a number of tty driver merge issues found in linux-next Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/Kconfig1
-rw-r--r--drivers/usb/chipidea/host.c3
-rw-r--r--drivers/usb/class/cdc-acm.c3
-rw-r--r--drivers/usb/core/hub.c120
-rw-r--r--drivers/usb/core/quirks.c3
-rw-r--r--drivers/usb/dwc3/debugfs.c2
-rw-r--r--drivers/usb/dwc3/gadget.c1
-rw-r--r--drivers/usb/gadget/amd5536udc.c4
-rw-r--r--drivers/usb/gadget/dummy_hcd.c9
-rw-r--r--drivers/usb/gadget/f_fs.c6
-rw-r--r--drivers/usb/gadget/fsl_mxc_udc.c40
-rw-r--r--drivers/usb/gadget/fsl_udc_core.c42
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.h5
-rw-r--r--drivers/usb/gadget/mv_udc_core.c4
-rw-r--r--drivers/usb/gadget/s3c-hsotg.c5
-rw-r--r--drivers/usb/gadget/tcm_usb_gadget.c3
-rw-r--r--drivers/usb/gadget/u_serial.c2
-rw-r--r--drivers/usb/host/Kconfig2
-rw-r--r--drivers/usb/host/Makefile1
-rw-r--r--drivers/usb/host/ehci-fsl.c9
-rw-r--r--drivers/usb/host/ehci-hcd.c12
-rw-r--r--drivers/usb/host/ehci-mv.c4
-rw-r--r--drivers/usb/host/ehci-mxc.c120
-rw-r--r--drivers/usb/host/ehci-pci.c39
-rw-r--r--drivers/usb/host/ehci.h7
-rw-r--r--drivers/usb/host/fsl-mph-dr-of.c3
-rw-r--r--drivers/usb/host/imx21-hcd.c1
-rw-r--r--drivers/usb/host/ohci-tmio.c3
-rw-r--r--drivers/usb/host/uhci-hcd.c15
-rw-r--r--drivers/usb/host/xhci-hub.c38
-rw-r--r--drivers/usb/host/xhci-mem.c2
-rw-r--r--drivers/usb/host/xhci-ring.c9
-rw-r--r--drivers/usb/host/xhci.c10
-rw-r--r--drivers/usb/misc/usbtest.c2
-rw-r--r--drivers/usb/musb/cppi_dma.c4
-rw-r--r--drivers/usb/musb/musb_core.c5
-rw-r--r--drivers/usb/musb/musb_dsps.c5
-rw-r--r--drivers/usb/otg/Kconfig2
-rw-r--r--drivers/usb/otg/mv_otg.c4
-rw-r--r--drivers/usb/renesas_usbhs/mod_gadget.c22
-rw-r--r--drivers/usb/renesas_usbhs/mod_host.c3
-rw-r--r--drivers/usb/serial/ftdi_sio.c2
-rw-r--r--drivers/usb/serial/ftdi_sio_ids.h6
-rw-r--r--drivers/usb/serial/io_ti.c3
-rw-r--r--drivers/usb/serial/option.c27
45 files changed, 398 insertions, 215 deletions
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 4c90b510d016..640ae6c6d2d2 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -37,6 +37,7 @@ config USB_ARCH_HAS_EHCI
37 default y if ARCH_W90X900 37 default y if ARCH_W90X900
38 default y if ARCH_AT91 38 default y if ARCH_AT91
39 default y if ARCH_MXC 39 default y if ARCH_MXC
40 default y if ARCH_MXS
40 default y if ARCH_OMAP3 41 default y if ARCH_OMAP3
41 default y if ARCH_CNS3XXX 42 default y if ARCH_CNS3XXX
42 default y if ARCH_VT8500 43 default y if ARCH_VT8500
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index caecad9213f5..8e9d31277c43 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -70,6 +70,9 @@ static int host_start(struct ci13xxx *ci)
70 else 70 else
71 ci->hcd = hcd; 71 ci->hcd = hcd;
72 72
73 if (ci->platdata->flags & CI13XXX_DISABLE_STREAMING)
74 hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);
75
73 return ret; 76 return ret;
74} 77}
75 78
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 15b36e2efa85..8ac25adf31b4 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1595,6 +1595,9 @@ static const struct usb_device_id acm_ids[] = {
1595 { USB_DEVICE(0x0572, 0x1340), /* Conexant CX93010-2x UCMxx */ 1595 { USB_DEVICE(0x0572, 0x1340), /* Conexant CX93010-2x UCMxx */
1596 .driver_info = NO_UNION_NORMAL, 1596 .driver_info = NO_UNION_NORMAL,
1597 }, 1597 },
1598 { USB_DEVICE(0x05f9, 0x4002), /* PSC Scanning, Magellan 800i */
1599 .driver_info = NO_UNION_NORMAL,
1600 },
1598 { USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */ 1601 { USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */
1599 .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ 1602 .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
1600 }, 1603 },
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index a815fd2cc5e7..957ed2c41482 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -877,6 +877,60 @@ static int hub_hub_status(struct usb_hub *hub,
877 return ret; 877 return ret;
878} 878}
879 879
880static int hub_set_port_link_state(struct usb_hub *hub, int port1,
881 unsigned int link_status)
882{
883 return set_port_feature(hub->hdev,
884 port1 | (link_status << 3),
885 USB_PORT_FEAT_LINK_STATE);
886}
887
888/*
889 * If USB 3.0 ports are placed into the Disabled state, they will no longer
890 * detect any device connects or disconnects. This is generally not what the
891 * USB core wants, since it expects a disabled port to produce a port status
892 * change event when a new device connects.
893 *
894 * Instead, set the link state to Disabled, wait for the link to settle into
895 * that state, clear any change bits, and then put the port into the RxDetect
896 * state.
897 */
898static int hub_usb3_port_disable(struct usb_hub *hub, int port1)
899{
900 int ret;
901 int total_time;
902 u16 portchange, portstatus;
903
904 if (!hub_is_superspeed(hub->hdev))
905 return -EINVAL;
906
907 ret = hub_set_port_link_state(hub, port1, USB_SS_PORT_LS_SS_DISABLED);
908 if (ret) {
909 dev_err(hub->intfdev, "cannot disable port %d (err = %d)\n",
910 port1, ret);
911 return ret;
912 }
913
914 /* Wait for the link to enter the disabled state. */
915 for (total_time = 0; ; total_time += HUB_DEBOUNCE_STEP) {
916 ret = hub_port_status(hub, port1, &portstatus, &portchange);
917 if (ret < 0)
918 return ret;
919
920 if ((portstatus & USB_PORT_STAT_LINK_STATE) ==
921 USB_SS_PORT_LS_SS_DISABLED)
922 break;
923 if (total_time >= HUB_DEBOUNCE_TIMEOUT)
924 break;
925 msleep(HUB_DEBOUNCE_STEP);
926 }
927 if (total_time >= HUB_DEBOUNCE_TIMEOUT)
928 dev_warn(hub->intfdev, "Could not disable port %d after %d ms\n",
929 port1, total_time);
930
931 return hub_set_port_link_state(hub, port1, USB_SS_PORT_LS_RX_DETECT);
932}
933
880static int hub_port_disable(struct usb_hub *hub, int port1, int set_state) 934static int hub_port_disable(struct usb_hub *hub, int port1, int set_state)
881{ 935{
882 struct usb_device *hdev = hub->hdev; 936 struct usb_device *hdev = hub->hdev;
@@ -885,8 +939,13 @@ static int hub_port_disable(struct usb_hub *hub, int port1, int set_state)
885 if (hub->ports[port1 - 1]->child && set_state) 939 if (hub->ports[port1 - 1]->child && set_state)
886 usb_set_device_state(hub->ports[port1 - 1]->child, 940 usb_set_device_state(hub->ports[port1 - 1]->child,
887 USB_STATE_NOTATTACHED); 941 USB_STATE_NOTATTACHED);
888 if (!hub->error && !hub_is_superspeed(hub->hdev)) 942 if (!hub->error) {
889 ret = clear_port_feature(hdev, port1, USB_PORT_FEAT_ENABLE); 943 if (hub_is_superspeed(hub->hdev))
944 ret = hub_usb3_port_disable(hub, port1);
945 else
946 ret = clear_port_feature(hdev, port1,
947 USB_PORT_FEAT_ENABLE);
948 }
890 if (ret) 949 if (ret)
891 dev_err(hub->intfdev, "cannot disable port %d (err = %d)\n", 950 dev_err(hub->intfdev, "cannot disable port %d (err = %d)\n",
892 port1, ret); 951 port1, ret);
@@ -2440,7 +2499,7 @@ static unsigned hub_is_wusb(struct usb_hub *hub)
2440#define HUB_SHORT_RESET_TIME 10 2499#define HUB_SHORT_RESET_TIME 10
2441#define HUB_BH_RESET_TIME 50 2500#define HUB_BH_RESET_TIME 50
2442#define HUB_LONG_RESET_TIME 200 2501#define HUB_LONG_RESET_TIME 200
2443#define HUB_RESET_TIMEOUT 500 2502#define HUB_RESET_TIMEOUT 800
2444 2503
2445static int hub_port_reset(struct usb_hub *hub, int port1, 2504static int hub_port_reset(struct usb_hub *hub, int port1,
2446 struct usb_device *udev, unsigned int delay, bool warm); 2505 struct usb_device *udev, unsigned int delay, bool warm);
@@ -2475,6 +2534,10 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
2475 if (ret < 0) 2534 if (ret < 0)
2476 return ret; 2535 return ret;
2477 2536
2537 /* The port state is unknown until the reset completes. */
2538 if ((portstatus & USB_PORT_STAT_RESET))
2539 goto delay;
2540
2478 /* 2541 /*
2479 * Some buggy devices require a warm reset to be issued even 2542 * Some buggy devices require a warm reset to be issued even
2480 * when the port appears not to be connected. 2543 * when the port appears not to be connected.
@@ -2520,11 +2583,7 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
2520 if ((portchange & USB_PORT_STAT_C_CONNECTION)) 2583 if ((portchange & USB_PORT_STAT_C_CONNECTION))
2521 return -ENOTCONN; 2584 return -ENOTCONN;
2522 2585
2523 /* if we`ve finished resetting, then break out of 2586 if ((portstatus & USB_PORT_STAT_ENABLE)) {
2524 * the loop
2525 */
2526 if (!(portstatus & USB_PORT_STAT_RESET) &&
2527 (portstatus & USB_PORT_STAT_ENABLE)) {
2528 if (hub_is_wusb(hub)) 2587 if (hub_is_wusb(hub))
2529 udev->speed = USB_SPEED_WIRELESS; 2588 udev->speed = USB_SPEED_WIRELESS;
2530 else if (hub_is_superspeed(hub->hdev)) 2589 else if (hub_is_superspeed(hub->hdev))
@@ -2538,10 +2597,15 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
2538 return 0; 2597 return 0;
2539 } 2598 }
2540 } else { 2599 } else {
2541 if (portchange & USB_PORT_STAT_C_BH_RESET) 2600 if (!(portstatus & USB_PORT_STAT_CONNECTION) ||
2542 return 0; 2601 hub_port_warm_reset_required(hub,
2602 portstatus))
2603 return -ENOTCONN;
2604
2605 return 0;
2543 } 2606 }
2544 2607
2608delay:
2545 /* switch to the long delay after two short delay failures */ 2609 /* switch to the long delay after two short delay failures */
2546 if (delay_time >= 2 * HUB_SHORT_RESET_TIME) 2610 if (delay_time >= 2 * HUB_SHORT_RESET_TIME)
2547 delay = HUB_LONG_RESET_TIME; 2611 delay = HUB_LONG_RESET_TIME;
@@ -2565,14 +2629,11 @@ static void hub_port_finish_reset(struct usb_hub *hub, int port1,
2565 msleep(10 + 40); 2629 msleep(10 + 40);
2566 update_devnum(udev, 0); 2630 update_devnum(udev, 0);
2567 hcd = bus_to_hcd(udev->bus); 2631 hcd = bus_to_hcd(udev->bus);
2568 if (hcd->driver->reset_device) { 2632 /* The xHC may think the device is already reset,
2569 *status = hcd->driver->reset_device(hcd, udev); 2633 * so ignore the status.
2570 if (*status < 0) { 2634 */
2571 dev_err(&udev->dev, "Cannot reset " 2635 if (hcd->driver->reset_device)
2572 "HCD device state\n"); 2636 hcd->driver->reset_device(hcd, udev);
2573 break;
2574 }
2575 }
2576 } 2637 }
2577 /* FALL THROUGH */ 2638 /* FALL THROUGH */
2578 case -ENOTCONN: 2639 case -ENOTCONN:
@@ -2580,16 +2641,16 @@ static void hub_port_finish_reset(struct usb_hub *hub, int port1,
2580 clear_port_feature(hub->hdev, 2641 clear_port_feature(hub->hdev,
2581 port1, USB_PORT_FEAT_C_RESET); 2642 port1, USB_PORT_FEAT_C_RESET);
2582 /* FIXME need disconnect() for NOTATTACHED device */ 2643 /* FIXME need disconnect() for NOTATTACHED device */
2583 if (warm) { 2644 if (hub_is_superspeed(hub->hdev)) {
2584 clear_port_feature(hub->hdev, port1, 2645 clear_port_feature(hub->hdev, port1,
2585 USB_PORT_FEAT_C_BH_PORT_RESET); 2646 USB_PORT_FEAT_C_BH_PORT_RESET);
2586 clear_port_feature(hub->hdev, port1, 2647 clear_port_feature(hub->hdev, port1,
2587 USB_PORT_FEAT_C_PORT_LINK_STATE); 2648 USB_PORT_FEAT_C_PORT_LINK_STATE);
2588 } else { 2649 }
2650 if (!warm)
2589 usb_set_device_state(udev, *status 2651 usb_set_device_state(udev, *status
2590 ? USB_STATE_NOTATTACHED 2652 ? USB_STATE_NOTATTACHED
2591 : USB_STATE_DEFAULT); 2653 : USB_STATE_DEFAULT);
2592 }
2593 break; 2654 break;
2594 } 2655 }
2595} 2656}
@@ -2939,7 +3000,7 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
2939static int finish_port_resume(struct usb_device *udev) 3000static int finish_port_resume(struct usb_device *udev)
2940{ 3001{
2941 int status = 0; 3002 int status = 0;
2942 u16 devstatus; 3003 u16 devstatus = 0;
2943 3004
2944 /* caller owns the udev device lock */ 3005 /* caller owns the udev device lock */
2945 dev_dbg(&udev->dev, "%s\n", 3006 dev_dbg(&udev->dev, "%s\n",
@@ -2984,7 +3045,13 @@ static int finish_port_resume(struct usb_device *udev)
2984 if (status) { 3045 if (status) {
2985 dev_dbg(&udev->dev, "gone after usb resume? status %d\n", 3046 dev_dbg(&udev->dev, "gone after usb resume? status %d\n",
2986 status); 3047 status);
2987 } else if (udev->actconfig) { 3048 /*
3049 * There are a few quirky devices which violate the standard
3050 * by claiming to have remote wakeup enabled after a reset,
3051 * which crash if the feature is cleared, hence check for
3052 * udev->reset_resume
3053 */
3054 } else if (udev->actconfig && !udev->reset_resume) {
2988 le16_to_cpus(&devstatus); 3055 le16_to_cpus(&devstatus);
2989 if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) { 3056 if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) {
2990 status = usb_control_msg(udev, 3057 status = usb_control_msg(udev,
@@ -4638,9 +4705,14 @@ static void hub_events(void)
4638 * SS.Inactive state. 4705 * SS.Inactive state.
4639 */ 4706 */
4640 if (hub_port_warm_reset_required(hub, portstatus)) { 4707 if (hub_port_warm_reset_required(hub, portstatus)) {
4708 int status;
4709
4641 dev_dbg(hub_dev, "warm reset port %d\n", i); 4710 dev_dbg(hub_dev, "warm reset port %d\n", i);
4642 hub_port_reset(hub, i, NULL, 4711 status = hub_port_reset(hub, i, NULL,
4643 HUB_BH_RESET_TIME, true); 4712 HUB_BH_RESET_TIME, true);
4713 if (status < 0)
4714 hub_port_disable(hub, i, 1);
4715 connect_change = 0;
4644 } 4716 }
4645 4717
4646 if (connect_change) 4718 if (connect_change)
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index fdefd9c7f7af..3113c1d71442 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -43,6 +43,9 @@ static const struct usb_device_id usb_quirk_list[] = {
43 /* Creative SB Audigy 2 NX */ 43 /* Creative SB Audigy 2 NX */
44 { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, 44 { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME },
45 45
46 /* Microsoft LifeCam-VX700 v2.0 */
47 { USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME },
48
46 /* Logitech Quickcam Fusion */ 49 /* Logitech Quickcam Fusion */
47 { USB_DEVICE(0x046d, 0x08c1), .driver_info = USB_QUIRK_RESET_RESUME }, 50 { USB_DEVICE(0x046d, 0x08c1), .driver_info = USB_QUIRK_RESET_RESUME },
48 51
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c
index 92604b4f9712..5945aadaa1c9 100644
--- a/drivers/usb/dwc3/debugfs.c
+++ b/drivers/usb/dwc3/debugfs.c
@@ -56,7 +56,7 @@
56#define dump_register(nm) \ 56#define dump_register(nm) \
57{ \ 57{ \
58 .name = __stringify(nm), \ 58 .name = __stringify(nm), \
59 .offset = DWC3_ ##nm, \ 59 .offset = DWC3_ ##nm - DWC3_GLOBALS_REGS_START, \
60} 60}
61 61
62static const struct debugfs_reg32 dwc3_regs[] = { 62static const struct debugfs_reg32 dwc3_regs[] = {
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 2e43b332aae8..2fdd767f8fe8 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1605,6 +1605,7 @@ static int dwc3_gadget_init_endpoints(struct dwc3 *dwc)
1605 1605
1606 if (epnum == 0 || epnum == 1) { 1606 if (epnum == 0 || epnum == 1) {
1607 dep->endpoint.maxpacket = 512; 1607 dep->endpoint.maxpacket = 512;
1608 dep->endpoint.maxburst = 1;
1608 dep->endpoint.ops = &dwc3_gadget_ep0_ops; 1609 dep->endpoint.ops = &dwc3_gadget_ep0_ops;
1609 if (!epnum) 1610 if (!epnum)
1610 dwc->gadget.ep0 = &dep->endpoint; 1611 dwc->gadget.ep0 = &dep->endpoint;
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c
index fc0ec5e0d58e..d9f6b9372491 100644
--- a/drivers/usb/gadget/amd5536udc.c
+++ b/drivers/usb/gadget/amd5536udc.c
@@ -3231,7 +3231,7 @@ static int udc_pci_probe(
3231 } 3231 }
3232 3232
3233 if (!pdev->irq) { 3233 if (!pdev->irq) {
3234 dev_err(&dev->pdev->dev, "irq not set\n"); 3234 dev_err(&pdev->dev, "irq not set\n");
3235 kfree(dev); 3235 kfree(dev);
3236 dev = NULL; 3236 dev = NULL;
3237 retval = -ENODEV; 3237 retval = -ENODEV;
@@ -3250,7 +3250,7 @@ static int udc_pci_probe(
3250 dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR); 3250 dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR);
3251 3251
3252 if (request_irq(pdev->irq, udc_irq, IRQF_SHARED, name, dev) != 0) { 3252 if (request_irq(pdev->irq, udc_irq, IRQF_SHARED, name, dev) != 0) {
3253 dev_dbg(&dev->pdev->dev, "request_irq(%d) fail\n", pdev->irq); 3253 dev_dbg(&pdev->dev, "request_irq(%d) fail\n", pdev->irq);
3254 kfree(dev); 3254 kfree(dev);
3255 dev = NULL; 3255 dev = NULL;
3256 retval = -EBUSY; 3256 retval = -EBUSY;
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 95d584dbed13..8cf0c0f6fa1f 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -130,10 +130,7 @@ static const char ep0name[] = "ep0";
130static const char *const ep_name[] = { 130static const char *const ep_name[] = {
131 ep0name, /* everyone has ep0 */ 131 ep0name, /* everyone has ep0 */
132 132
133 /* act like a net2280: high speed, six configurable endpoints */ 133 /* act like a pxa250: fifteen fixed function endpoints */
134 "ep-a", "ep-b", "ep-c", "ep-d", "ep-e", "ep-f",
135
136 /* or like pxa250: fifteen fixed function endpoints */
137 "ep1in-bulk", "ep2out-bulk", "ep3in-iso", "ep4out-iso", "ep5in-int", 134 "ep1in-bulk", "ep2out-bulk", "ep3in-iso", "ep4out-iso", "ep5in-int",
138 "ep6in-bulk", "ep7out-bulk", "ep8in-iso", "ep9out-iso", "ep10in-int", 135 "ep6in-bulk", "ep7out-bulk", "ep8in-iso", "ep9out-iso", "ep10in-int",
139 "ep11in-bulk", "ep12out-bulk", "ep13in-iso", "ep14out-iso", 136 "ep11in-bulk", "ep12out-bulk", "ep13in-iso", "ep14out-iso",
@@ -141,6 +138,10 @@ static const char *const ep_name[] = {
141 138
142 /* or like sa1100: two fixed function endpoints */ 139 /* or like sa1100: two fixed function endpoints */
143 "ep1out-bulk", "ep2in-bulk", 140 "ep1out-bulk", "ep2in-bulk",
141
142 /* and now some generic EPs so we have enough in multi config */
143 "ep3out", "ep4in", "ep5out", "ep6out", "ep7in", "ep8out", "ep9in",
144 "ep10out", "ep11out", "ep12in", "ep13out", "ep14in", "ep15out",
144}; 145};
145#define DUMMY_ENDPOINTS ARRAY_SIZE(ep_name) 146#define DUMMY_ENDPOINTS ARRAY_SIZE(ep_name)
146 147
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index 4a6961c517f2..8c2f25121149 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -1153,15 +1153,15 @@ static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts)
1153 pr_err("%s: unmapped value: %lu\n", opts, value); 1153 pr_err("%s: unmapped value: %lu\n", opts, value);
1154 return -EINVAL; 1154 return -EINVAL;
1155 } 1155 }
1156 } 1156 } else if (!memcmp(opts, "gid", 3)) {
1157 else if (!memcmp(opts, "gid", 3))
1158 data->perms.gid = make_kgid(current_user_ns(), value); 1157 data->perms.gid = make_kgid(current_user_ns(), value);
1159 if (!gid_valid(data->perms.gid)) { 1158 if (!gid_valid(data->perms.gid)) {
1160 pr_err("%s: unmapped value: %lu\n", opts, value); 1159 pr_err("%s: unmapped value: %lu\n", opts, value);
1161 return -EINVAL; 1160 return -EINVAL;
1162 } 1161 }
1163 else 1162 } else {
1164 goto invalid; 1163 goto invalid;
1164 }
1165 break; 1165 break;
1166 1166
1167 default: 1167 default:
diff --git a/drivers/usb/gadget/fsl_mxc_udc.c b/drivers/usb/gadget/fsl_mxc_udc.c
index 1b0f086426bd..d3bd7b095ba3 100644
--- a/drivers/usb/gadget/fsl_mxc_udc.c
+++ b/drivers/usb/gadget/fsl_mxc_udc.c
@@ -18,14 +18,13 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include <mach/hardware.h>
22
23static struct clk *mxc_ahb_clk; 21static struct clk *mxc_ahb_clk;
24static struct clk *mxc_per_clk; 22static struct clk *mxc_per_clk;
25static struct clk *mxc_ipg_clk; 23static struct clk *mxc_ipg_clk;
26 24
27/* workaround ENGcm09152 for i.MX35 */ 25/* workaround ENGcm09152 for i.MX35 */
28#define USBPHYCTRL_OTGBASE_OFFSET 0x608 26#define MX35_USBPHYCTRL_OFFSET 0x600
27#define USBPHYCTRL_OTGBASE_OFFSET 0x8
29#define USBPHYCTRL_EVDO (1 << 23) 28#define USBPHYCTRL_EVDO (1 << 23)
30 29
31int fsl_udc_clk_init(struct platform_device *pdev) 30int fsl_udc_clk_init(struct platform_device *pdev)
@@ -59,7 +58,7 @@ int fsl_udc_clk_init(struct platform_device *pdev)
59 clk_prepare_enable(mxc_per_clk); 58 clk_prepare_enable(mxc_per_clk);
60 59
61 /* make sure USB_CLK is running at 60 MHz +/- 1000 Hz */ 60 /* make sure USB_CLK is running at 60 MHz +/- 1000 Hz */
62 if (!cpu_is_mx51()) { 61 if (!strcmp(pdev->id_entry->name, "imx-udc-mx27")) {
63 freq = clk_get_rate(mxc_per_clk); 62 freq = clk_get_rate(mxc_per_clk);
64 if (pdata->phy_mode != FSL_USB2_PHY_ULPI && 63 if (pdata->phy_mode != FSL_USB2_PHY_ULPI &&
65 (freq < 59999000 || freq > 60001000)) { 64 (freq < 59999000 || freq > 60001000)) {
@@ -79,27 +78,40 @@ eclkrate:
79 return ret; 78 return ret;
80} 79}
81 80
82void fsl_udc_clk_finalize(struct platform_device *pdev) 81int fsl_udc_clk_finalize(struct platform_device *pdev)
83{ 82{
84 struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; 83 struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
85 if (cpu_is_mx35()) { 84 int ret = 0;
86 unsigned int v;
87 85
88 /* workaround ENGcm09152 for i.MX35 */ 86 /* workaround ENGcm09152 for i.MX35 */
89 if (pdata->workaround & FLS_USB2_WORKAROUND_ENGCM09152) { 87 if (pdata->workaround & FLS_USB2_WORKAROUND_ENGCM09152) {
90 v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + 88 unsigned int v;
91 USBPHYCTRL_OTGBASE_OFFSET)); 89 struct resource *res = platform_get_resource
92 writel(v | USBPHYCTRL_EVDO, 90 (pdev, IORESOURCE_MEM, 0);
93 MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + 91 void __iomem *phy_regs = ioremap(res->start +
94 USBPHYCTRL_OTGBASE_OFFSET)); 92 MX35_USBPHYCTRL_OFFSET, 512);
93 if (!phy_regs) {
94 dev_err(&pdev->dev, "ioremap for phy address fails\n");
95 ret = -EINVAL;
96 goto ioremap_err;
95 } 97 }
98
99 v = readl(phy_regs + USBPHYCTRL_OTGBASE_OFFSET);
100 writel(v | USBPHYCTRL_EVDO,
101 phy_regs + USBPHYCTRL_OTGBASE_OFFSET);
102
103 iounmap(phy_regs);
96 } 104 }
97 105
106
107ioremap_err:
98 /* ULPI transceivers don't need usbpll */ 108 /* ULPI transceivers don't need usbpll */
99 if (pdata->phy_mode == FSL_USB2_PHY_ULPI) { 109 if (pdata->phy_mode == FSL_USB2_PHY_ULPI) {
100 clk_disable_unprepare(mxc_per_clk); 110 clk_disable_unprepare(mxc_per_clk);
101 mxc_per_clk = NULL; 111 mxc_per_clk = NULL;
102 } 112 }
113
114 return ret;
103} 115}
104 116
105void fsl_udc_clk_release(void) 117void fsl_udc_clk_release(void)
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index c19f7f13790b..667275cb7bad 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -41,6 +41,7 @@
41#include <linux/fsl_devices.h> 41#include <linux/fsl_devices.h>
42#include <linux/dmapool.h> 42#include <linux/dmapool.h>
43#include <linux/delay.h> 43#include <linux/delay.h>
44#include <linux/of_device.h>
44 45
45#include <asm/byteorder.h> 46#include <asm/byteorder.h>
46#include <asm/io.h> 47#include <asm/io.h>
@@ -2438,11 +2439,6 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
2438 unsigned int i; 2439 unsigned int i;
2439 u32 dccparams; 2440 u32 dccparams;
2440 2441
2441 if (strcmp(pdev->name, driver_name)) {
2442 VDBG("Wrong device");
2443 return -ENODEV;
2444 }
2445
2446 udc_controller = kzalloc(sizeof(struct fsl_udc), GFP_KERNEL); 2442 udc_controller = kzalloc(sizeof(struct fsl_udc), GFP_KERNEL);
2447 if (udc_controller == NULL) { 2443 if (udc_controller == NULL) {
2448 ERR("malloc udc failed\n"); 2444 ERR("malloc udc failed\n");
@@ -2547,7 +2543,9 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
2547 dr_controller_setup(udc_controller); 2543 dr_controller_setup(udc_controller);
2548 } 2544 }
2549 2545
2550 fsl_udc_clk_finalize(pdev); 2546 ret = fsl_udc_clk_finalize(pdev);
2547 if (ret)
2548 goto err_free_irq;
2551 2549
2552 /* Setup gadget structure */ 2550 /* Setup gadget structure */
2553 udc_controller->gadget.ops = &fsl_gadget_ops; 2551 udc_controller->gadget.ops = &fsl_gadget_ops;
@@ -2756,22 +2754,32 @@ static int fsl_udc_otg_resume(struct device *dev)
2756 2754
2757 return fsl_udc_resume(NULL); 2755 return fsl_udc_resume(NULL);
2758} 2756}
2759
2760/*------------------------------------------------------------------------- 2757/*-------------------------------------------------------------------------
2761 Register entry point for the peripheral controller driver 2758 Register entry point for the peripheral controller driver
2762--------------------------------------------------------------------------*/ 2759--------------------------------------------------------------------------*/
2763 2760static const struct platform_device_id fsl_udc_devtype[] = {
2761 {
2762 .name = "imx-udc-mx27",
2763 }, {
2764 .name = "imx-udc-mx51",
2765 }, {
2766 /* sentinel */
2767 }
2768};
2769MODULE_DEVICE_TABLE(platform, fsl_udc_devtype);
2764static struct platform_driver udc_driver = { 2770static struct platform_driver udc_driver = {
2765 .remove = __exit_p(fsl_udc_remove), 2771 .remove = __exit_p(fsl_udc_remove),
2772 /* Just for FSL i.mx SoC currently */
2773 .id_table = fsl_udc_devtype,
2766 /* these suspend and resume are not usb suspend and resume */ 2774 /* these suspend and resume are not usb suspend and resume */
2767 .suspend = fsl_udc_suspend, 2775 .suspend = fsl_udc_suspend,
2768 .resume = fsl_udc_resume, 2776 .resume = fsl_udc_resume,
2769 .driver = { 2777 .driver = {
2770 .name = (char *)driver_name, 2778 .name = (char *)driver_name,
2771 .owner = THIS_MODULE, 2779 .owner = THIS_MODULE,
2772 /* udc suspend/resume called from OTG driver */ 2780 /* udc suspend/resume called from OTG driver */
2773 .suspend = fsl_udc_otg_suspend, 2781 .suspend = fsl_udc_otg_suspend,
2774 .resume = fsl_udc_otg_resume, 2782 .resume = fsl_udc_otg_resume,
2775 }, 2783 },
2776}; 2784};
2777 2785
diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h
index f61a967f7082..c6703bb07b23 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.h
+++ b/drivers/usb/gadget/fsl_usb2_udc.h
@@ -592,15 +592,16 @@ static inline struct ep_queue_head *get_qh_by_ep(struct fsl_ep *ep)
592struct platform_device; 592struct platform_device;
593#ifdef CONFIG_ARCH_MXC 593#ifdef CONFIG_ARCH_MXC
594int fsl_udc_clk_init(struct platform_device *pdev); 594int fsl_udc_clk_init(struct platform_device *pdev);
595void fsl_udc_clk_finalize(struct platform_device *pdev); 595int fsl_udc_clk_finalize(struct platform_device *pdev);
596void fsl_udc_clk_release(void); 596void fsl_udc_clk_release(void);
597#else 597#else
598static inline int fsl_udc_clk_init(struct platform_device *pdev) 598static inline int fsl_udc_clk_init(struct platform_device *pdev)
599{ 599{
600 return 0; 600 return 0;
601} 601}
602static inline void fsl_udc_clk_finalize(struct platform_device *pdev) 602static inline int fsl_udc_clk_finalize(struct platform_device *pdev)
603{ 603{
604 return 0;
604} 605}
605static inline void fsl_udc_clk_release(void) 606static inline void fsl_udc_clk_release(void)
606{ 607{
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c
index 379aac7b82fc..6e8b1272ebce 100644
--- a/drivers/usb/gadget/mv_udc_core.c
+++ b/drivers/usb/gadget/mv_udc_core.c
@@ -1012,7 +1012,7 @@ static void udc_clock_enable(struct mv_udc *udc)
1012 unsigned int i; 1012 unsigned int i;
1013 1013
1014 for (i = 0; i < udc->clknum; i++) 1014 for (i = 0; i < udc->clknum; i++)
1015 clk_enable(udc->clk[i]); 1015 clk_prepare_enable(udc->clk[i]);
1016} 1016}
1017 1017
1018static void udc_clock_disable(struct mv_udc *udc) 1018static void udc_clock_disable(struct mv_udc *udc)
@@ -1020,7 +1020,7 @@ static void udc_clock_disable(struct mv_udc *udc)
1020 unsigned int i; 1020 unsigned int i;
1021 1021
1022 for (i = 0; i < udc->clknum; i++) 1022 for (i = 0; i < udc->clknum; i++)
1023 clk_disable(udc->clk[i]); 1023 clk_disable_unprepare(udc->clk[i]);
1024} 1024}
1025 1025
1026static void udc_stop(struct mv_udc *udc) 1026static void udc_stop(struct mv_udc *udc)
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index 141971d9051e..439c3f972f8c 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -3477,12 +3477,11 @@ static void s3c_hsotg_delete_debug(struct s3c_hsotg *hsotg)
3477/** 3477/**
3478 * s3c_hsotg_release - release callback for hsotg device 3478 * s3c_hsotg_release - release callback for hsotg device
3479 * @dev: Device to for which release is called 3479 * @dev: Device to for which release is called
3480 *
3481 * Nothing to do as the resource is allocated using devm_ API.
3480 */ 3482 */
3481static void s3c_hsotg_release(struct device *dev) 3483static void s3c_hsotg_release(struct device *dev)
3482{ 3484{
3483 struct s3c_hsotg *hsotg = dev_get_drvdata(dev);
3484
3485 kfree(hsotg);
3486} 3485}
3487 3486
3488/** 3487/**
diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c
index 4f7f76f00c74..7cacd6ae818e 100644
--- a/drivers/usb/gadget/tcm_usb_gadget.c
+++ b/drivers/usb/gadget/tcm_usb_gadget.c
@@ -1794,9 +1794,10 @@ static int tcm_usbg_drop_nexus(struct usbg_tpg *tpg)
1794 tpg->tpg_nexus = NULL; 1794 tpg->tpg_nexus = NULL;
1795 1795
1796 kfree(tv_nexus); 1796 kfree(tv_nexus);
1797 ret = 0;
1797out: 1798out:
1798 mutex_unlock(&tpg->tpg_mutex); 1799 mutex_unlock(&tpg->tpg_mutex);
1799 return 0; 1800 return ret;
1800} 1801}
1801 1802
1802static ssize_t tcm_usbg_tpg_store_nexus( 1803static ssize_t tcm_usbg_tpg_store_nexus(
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index ca4fc3d3e7ff..46b1cc773ab8 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -884,7 +884,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
884 pr_debug("gs_close: ttyGS%d (%p,%p) done!\n", 884 pr_debug("gs_close: ttyGS%d (%p,%p) done!\n",
885 port->port_num, tty, file); 885 port->port_num, tty, file);
886 886
887 wake_up_interruptible(&port->port.close_wait); 887 wake_up(&port->port.close_wait);
888exit: 888exit:
889 spin_unlock_irq(&port->port_lock); 889 spin_unlock_irq(&port->port_lock);
890} 890}
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index d6bb128ce21e..3a21c5d683c0 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -148,7 +148,7 @@ config USB_EHCI_FSL
148 Variation of ARC USB block used in some Freescale chips. 148 Variation of ARC USB block used in some Freescale chips.
149 149
150config USB_EHCI_MXC 150config USB_EHCI_MXC
151 bool "Support for Freescale i.MX on-chip EHCI USB controller" 151 tristate "Support for Freescale i.MX on-chip EHCI USB controller"
152 depends on USB_EHCI_HCD && ARCH_MXC 152 depends on USB_EHCI_HCD && ARCH_MXC
153 select USB_EHCI_ROOT_HUB_TT 153 select USB_EHCI_ROOT_HUB_TT
154 ---help--- 154 ---help---
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 1eb4c3006e9e..001fbff2fdef 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_PCI) += pci-quirks.o
26obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o 26obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
27obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o 27obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
28obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o 28obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o
29obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o
29 30
30obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o 31obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o
31obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o 32obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index fd9b5424b860..d81d2fcbff18 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -230,7 +230,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
230 230
231 switch (phy_mode) { 231 switch (phy_mode) {
232 case FSL_USB2_PHY_ULPI: 232 case FSL_USB2_PHY_ULPI:
233 if (pdata->controller_ver) { 233 if (pdata->have_sysif_regs && pdata->controller_ver) {
234 /* controller version 1.6 or above */ 234 /* controller version 1.6 or above */
235 setbits32(non_ehci + FSL_SOC_USB_CTRL, 235 setbits32(non_ehci + FSL_SOC_USB_CTRL,
236 ULPI_PHY_CLK_SEL); 236 ULPI_PHY_CLK_SEL);
@@ -251,7 +251,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
251 portsc |= PORT_PTS_PTW; 251 portsc |= PORT_PTS_PTW;
252 /* fall through */ 252 /* fall through */
253 case FSL_USB2_PHY_UTMI: 253 case FSL_USB2_PHY_UTMI:
254 if (pdata->controller_ver) { 254 if (pdata->have_sysif_regs && pdata->controller_ver) {
255 /* controller version 1.6 or above */ 255 /* controller version 1.6 or above */
256 setbits32(non_ehci + FSL_SOC_USB_CTRL, UTMI_PHY_EN); 256 setbits32(non_ehci + FSL_SOC_USB_CTRL, UTMI_PHY_EN);
257 mdelay(FSL_UTMI_PHY_DLY); /* Delay for UTMI PHY CLK to 257 mdelay(FSL_UTMI_PHY_DLY); /* Delay for UTMI PHY CLK to
@@ -267,7 +267,8 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
267 break; 267 break;
268 } 268 }
269 269
270 if (pdata->controller_ver && (phy_mode == FSL_USB2_PHY_ULPI)) { 270 if (pdata->have_sysif_regs && pdata->controller_ver &&
271 (phy_mode == FSL_USB2_PHY_ULPI)) {
271 /* check PHY_CLK_VALID to get phy clk valid */ 272 /* check PHY_CLK_VALID to get phy clk valid */
272 if (!spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) & 273 if (!spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) &
273 PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0)) { 274 PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0)) {
@@ -278,7 +279,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
278 279
279 ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); 280 ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]);
280 281
281 if (phy_mode != FSL_USB2_PHY_ULPI) 282 if (phy_mode != FSL_USB2_PHY_ULPI && pdata->have_sysif_regs)
282 setbits32(non_ehci + FSL_SOC_USB_CTRL, USB_CTRL_USB_EN); 283 setbits32(non_ehci + FSL_SOC_USB_CTRL, USB_CTRL_USB_EN);
283 284
284 return 0; 285 return 0;
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index c97503bb0b0e..09537b2f1002 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -74,10 +74,6 @@ static const char hcd_name [] = "ehci_hcd";
74#undef VERBOSE_DEBUG 74#undef VERBOSE_DEBUG
75#undef EHCI_URB_TRACE 75#undef EHCI_URB_TRACE
76 76
77#ifdef DEBUG
78#define EHCI_STATS
79#endif
80
81/* magic numbers that can affect system performance */ 77/* magic numbers that can affect system performance */
82#define EHCI_TUNE_CERR 3 /* 0-3 qtd retries; 0 == don't stop */ 78#define EHCI_TUNE_CERR 3 /* 0-3 qtd retries; 0 == don't stop */
83#define EHCI_TUNE_RL_HS 4 /* nak throttle; see 4.9 */ 79#define EHCI_TUNE_RL_HS 4 /* nak throttle; see 4.9 */
@@ -1250,11 +1246,6 @@ MODULE_LICENSE ("GPL");
1250#define PLATFORM_DRIVER ehci_fsl_driver 1246#define PLATFORM_DRIVER ehci_fsl_driver
1251#endif 1247#endif
1252 1248
1253#ifdef CONFIG_USB_EHCI_MXC
1254#include "ehci-mxc.c"
1255#define PLATFORM_DRIVER ehci_mxc_driver
1256#endif
1257
1258#ifdef CONFIG_USB_EHCI_SH 1249#ifdef CONFIG_USB_EHCI_SH
1259#include "ehci-sh.c" 1250#include "ehci-sh.c"
1260#define PLATFORM_DRIVER ehci_hcd_sh_driver 1251#define PLATFORM_DRIVER ehci_hcd_sh_driver
@@ -1352,7 +1343,8 @@ MODULE_LICENSE ("GPL");
1352 1343
1353#if !IS_ENABLED(CONFIG_USB_EHCI_PCI) && \ 1344#if !IS_ENABLED(CONFIG_USB_EHCI_PCI) && \
1354 !IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \ 1345 !IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \
1355 !defined(CONFIG_USB_CHIPIDEA_HOST) && \ 1346 !IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \
1347 !IS_ENABLED(CONFIG_USB_EHCI_MXC) && \
1356 !defined(PLATFORM_DRIVER) && \ 1348 !defined(PLATFORM_DRIVER) && \
1357 !defined(PS3_SYSTEM_BUS_DRIVER) && \ 1349 !defined(PS3_SYSTEM_BUS_DRIVER) && \
1358 !defined(OF_PLATFORM_DRIVER) && \ 1350 !defined(OF_PLATFORM_DRIVER) && \
diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c
index f7bfc0b898b9..6c56297ea16b 100644
--- a/drivers/usb/host/ehci-mv.c
+++ b/drivers/usb/host/ehci-mv.c
@@ -43,7 +43,7 @@ static void ehci_clock_enable(struct ehci_hcd_mv *ehci_mv)
43 unsigned int i; 43 unsigned int i;
44 44
45 for (i = 0; i < ehci_mv->clknum; i++) 45 for (i = 0; i < ehci_mv->clknum; i++)
46 clk_enable(ehci_mv->clk[i]); 46 clk_prepare_enable(ehci_mv->clk[i]);
47} 47}
48 48
49static void ehci_clock_disable(struct ehci_hcd_mv *ehci_mv) 49static void ehci_clock_disable(struct ehci_hcd_mv *ehci_mv)
@@ -51,7 +51,7 @@ static void ehci_clock_disable(struct ehci_hcd_mv *ehci_mv)
51 unsigned int i; 51 unsigned int i;
52 52
53 for (i = 0; i < ehci_mv->clknum; i++) 53 for (i = 0; i < ehci_mv->clknum; i++)
54 clk_disable(ehci_mv->clk[i]); 54 clk_disable_unprepare(ehci_mv->clk[i]);
55} 55}
56 56
57static int mv_ehci_enable(struct ehci_hcd_mv *ehci_mv) 57static int mv_ehci_enable(struct ehci_hcd_mv *ehci_mv)
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index ec7f5d2c90de..dedb80bb8d40 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -17,75 +17,38 @@
17 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */ 18 */
19 19
20#include <linux/kernel.h>
21#include <linux/module.h>
22#include <linux/io.h>
20#include <linux/platform_device.h> 23#include <linux/platform_device.h>
21#include <linux/clk.h> 24#include <linux/clk.h>
22#include <linux/delay.h> 25#include <linux/delay.h>
23#include <linux/usb/otg.h> 26#include <linux/usb/otg.h>
24#include <linux/usb/ulpi.h> 27#include <linux/usb/ulpi.h>
25#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/usb.h>
30#include <linux/usb/hcd.h>
26 31
27#include <linux/platform_data/usb-ehci-mxc.h> 32#include <linux/platform_data/usb-ehci-mxc.h>
28 33
29#include <asm/mach-types.h> 34#include <asm/mach-types.h>
30 35
36#include "ehci.h"
37
38#define DRIVER_DESC "Freescale On-Chip EHCI Host driver"
39
40static const char hcd_name[] = "ehci-mxc";
41
31#define ULPI_VIEWPORT_OFFSET 0x170 42#define ULPI_VIEWPORT_OFFSET 0x170
32 43
33struct ehci_mxc_priv { 44struct ehci_mxc_priv {
34 struct clk *usbclk, *ahbclk, *phyclk; 45 struct clk *usbclk, *ahbclk, *phyclk;
35 struct usb_hcd *hcd;
36}; 46};
37 47
38/* called during probe() after chip reset completes */ 48static struct hc_driver __read_mostly ehci_mxc_hc_driver;
39static int ehci_mxc_setup(struct usb_hcd *hcd)
40{
41 hcd->has_tt = 1;
42
43 return ehci_setup(hcd);
44}
45 49
46static const struct hc_driver ehci_mxc_hc_driver = { 50static const struct ehci_driver_overrides ehci_mxc_overrides __initdata = {
47 .description = hcd_name, 51 .extra_priv_size = sizeof(struct ehci_mxc_priv),
48 .product_desc = "Freescale On-Chip EHCI Host Controller",
49 .hcd_priv_size = sizeof(struct ehci_hcd),
50
51 /*
52 * generic hardware linkage
53 */
54 .irq = ehci_irq,
55 .flags = HCD_USB2 | HCD_MEMORY,
56
57 /*
58 * basic lifecycle operations
59 */
60 .reset = ehci_mxc_setup,
61 .start = ehci_run,
62 .stop = ehci_stop,
63 .shutdown = ehci_shutdown,
64
65 /*
66 * managing i/o requests and associated device resources
67 */
68 .urb_enqueue = ehci_urb_enqueue,
69 .urb_dequeue = ehci_urb_dequeue,
70 .endpoint_disable = ehci_endpoint_disable,
71 .endpoint_reset = ehci_endpoint_reset,
72
73 /*
74 * scheduling support
75 */
76 .get_frame_number = ehci_get_frame,
77
78 /*
79 * root hub support
80 */
81 .hub_status_data = ehci_hub_status_data,
82 .hub_control = ehci_hub_control,
83 .bus_suspend = ehci_bus_suspend,
84 .bus_resume = ehci_bus_resume,
85 .relinquish_port = ehci_relinquish_port,
86 .port_handed_over = ehci_port_handed_over,
87
88 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
89}; 52};
90 53
91static int ehci_mxc_drv_probe(struct platform_device *pdev) 54static int ehci_mxc_drv_probe(struct platform_device *pdev)
@@ -112,12 +75,6 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
112 if (!hcd) 75 if (!hcd)
113 return -ENOMEM; 76 return -ENOMEM;
114 77
115 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
116 if (!priv) {
117 ret = -ENOMEM;
118 goto err_alloc;
119 }
120
121 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 78 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
122 if (!res) { 79 if (!res) {
123 dev_err(dev, "Found HC with no register addr. Check setup!\n"); 80 dev_err(dev, "Found HC with no register addr. Check setup!\n");
@@ -135,6 +92,10 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
135 goto err_alloc; 92 goto err_alloc;
136 } 93 }
137 94
95 hcd->has_tt = 1;
96 ehci = hcd_to_ehci(hcd);
97 priv = (struct ehci_mxc_priv *) ehci->priv;
98
138 /* enable clocks */ 99 /* enable clocks */
139 priv->usbclk = devm_clk_get(&pdev->dev, "ipg"); 100 priv->usbclk = devm_clk_get(&pdev->dev, "ipg");
140 if (IS_ERR(priv->usbclk)) { 101 if (IS_ERR(priv->usbclk)) {
@@ -169,8 +130,6 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
169 mdelay(10); 130 mdelay(10);
170 } 131 }
171 132
172 ehci = hcd_to_ehci(hcd);
173
174 /* EHCI registers start at offset 0x100 */ 133 /* EHCI registers start at offset 0x100 */
175 ehci->caps = hcd->regs + 0x100; 134 ehci->caps = hcd->regs + 0x100;
176 ehci->regs = hcd->regs + 0x100 + 135 ehci->regs = hcd->regs + 0x100 +
@@ -198,8 +157,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
198 } 157 }
199 } 158 }
200 159
201 priv->hcd = hcd; 160 platform_set_drvdata(pdev, hcd);
202 platform_set_drvdata(pdev, priv);
203 161
204 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); 162 ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
205 if (ret) 163 if (ret)
@@ -244,8 +202,11 @@ err_alloc:
244static int __exit ehci_mxc_drv_remove(struct platform_device *pdev) 202static int __exit ehci_mxc_drv_remove(struct platform_device *pdev)
245{ 203{
246 struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data; 204 struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data;
247 struct ehci_mxc_priv *priv = platform_get_drvdata(pdev); 205 struct usb_hcd *hcd = platform_get_drvdata(pdev);
248 struct usb_hcd *hcd = priv->hcd; 206 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
207 struct ehci_mxc_priv *priv = (struct ehci_mxc_priv *) ehci->priv;
208
209 usb_remove_hcd(hcd);
249 210
250 if (pdata && pdata->exit) 211 if (pdata && pdata->exit)
251 pdata->exit(pdev); 212 pdata->exit(pdev);
@@ -253,23 +214,20 @@ static int __exit ehci_mxc_drv_remove(struct platform_device *pdev)
253 if (pdata->otg) 214 if (pdata->otg)
254 usb_phy_shutdown(pdata->otg); 215 usb_phy_shutdown(pdata->otg);
255 216
256 usb_remove_hcd(hcd);
257 usb_put_hcd(hcd);
258 platform_set_drvdata(pdev, NULL);
259
260 clk_disable_unprepare(priv->usbclk); 217 clk_disable_unprepare(priv->usbclk);
261 clk_disable_unprepare(priv->ahbclk); 218 clk_disable_unprepare(priv->ahbclk);
262 219
263 if (priv->phyclk) 220 if (priv->phyclk)
264 clk_disable_unprepare(priv->phyclk); 221 clk_disable_unprepare(priv->phyclk);
265 222
223 usb_put_hcd(hcd);
224 platform_set_drvdata(pdev, NULL);
266 return 0; 225 return 0;
267} 226}
268 227
269static void ehci_mxc_drv_shutdown(struct platform_device *pdev) 228static void ehci_mxc_drv_shutdown(struct platform_device *pdev)
270{ 229{
271 struct ehci_mxc_priv *priv = platform_get_drvdata(pdev); 230 struct usb_hcd *hcd = platform_get_drvdata(pdev);
272 struct usb_hcd *hcd = priv->hcd;
273 231
274 if (hcd->driver->shutdown) 232 if (hcd->driver->shutdown)
275 hcd->driver->shutdown(hcd); 233 hcd->driver->shutdown(hcd);
@@ -279,9 +237,31 @@ MODULE_ALIAS("platform:mxc-ehci");
279 237
280static struct platform_driver ehci_mxc_driver = { 238static struct platform_driver ehci_mxc_driver = {
281 .probe = ehci_mxc_drv_probe, 239 .probe = ehci_mxc_drv_probe,
282 .remove = __exit_p(ehci_mxc_drv_remove), 240 .remove = ehci_mxc_drv_remove,
283 .shutdown = ehci_mxc_drv_shutdown, 241 .shutdown = ehci_mxc_drv_shutdown,
284 .driver = { 242 .driver = {
285 .name = "mxc-ehci", 243 .name = "mxc-ehci",
286 }, 244 },
287}; 245};
246
247static int __init ehci_mxc_init(void)
248{
249 if (usb_disabled())
250 return -ENODEV;
251
252 pr_info("%s: " DRIVER_DESC "\n", hcd_name);
253
254 ehci_init_driver(&ehci_mxc_hc_driver, &ehci_mxc_overrides);
255 return platform_driver_register(&ehci_mxc_driver);
256}
257module_init(ehci_mxc_init);
258
259static void __exit ehci_mxc_cleanup(void)
260{
261 platform_driver_unregister(&ehci_mxc_driver);
262}
263module_exit(ehci_mxc_cleanup);
264
265MODULE_DESCRIPTION(DRIVER_DESC);
266MODULE_AUTHOR("Sascha Hauer");
267MODULE_LICENSE("GPL");
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index dabb20494826..170b9399e09f 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -200,6 +200,26 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
200 break; 200 break;
201 } 201 }
202 202
203 /* optional debug port, normally in the first BAR */
204 temp = pci_find_capability(pdev, PCI_CAP_ID_DBG);
205 if (temp) {
206 pci_read_config_dword(pdev, temp, &temp);
207 temp >>= 16;
208 if (((temp >> 13) & 7) == 1) {
209 u32 hcs_params = ehci_readl(ehci,
210 &ehci->caps->hcs_params);
211
212 temp &= 0x1fff;
213 ehci->debug = hcd->regs + temp;
214 temp = ehci_readl(ehci, &ehci->debug->control);
215 ehci_info(ehci, "debug port %d%s\n",
216 HCS_DEBUG_PORT(hcs_params),
217 (temp & DBGP_ENABLED) ? " IN USE" : "");
218 if (!(temp & DBGP_ENABLED))
219 ehci->debug = NULL;
220 }
221 }
222
203 retval = ehci_setup(hcd); 223 retval = ehci_setup(hcd);
204 if (retval) 224 if (retval)
205 return retval; 225 return retval;
@@ -228,25 +248,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
228 break; 248 break;
229 } 249 }
230 250
231 /* optional debug port, normally in the first BAR */
232 temp = pci_find_capability(pdev, 0x0a);
233 if (temp) {
234 pci_read_config_dword(pdev, temp, &temp);
235 temp >>= 16;
236 if ((temp & (3 << 13)) == (1 << 13)) {
237 temp &= 0x1fff;
238 ehci->debug = hcd->regs + temp;
239 temp = ehci_readl(ehci, &ehci->debug->control);
240 ehci_info(ehci, "debug port %d%s\n",
241 HCS_DEBUG_PORT(ehci->hcs_params),
242 (temp & DBGP_ENABLED)
243 ? " IN USE"
244 : "");
245 if (!(temp & DBGP_ENABLED))
246 ehci->debug = NULL;
247 }
248 }
249
250 /* at least the Genesys GL880S needs fixup here */ 251 /* at least the Genesys GL880S needs fixup here */
251 temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params); 252 temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
252 temp &= 0x0f; 253 temp &= 0x0f;
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 9dadc7118d68..36c3a8210595 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -38,6 +38,10 @@ typedef __u16 __bitwise __hc16;
38#endif 38#endif
39 39
40/* statistics can be kept for tuning/monitoring */ 40/* statistics can be kept for tuning/monitoring */
41#ifdef DEBUG
42#define EHCI_STATS
43#endif
44
41struct ehci_stats { 45struct ehci_stats {
42 /* irq usage */ 46 /* irq usage */
43 unsigned long normal; 47 unsigned long normal;
@@ -221,6 +225,9 @@ struct ehci_hcd { /* one per controller */
221#ifdef DEBUG 225#ifdef DEBUG
222 struct dentry *debug_dir; 226 struct dentry *debug_dir;
223#endif 227#endif
228
229 /* platform-specific data -- must come last */
230 unsigned long priv[0] __aligned(sizeof(s64));
224}; 231};
225 232
226/* convert between an HCD pointer and the corresponding EHCI_HCD */ 233/* convert between an HCD pointer and the corresponding EHCI_HCD */
diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index 5105127c1d4b..11e0b79ff9d5 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
@@ -142,6 +142,9 @@ static int usb_get_ver_info(struct device_node *np)
142 return ver; 142 return ver;
143 } 143 }
144 144
145 if (of_device_is_compatible(np, "fsl,mpc5121-usb2-dr"))
146 return FSL_USB_VER_OLD;
147
145 if (of_device_is_compatible(np, "fsl-usb2-mph")) { 148 if (of_device_is_compatible(np, "fsl-usb2-mph")) {
146 if (of_device_is_compatible(np, "fsl-usb2-mph-v1.6")) 149 if (of_device_is_compatible(np, "fsl-usb2-mph-v1.6"))
147 ver = FSL_USB_VER_1_6; 150 ver = FSL_USB_VER_1_6;
diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c
index bd6a7447ccc9..f0ebe8e7c58b 100644
--- a/drivers/usb/host/imx21-hcd.c
+++ b/drivers/usb/host/imx21-hcd.c
@@ -58,6 +58,7 @@
58#include <linux/usb.h> 58#include <linux/usb.h>
59#include <linux/usb/hcd.h> 59#include <linux/usb/hcd.h>
60#include <linux/dma-mapping.h> 60#include <linux/dma-mapping.h>
61#include <linux/module.h>
61 62
62#include "imx21-hcd.h" 63#include "imx21-hcd.h"
63 64
diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
index d370245a4ee2..5e3a6deb62b1 100644
--- a/drivers/usb/host/ohci-tmio.c
+++ b/drivers/usb/host/ohci-tmio.c
@@ -128,7 +128,8 @@ static void tmio_start_hc(struct platform_device *dev)
128 tmio_iowrite8(2, tmio->ccr + CCR_INTC); 128 tmio_iowrite8(2, tmio->ccr + CCR_INTC);
129 129
130 dev_info(&dev->dev, "revision %d @ 0x%08llx, irq %d\n", 130 dev_info(&dev->dev, "revision %d @ 0x%08llx, irq %d\n",
131 tmio_ioread8(tmio->ccr + CCR_REVID), hcd->rsrc_start, hcd->irq); 131 tmio_ioread8(tmio->ccr + CCR_REVID),
132 (u64) hcd->rsrc_start, hcd->irq);
132} 133}
133 134
134static int ohci_tmio_start(struct usb_hcd *hcd) 135static int ohci_tmio_start(struct usb_hcd *hcd)
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 4b9e9aba2665..4f64d24eebc8 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -447,6 +447,10 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
447 return IRQ_NONE; 447 return IRQ_NONE;
448 uhci_writew(uhci, status, USBSTS); /* Clear it */ 448 uhci_writew(uhci, status, USBSTS); /* Clear it */
449 449
450 spin_lock(&uhci->lock);
451 if (unlikely(!uhci->is_initialized)) /* not yet configured */
452 goto done;
453
450 if (status & ~(USBSTS_USBINT | USBSTS_ERROR | USBSTS_RD)) { 454 if (status & ~(USBSTS_USBINT | USBSTS_ERROR | USBSTS_RD)) {
451 if (status & USBSTS_HSE) 455 if (status & USBSTS_HSE)
452 dev_err(uhci_dev(uhci), "host system error, " 456 dev_err(uhci_dev(uhci), "host system error, "
@@ -455,7 +459,6 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
455 dev_err(uhci_dev(uhci), "host controller process " 459 dev_err(uhci_dev(uhci), "host controller process "
456 "error, something bad happened!\n"); 460 "error, something bad happened!\n");
457 if (status & USBSTS_HCH) { 461 if (status & USBSTS_HCH) {
458 spin_lock(&uhci->lock);
459 if (uhci->rh_state >= UHCI_RH_RUNNING) { 462 if (uhci->rh_state >= UHCI_RH_RUNNING) {
460 dev_err(uhci_dev(uhci), 463 dev_err(uhci_dev(uhci),
461 "host controller halted, " 464 "host controller halted, "
@@ -473,15 +476,15 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
473 * pending unlinks */ 476 * pending unlinks */
474 mod_timer(&hcd->rh_timer, jiffies); 477 mod_timer(&hcd->rh_timer, jiffies);
475 } 478 }
476 spin_unlock(&uhci->lock);
477 } 479 }
478 } 480 }
479 481
480 if (status & USBSTS_RD) 482 if (status & USBSTS_RD) {
483 spin_unlock(&uhci->lock);
481 usb_hcd_poll_rh_status(hcd); 484 usb_hcd_poll_rh_status(hcd);
482 else { 485 } else {
483 spin_lock(&uhci->lock);
484 uhci_scan_schedule(uhci); 486 uhci_scan_schedule(uhci);
487 done:
485 spin_unlock(&uhci->lock); 488 spin_unlock(&uhci->lock);
486 } 489 }
487 490
@@ -662,9 +665,9 @@ static int uhci_start(struct usb_hcd *hcd)
662 */ 665 */
663 mb(); 666 mb();
664 667
668 spin_lock_irq(&uhci->lock);
665 configure_hc(uhci); 669 configure_hc(uhci);
666 uhci->is_initialized = 1; 670 uhci->is_initialized = 1;
667 spin_lock_irq(&uhci->lock);
668 start_rh(uhci); 671 start_rh(uhci);
669 spin_unlock_irq(&uhci->lock); 672 spin_unlock_irq(&uhci->lock);
670 return 0; 673 return 0;
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index a686cf4905bb..68914429482f 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -761,12 +761,39 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
761 break; 761 break;
762 case USB_PORT_FEAT_LINK_STATE: 762 case USB_PORT_FEAT_LINK_STATE:
763 temp = xhci_readl(xhci, port_array[wIndex]); 763 temp = xhci_readl(xhci, port_array[wIndex]);
764
765 /* Disable port */
766 if (link_state == USB_SS_PORT_LS_SS_DISABLED) {
767 xhci_dbg(xhci, "Disable port %d\n", wIndex);
768 temp = xhci_port_state_to_neutral(temp);
769 /*
770 * Clear all change bits, so that we get a new
771 * connection event.
772 */
773 temp |= PORT_CSC | PORT_PEC | PORT_WRC |
774 PORT_OCC | PORT_RC | PORT_PLC |
775 PORT_CEC;
776 xhci_writel(xhci, temp | PORT_PE,
777 port_array[wIndex]);
778 temp = xhci_readl(xhci, port_array[wIndex]);
779 break;
780 }
781
782 /* Put link in RxDetect (enable port) */
783 if (link_state == USB_SS_PORT_LS_RX_DETECT) {
784 xhci_dbg(xhci, "Enable port %d\n", wIndex);
785 xhci_set_link_state(xhci, port_array, wIndex,
786 link_state);
787 temp = xhci_readl(xhci, port_array[wIndex]);
788 break;
789 }
790
764 /* Software should not attempt to set 791 /* Software should not attempt to set
765 * port link state above '5' (Rx.Detect) and the port 792 * port link state above '3' (U3) and the port
766 * must be enabled. 793 * must be enabled.
767 */ 794 */
768 if ((temp & PORT_PE) == 0 || 795 if ((temp & PORT_PE) == 0 ||
769 (link_state > USB_SS_PORT_LS_RX_DETECT)) { 796 (link_state > USB_SS_PORT_LS_U3)) {
770 xhci_warn(xhci, "Cannot set link state.\n"); 797 xhci_warn(xhci, "Cannot set link state.\n");
771 goto error; 798 goto error;
772 } 799 }
@@ -957,6 +984,7 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
957 int max_ports; 984 int max_ports;
958 __le32 __iomem **port_array; 985 __le32 __iomem **port_array;
959 struct xhci_bus_state *bus_state; 986 struct xhci_bus_state *bus_state;
987 bool reset_change = false;
960 988
961 max_ports = xhci_get_ports(hcd, &port_array); 989 max_ports = xhci_get_ports(hcd, &port_array);
962 bus_state = &xhci->bus_state[hcd_index(hcd)]; 990 bus_state = &xhci->bus_state[hcd_index(hcd)];
@@ -988,6 +1016,12 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
988 buf[(i + 1) / 8] |= 1 << (i + 1) % 8; 1016 buf[(i + 1) / 8] |= 1 << (i + 1) % 8;
989 status = 1; 1017 status = 1;
990 } 1018 }
1019 if ((temp & PORT_RC))
1020 reset_change = true;
1021 }
1022 if (!status && !reset_change) {
1023 xhci_dbg(xhci, "%s: stopping port polling.\n", __func__);
1024 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
991 } 1025 }
992 spin_unlock_irqrestore(&xhci->lock, flags); 1026 spin_unlock_irqrestore(&xhci->lock, flags);
993 return status ? retval : 0; 1027 return status ? retval : 0;
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index fb51c7085ad0..35616ffbe3ae 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1250,6 +1250,8 @@ static unsigned int xhci_microframes_to_exponent(struct usb_device *udev,
1250static unsigned int xhci_parse_microframe_interval(struct usb_device *udev, 1250static unsigned int xhci_parse_microframe_interval(struct usb_device *udev,
1251 struct usb_host_endpoint *ep) 1251 struct usb_host_endpoint *ep)
1252{ 1252{
1253 if (ep->desc.bInterval == 0)
1254 return 0;
1253 return xhci_microframes_to_exponent(udev, ep, 1255 return xhci_microframes_to_exponent(udev, ep,
1254 ep->desc.bInterval, 0, 15); 1256 ep->desc.bInterval, 0, 15);
1255} 1257}
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index cbb44b7b9d65..59fb5c677dbe 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1725,6 +1725,15 @@ cleanup:
1725 if (bogus_port_status) 1725 if (bogus_port_status)
1726 return; 1726 return;
1727 1727
1728 /*
1729 * xHCI port-status-change events occur when the "or" of all the
1730 * status-change bits in the portsc register changes from 0 to 1.
1731 * New status changes won't cause an event if any other change
1732 * bits are still set. When an event occurs, switch over to
1733 * polling to avoid losing status changes.
1734 */
1735 xhci_dbg(xhci, "%s: starting port polling.\n", __func__);
1736 set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
1728 spin_unlock(&xhci->lock); 1737 spin_unlock(&xhci->lock);
1729 /* Pass this up to the core */ 1738 /* Pass this up to the core */
1730 usb_hcd_poll_rh_status(hcd); 1739 usb_hcd_poll_rh_status(hcd);
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 5c72c431bab1..f1f01a834ba7 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -884,6 +884,11 @@ int xhci_suspend(struct xhci_hcd *xhci)
884 xhci->shared_hcd->state != HC_STATE_SUSPENDED) 884 xhci->shared_hcd->state != HC_STATE_SUSPENDED)
885 return -EINVAL; 885 return -EINVAL;
886 886
887 /* Don't poll the roothubs on bus suspend. */
888 xhci_dbg(xhci, "%s: stopping port polling.\n", __func__);
889 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
890 del_timer_sync(&hcd->rh_timer);
891
887 spin_lock_irq(&xhci->lock); 892 spin_lock_irq(&xhci->lock);
888 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 893 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
889 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &xhci->shared_hcd->flags); 894 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &xhci->shared_hcd->flags);
@@ -1069,6 +1074,11 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
1069 if (xhci->quirks & XHCI_COMP_MODE_QUIRK) 1074 if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
1070 compliance_mode_recovery_timer_init(xhci); 1075 compliance_mode_recovery_timer_init(xhci);
1071 1076
1077 /* Re-enable port polling. */
1078 xhci_dbg(xhci, "%s: starting port polling.\n", __func__);
1079 set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
1080 usb_hcd_poll_rh_status(hcd);
1081
1072 return retval; 1082 return retval;
1073} 1083}
1074#endif /* CONFIG_PM */ 1084#endif /* CONFIG_PM */
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 7667b12f2ff5..268148de9714 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -2179,7 +2179,7 @@ usbtest_ioctl(struct usb_interface *intf, unsigned int code, void *buf)
2179 if (dev->out_pipe == 0 || !param->length || param->sglen < 4) 2179 if (dev->out_pipe == 0 || !param->length || param->sglen < 4)
2180 break; 2180 break;
2181 retval = 0; 2181 retval = 0;
2182 dev_info(&intf->dev, "TEST 17: unlink from %d queues of " 2182 dev_info(&intf->dev, "TEST 24: unlink from %d queues of "
2183 "%d %d-byte writes\n", 2183 "%d %d-byte writes\n",
2184 param->iterations, param->sglen, param->length); 2184 param->iterations, param->sglen, param->length);
2185 for (i = param->iterations; retval == 0 && i > 0; --i) { 2185 for (i = param->iterations; retval == 0 && i > 0; --i) {
diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index 0968dd7a859d..f522000e8f06 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -105,7 +105,7 @@ static void cppi_reset_tx(struct cppi_tx_stateram __iomem *tx, u32 ptr)
105 musb_writel(&tx->tx_complete, 0, ptr); 105 musb_writel(&tx->tx_complete, 0, ptr);
106} 106}
107 107
108static void __init cppi_pool_init(struct cppi *cppi, struct cppi_channel *c) 108static void cppi_pool_init(struct cppi *cppi, struct cppi_channel *c)
109{ 109{
110 int j; 110 int j;
111 111
@@ -150,7 +150,7 @@ static void cppi_pool_free(struct cppi_channel *c)
150 c->last_processed = NULL; 150 c->last_processed = NULL;
151} 151}
152 152
153static int __init cppi_controller_start(struct dma_controller *c) 153static int cppi_controller_start(struct dma_controller *c)
154{ 154{
155 struct cppi *controller; 155 struct cppi *controller;
156 void __iomem *tibase; 156 void __iomem *tibase;
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index f1c6c5470b92..fd3486745e64 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2298,10 +2298,7 @@ static int __init musb_init(void)
2298 if (usb_disabled()) 2298 if (usb_disabled())
2299 return 0; 2299 return 0;
2300 2300
2301 pr_info("%s: version " MUSB_VERSION ", " 2301 pr_info("%s: version " MUSB_VERSION ", ?dma?, otg (peripheral+host)\n",
2302 "?dma?"
2303 ", "
2304 "otg (peripheral+host)",
2305 musb_driver_name); 2302 musb_driver_name);
2306 return platform_driver_register(&musb_driver); 2303 return platform_driver_register(&musb_driver);
2307} 2304}
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index e6f2ae8368bb..f7d764de6fda 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -134,6 +134,11 @@ static const resource_size_t dsps_control_module_phys[] = {
134 DSPS_AM33XX_CONTROL_MODULE_PHYS_1, 134 DSPS_AM33XX_CONTROL_MODULE_PHYS_1,
135}; 135};
136 136
137#define USBPHY_CM_PWRDN (1 << 0)
138#define USBPHY_OTG_PWRDN (1 << 1)
139#define USBPHY_OTGVDET_EN (1 << 19)
140#define USBPHY_OTGSESSEND_EN (1 << 20)
141
137/** 142/**
138 * musb_dsps_phy_control - phy on/off 143 * musb_dsps_phy_control - phy on/off
139 * @glue: struct dsps_glue * 144 * @glue: struct dsps_glue *
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
index 6223062d5d1b..37962c99ff1e 100644
--- a/drivers/usb/otg/Kconfig
+++ b/drivers/usb/otg/Kconfig
@@ -110,7 +110,7 @@ config AB8500_USB
110 110
111config FSL_USB2_OTG 111config FSL_USB2_OTG
112 bool "Freescale USB OTG Transceiver Driver" 112 bool "Freescale USB OTG Transceiver Driver"
113 depends on USB_EHCI_FSL && USB_GADGET_FSL_USB2 && USB_SUSPEND 113 depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_SUSPEND
114 select USB_OTG 114 select USB_OTG
115 select USB_OTG_UTILS 115 select USB_OTG_UTILS
116 help 116 help
diff --git a/drivers/usb/otg/mv_otg.c b/drivers/usb/otg/mv_otg.c
index 1dd57504186d..eace975991a8 100644
--- a/drivers/usb/otg/mv_otg.c
+++ b/drivers/usb/otg/mv_otg.c
@@ -240,7 +240,7 @@ static void otg_clock_enable(struct mv_otg *mvotg)
240 unsigned int i; 240 unsigned int i;
241 241
242 for (i = 0; i < mvotg->clknum; i++) 242 for (i = 0; i < mvotg->clknum; i++)
243 clk_enable(mvotg->clk[i]); 243 clk_prepare_enable(mvotg->clk[i]);
244} 244}
245 245
246static void otg_clock_disable(struct mv_otg *mvotg) 246static void otg_clock_disable(struct mv_otg *mvotg)
@@ -248,7 +248,7 @@ static void otg_clock_disable(struct mv_otg *mvotg)
248 unsigned int i; 248 unsigned int i;
249 249
250 for (i = 0; i < mvotg->clknum; i++) 250 for (i = 0; i < mvotg->clknum; i++)
251 clk_disable(mvotg->clk[i]); 251 clk_disable_unprepare(mvotg->clk[i]);
252} 252}
253 253
254static int mv_otg_enable_internal(struct mv_otg *mvotg) 254static int mv_otg_enable_internal(struct mv_otg *mvotg)
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index dd41f61893ef..f2985cd88021 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -545,15 +545,6 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
545 return 0; 545 return 0;
546} 546}
547 547
548static void usbhsg_uep_init(struct usbhsg_gpriv *gpriv)
549{
550 int i;
551 struct usbhsg_uep *uep;
552
553 usbhsg_for_each_uep_with_dcp(uep, gpriv, i)
554 uep->pipe = NULL;
555}
556
557/* 548/*
558 * 549 *
559 * usb_ep_ops 550 * usb_ep_ops
@@ -610,7 +601,12 @@ static int usbhsg_ep_disable(struct usb_ep *ep)
610{ 601{
611 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); 602 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
612 603
613 return usbhsg_pipe_disable(uep); 604 usbhsg_pipe_disable(uep);
605
606 uep->pipe->mod_private = NULL;
607 uep->pipe = NULL;
608
609 return 0;
614} 610}
615 611
616static struct usb_request *usbhsg_ep_alloc_request(struct usb_ep *ep, 612static struct usb_request *usbhsg_ep_alloc_request(struct usb_ep *ep,
@@ -761,9 +757,8 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
761 usbhs_pipe_init(priv, 757 usbhs_pipe_init(priv,
762 usbhsg_dma_map_ctrl); 758 usbhsg_dma_map_ctrl);
763 usbhs_fifo_init(priv); 759 usbhs_fifo_init(priv);
764 usbhsg_uep_init(gpriv);
765 760
766 /* dcp init */ 761 /* dcp init instead of usbhsg_ep_enable() */
767 dcp->pipe = usbhs_dcp_malloc(priv); 762 dcp->pipe = usbhs_dcp_malloc(priv);
768 dcp->pipe->mod_private = dcp; 763 dcp->pipe->mod_private = dcp;
769 usbhs_pipe_config_update(dcp->pipe, 0, 0, 64); 764 usbhs_pipe_config_update(dcp->pipe, 0, 0, 64);
@@ -825,7 +820,7 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status)
825 usbhs_sys_set_test_mode(priv, 0); 820 usbhs_sys_set_test_mode(priv, 0);
826 usbhs_sys_function_ctrl(priv, 0); 821 usbhs_sys_function_ctrl(priv, 0);
827 822
828 usbhsg_pipe_disable(dcp); 823 usbhsg_ep_disable(&dcp->ep);
829 824
830 dev_dbg(dev, "stop gadget\n"); 825 dev_dbg(dev, "stop gadget\n");
831 826
@@ -998,6 +993,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
998 */ 993 */
999 usbhsg_for_each_uep_with_dcp(uep, gpriv, i) { 994 usbhsg_for_each_uep_with_dcp(uep, gpriv, i) {
1000 uep->gpriv = gpriv; 995 uep->gpriv = gpriv;
996 uep->pipe = NULL;
1001 snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i); 997 snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i);
1002 998
1003 uep->ep.name = uep->ep_name; 999 uep->ep.name = uep->ep_name;
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c
index 3d3cd6ca2689..b86815421c8d 100644
--- a/drivers/usb/renesas_usbhs/mod_host.c
+++ b/drivers/usb/renesas_usbhs/mod_host.c
@@ -661,9 +661,10 @@ static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
661 status = -ESHUTDOWN; 661 status = -ESHUTDOWN;
662 662
663 urb->actual_length = pkt->actual; 663 urb->actual_length = pkt->actual;
664 usbhsh_ureq_free(hpriv, ureq);
665 664
666 usbhsh_endpoint_sequence_save(hpriv, urb, pkt); 665 usbhsh_endpoint_sequence_save(hpriv, urb, pkt);
666 usbhsh_ureq_free(hpriv, ureq);
667
667 usbhsh_pipe_detach(hpriv, usbhsh_ep_to_uep(urb->ep)); 668 usbhsh_pipe_detach(hpriv, usbhsh_ep_to_uep(urb->ep));
668 669
669 usb_hcd_unlink_urb_from_ep(hcd, urb); 670 usb_hcd_unlink_urb_from_ep(hcd, urb);
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index a96083b7fabc..eaa038d032b8 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -875,6 +875,8 @@ static struct usb_device_id id_table_combined [] = {
875 { USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID), 875 { USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID),
876 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 876 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
877 { USB_DEVICE(FTDI_VID, FTDI_LUMEL_PD12_PID) }, 877 { USB_DEVICE(FTDI_VID, FTDI_LUMEL_PD12_PID) },
878 /* Crucible Devices */
879 { USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) },
878 { }, /* Optional parameter entry */ 880 { }, /* Optional parameter entry */
879 { } /* Terminating entry */ 881 { } /* Terminating entry */
880}; 882};
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 049b6e715fa4..fa5d56038276 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1259,3 +1259,9 @@
1259 * ATI command output: Cinterion MC55i 1259 * ATI command output: Cinterion MC55i
1260 */ 1260 */
1261#define FTDI_CINTERION_MC55I_PID 0xA951 1261#define FTDI_CINTERION_MC55I_PID 0xA951
1262
1263/*
1264 * Product: Comet Caller ID decoder
1265 * Manufacturer: Crucible Technologies
1266 */
1267#define FTDI_CT_COMET_PID 0x8e08
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index d6485be49ebf..b5ab0a54b6b6 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -530,6 +530,9 @@ static void chase_port(struct edgeport_port *port, unsigned long timeout,
530 wait_queue_t wait; 530 wait_queue_t wait;
531 unsigned long flags; 531 unsigned long flags;
532 532
533 if (!tty)
534 return;
535
533 if (!timeout) 536 if (!timeout)
534 timeout = (HZ * EDGE_CLOSING_WAIT)/100; 537 timeout = (HZ * EDGE_CLOSING_WAIT)/100;
535 538
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index e6f87b76c715..0d9dac9e7f93 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -288,6 +288,7 @@ static void option_instat_callback(struct urb *urb);
288#define ALCATEL_VENDOR_ID 0x1bbb 288#define ALCATEL_VENDOR_ID 0x1bbb
289#define ALCATEL_PRODUCT_X060S_X200 0x0000 289#define ALCATEL_PRODUCT_X060S_X200 0x0000
290#define ALCATEL_PRODUCT_X220_X500D 0x0017 290#define ALCATEL_PRODUCT_X220_X500D 0x0017
291#define ALCATEL_PRODUCT_L100V 0x011e
291 292
292#define PIRELLI_VENDOR_ID 0x1266 293#define PIRELLI_VENDOR_ID 0x1266
293#define PIRELLI_PRODUCT_C100_1 0x1002 294#define PIRELLI_PRODUCT_C100_1 0x1002
@@ -429,9 +430,12 @@ static void option_instat_callback(struct urb *urb);
429#define MEDIATEK_VENDOR_ID 0x0e8d 430#define MEDIATEK_VENDOR_ID 0x0e8d
430#define MEDIATEK_PRODUCT_DC_1COM 0x00a0 431#define MEDIATEK_PRODUCT_DC_1COM 0x00a0
431#define MEDIATEK_PRODUCT_DC_4COM 0x00a5 432#define MEDIATEK_PRODUCT_DC_4COM 0x00a5
433#define MEDIATEK_PRODUCT_DC_4COM2 0x00a7
432#define MEDIATEK_PRODUCT_DC_5COM 0x00a4 434#define MEDIATEK_PRODUCT_DC_5COM 0x00a4
433#define MEDIATEK_PRODUCT_7208_1COM 0x7101 435#define MEDIATEK_PRODUCT_7208_1COM 0x7101
434#define MEDIATEK_PRODUCT_7208_2COM 0x7102 436#define MEDIATEK_PRODUCT_7208_2COM 0x7102
437#define MEDIATEK_PRODUCT_7103_2COM 0x7103
438#define MEDIATEK_PRODUCT_7106_2COM 0x7106
435#define MEDIATEK_PRODUCT_FP_1COM 0x0003 439#define MEDIATEK_PRODUCT_FP_1COM 0x0003
436#define MEDIATEK_PRODUCT_FP_2COM 0x0023 440#define MEDIATEK_PRODUCT_FP_2COM 0x0023
437#define MEDIATEK_PRODUCT_FPDC_1COM 0x0043 441#define MEDIATEK_PRODUCT_FPDC_1COM 0x0043
@@ -441,6 +445,14 @@ static void option_instat_callback(struct urb *urb);
441#define CELLIENT_VENDOR_ID 0x2692 445#define CELLIENT_VENDOR_ID 0x2692
442#define CELLIENT_PRODUCT_MEN200 0x9005 446#define CELLIENT_PRODUCT_MEN200 0x9005
443 447
448/* Hyundai Petatel Inc. products */
449#define PETATEL_VENDOR_ID 0x1ff4
450#define PETATEL_PRODUCT_NP10T 0x600e
451
452/* TP-LINK Incorporated products */
453#define TPLINK_VENDOR_ID 0x2357
454#define TPLINK_PRODUCT_MA180 0x0201
455
444/* some devices interfaces need special handling due to a number of reasons */ 456/* some devices interfaces need special handling due to a number of reasons */
445enum option_blacklist_reason { 457enum option_blacklist_reason {
446 OPTION_BLACKLIST_NONE = 0, 458 OPTION_BLACKLIST_NONE = 0,
@@ -922,8 +934,10 @@ static const struct usb_device_id option_ids[] = {
922 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0254, 0xff, 0xff, 0xff) }, 934 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0254, 0xff, 0xff, 0xff) },
923 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0257, 0xff, 0xff, 0xff), /* ZTE MF821 */ 935 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0257, 0xff, 0xff, 0xff), /* ZTE MF821 */
924 .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, 936 .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
925 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff) }, 937 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff), /* ONDA MT8205 */
926 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff) }, 938 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
939 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff), /* ZTE MF880 */
940 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
927 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0317, 0xff, 0xff, 0xff) }, 941 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0317, 0xff, 0xff, 0xff) },
928 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0326, 0xff, 0xff, 0xff), 942 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0326, 0xff, 0xff, 0xff),
929 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 943 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
@@ -1190,6 +1204,8 @@ static const struct usb_device_id option_ids[] = {
1190 .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist 1204 .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist
1191 }, 1205 },
1192 { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D) }, 1206 { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D) },
1207 { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L100V),
1208 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1193 { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, 1209 { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
1194 { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, 1210 { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
1195 { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), 1211 { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14),
@@ -1294,7 +1310,14 @@ static const struct usb_device_id option_ids[] = {
1294 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_2COM, 0x0a, 0x00, 0x00) }, 1310 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_2COM, 0x0a, 0x00, 0x00) },
1295 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_1COM, 0x0a, 0x00, 0x00) }, 1311 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_1COM, 0x0a, 0x00, 0x00) },
1296 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_2COM, 0x0a, 0x00, 0x00) }, 1312 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_2COM, 0x0a, 0x00, 0x00) },
1313 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7103_2COM, 0xff, 0x00, 0x00) },
1314 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7106_2COM, 0x02, 0x02, 0x01) },
1315 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) },
1316 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) },
1297 { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, 1317 { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
1318 { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) },
1319 { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180),
1320 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1298 { } /* Terminating entry */ 1321 { } /* Terminating entry */
1299}; 1322};
1300MODULE_DEVICE_TABLE(usb, option_ids); 1323MODULE_DEVICE_TABLE(usb, option_ids);