aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 23:11:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 23:11:28 -0400
commitae9b475ebed96afe51d6bcf10dc7aee9c8d89ed7 (patch)
tree374bf5821a03d717b35f0b91dcbdeaa2428e649d /drivers/usb/core
parent79eb238c76782a59d51adf8a3dd7f6444245b475 (diff)
parentd310d05f1225d1f6f2bf505255fdf593bfbb3051 (diff)
Merge tag 'usb-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB updates from Greg KH: "Here is the big USB driver update for 3.17-rc1. Loads of gadget driver changes in here, including some big file movements to make things easier to manage over time. There's also the usual xhci and uas driver updates, and a handful of other changes in here. The changelog has the full details. All of these have been in linux-next for a while" * tag 'usb-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (211 commits) USB: devio: fix issue with log flooding uas: Log a warning when we cannot use uas because the hcd lacks streams uas: Only complain about missing sg if all other checks succeed xhci: Add missing checks for xhci_alloc_command failure xhci: Rename Asrock P67 pci product-id to EJ168 xhci: Blacklist using streams on the Etron EJ168 controller uas: Limit qdepth to 32 when connected over usb-2 uwb/whci: use correct structure type name in sizeof usb-core bInterval quirk USB: serial: ftdi_sio: Add support for new Xsens devices USB: serial: ftdi_sio: Annotate the current Xsens PID assignments usb: chipidea: debug: fix sparse non static symbol warnings usb: ci_hdrc_imx doc: fsl,usbphy is required usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY usb: core: allow zero packet flag for interrupt urbs usb: lvstest: Fix sparse warnings generated by kbuild test bot USB: core: hcd-pci: free IRQ before disabling PCI device when shutting down phy: miphy365x: Represent each PHY channel as a DT subnode phy: miphy365x: Provide support for the MiPHY356x Generic PHY phy: miphy365x: Add Device Tree bindings for the MiPHY365x ...
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/config.c11
-rw-r--r--drivers/usb/core/devio.c2
-rw-r--r--drivers/usb/core/driver.c7
-rw-r--r--drivers/usb/core/hcd-pci.c2
-rw-r--r--drivers/usb/core/hcd.c4
-rw-r--r--drivers/usb/core/hub.c94
-rw-r--r--drivers/usb/core/hub.h2
-rw-r--r--drivers/usb/core/port.c21
-rw-r--r--drivers/usb/core/quirks.c7
-rw-r--r--drivers/usb/core/urb.c1
-rw-r--r--drivers/usb/core/usb.c1
11 files changed, 119 insertions, 33 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 1ab4df1de2da..b2a540b43f97 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -199,6 +199,17 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
199 if (n == 0) 199 if (n == 0)
200 n = 9; /* 32 ms = 2^(9-1) uframes */ 200 n = 9; /* 32 ms = 2^(9-1) uframes */
201 j = 16; 201 j = 16;
202
203 /*
204 * Adjust bInterval for quirked devices.
205 * This quirk fixes bIntervals reported in
206 * linear microframes.
207 */
208 if (to_usb_device(ddev)->quirks &
209 USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL) {
210 n = clamp(fls(d->bInterval), i, j);
211 i = j = n;
212 }
202 break; 213 break;
203 default: /* USB_SPEED_FULL or _LOW */ 214 default: /* USB_SPEED_FULL or _LOW */
204 /* For low-speed, 10 ms is the official minimum. 215 /* For low-speed, 10 ms is the official minimum.
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 257876ea03a1..0b59731c3021 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1509,7 +1509,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
1509 u = (is_in ? URB_DIR_IN : URB_DIR_OUT); 1509 u = (is_in ? URB_DIR_IN : URB_DIR_OUT);
1510 if (uurb->flags & USBDEVFS_URB_ISO_ASAP) 1510 if (uurb->flags & USBDEVFS_URB_ISO_ASAP)
1511 u |= URB_ISO_ASAP; 1511 u |= URB_ISO_ASAP;
1512 if (uurb->flags & USBDEVFS_URB_SHORT_NOT_OK) 1512 if (uurb->flags & USBDEVFS_URB_SHORT_NOT_OK && is_in)
1513 u |= URB_SHORT_NOT_OK; 1513 u |= URB_SHORT_NOT_OK;
1514 if (uurb->flags & USBDEVFS_URB_NO_FSBR) 1514 if (uurb->flags & USBDEVFS_URB_NO_FSBR)
1515 u |= URB_NO_FSBR; 1515 u |= URB_NO_FSBR;
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 4aeb10034de7..9bffd26cea05 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -417,10 +417,11 @@ static int usb_unbind_interface(struct device *dev)
417 */ 417 */
418 lpm_disable_error = usb_unlocked_disable_lpm(udev); 418 lpm_disable_error = usb_unlocked_disable_lpm(udev);
419 419
420 /* Terminate all URBs for this interface unless the driver 420 /*
421 * supports "soft" unbinding. 421 * Terminate all URBs for this interface unless the driver
422 * supports "soft" unbinding and the device is still present.
422 */ 423 */
423 if (!driver->soft_unbind) 424 if (!driver->soft_unbind || udev->state == USB_STATE_NOTATTACHED)
424 usb_disable_interface(udev, intf, false); 425 usb_disable_interface(udev, intf, false);
425 426
426 driver->disconnect(intf); 427 driver->disconnect(intf);
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index 82044b5d6113..efc953119ce2 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -380,6 +380,8 @@ void usb_hcd_pci_shutdown(struct pci_dev *dev)
380 if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) && 380 if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) &&
381 hcd->driver->shutdown) { 381 hcd->driver->shutdown) {
382 hcd->driver->shutdown(hcd); 382 hcd->driver->shutdown(hcd);
383 if (usb_hcd_is_primary_hcd(hcd) && hcd->irq > 0)
384 free_irq(hcd->irq, hcd);
383 pci_disable_device(dev); 385 pci_disable_device(dev);
384 } 386 }
385} 387}
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bec31e2efb88..487abcfcccd8 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
855 struct usb_bus *usb_bus = rh_usb_dev->bus; 855 struct usb_bus *usb_bus = rh_usb_dev->bus;
856 struct usb_hcd *usb_hcd; 856 struct usb_hcd *usb_hcd;
857 857
858 if (usb_bus == NULL) /* FIXME: not sure if this case is possible */
859 return -ENODEV;
860 usb_hcd = bus_to_hcd(usb_bus); 858 usb_hcd = bus_to_hcd(usb_bus);
861 return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default); 859 return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
862} 860}
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
871 struct usb_bus *usb_bus = rh_usb_dev->bus; 869 struct usb_bus *usb_bus = rh_usb_dev->bus;
872 struct usb_hcd *usb_hcd; 870 struct usb_hcd *usb_hcd;
873 871
874 if (usb_bus == NULL) /* FIXME: not sure if this case is possible */
875 return -ENODEV;
876 usb_hcd = bus_to_hcd(usb_bus); 872 usb_hcd = bus_to_hcd(usb_bus);
877 result = sscanf(buf, "%u\n", &val); 873 result = sscanf(buf, "%u\n", &val);
878 if (result == 1) { 874 if (result == 1) {
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 0e950ad8cb25..8a4dcbc7a75f 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2606,13 +2606,20 @@ static int hub_port_reset(struct usb_hub *hub, int port1,
2606/* Is a USB 3.0 port in the Inactive or Compliance Mode state? 2606/* Is a USB 3.0 port in the Inactive or Compliance Mode state?
2607 * Port worm reset is required to recover 2607 * Port worm reset is required to recover
2608 */ 2608 */
2609static bool hub_port_warm_reset_required(struct usb_hub *hub, u16 portstatus) 2609static bool hub_port_warm_reset_required(struct usb_hub *hub, int port1,
2610 u16 portstatus)
2610{ 2611{
2611 return hub_is_superspeed(hub->hdev) && 2612 u16 link_state;
2612 (((portstatus & USB_PORT_STAT_LINK_STATE) == 2613
2613 USB_SS_PORT_LS_SS_INACTIVE) || 2614 if (!hub_is_superspeed(hub->hdev))
2614 ((portstatus & USB_PORT_STAT_LINK_STATE) == 2615 return false;
2615 USB_SS_PORT_LS_COMP_MOD)) ; 2616
2617 if (test_bit(port1, hub->warm_reset_bits))
2618 return true;
2619
2620 link_state = portstatus & USB_PORT_STAT_LINK_STATE;
2621 return link_state == USB_SS_PORT_LS_SS_INACTIVE
2622 || link_state == USB_SS_PORT_LS_COMP_MOD;
2616} 2623}
2617 2624
2618static int hub_port_wait_reset(struct usb_hub *hub, int port1, 2625static int hub_port_wait_reset(struct usb_hub *hub, int port1,
@@ -2649,7 +2656,7 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
2649 if ((portstatus & USB_PORT_STAT_RESET)) 2656 if ((portstatus & USB_PORT_STAT_RESET))
2650 return -EBUSY; 2657 return -EBUSY;
2651 2658
2652 if (hub_port_warm_reset_required(hub, portstatus)) 2659 if (hub_port_warm_reset_required(hub, port1, portstatus))
2653 return -ENOTCONN; 2660 return -ENOTCONN;
2654 2661
2655 /* Device went away? */ 2662 /* Device went away? */
@@ -2749,9 +2756,10 @@ static int hub_port_reset(struct usb_hub *hub, int port1,
2749 if (status < 0) 2756 if (status < 0)
2750 goto done; 2757 goto done;
2751 2758
2752 if (hub_port_warm_reset_required(hub, portstatus)) 2759 if (hub_port_warm_reset_required(hub, port1, portstatus))
2753 warm = true; 2760 warm = true;
2754 } 2761 }
2762 clear_bit(port1, hub->warm_reset_bits);
2755 2763
2756 /* Reset the port */ 2764 /* Reset the port */
2757 for (i = 0; i < PORT_RESET_TRIES; i++) { 2765 for (i = 0; i < PORT_RESET_TRIES; i++) {
@@ -2788,7 +2796,8 @@ static int hub_port_reset(struct usb_hub *hub, int port1,
2788 &portstatus, &portchange) < 0) 2796 &portstatus, &portchange) < 0)
2789 goto done; 2797 goto done;
2790 2798
2791 if (!hub_port_warm_reset_required(hub, portstatus)) 2799 if (!hub_port_warm_reset_required(hub, port1,
2800 portstatus))
2792 goto done; 2801 goto done;
2793 2802
2794 /* 2803 /*
@@ -2875,8 +2884,13 @@ static int check_port_resume_type(struct usb_device *udev,
2875{ 2884{
2876 struct usb_port *port_dev = hub->ports[port1 - 1]; 2885 struct usb_port *port_dev = hub->ports[port1 - 1];
2877 2886
2887 /* Is a warm reset needed to recover the connection? */
2888 if (status == 0 && udev->reset_resume
2889 && hub_port_warm_reset_required(hub, port1, portstatus)) {
2890 /* pass */;
2891 }
2878 /* Is the device still present? */ 2892 /* Is the device still present? */
2879 if (status || port_is_suspended(hub, portstatus) || 2893 else if (status || port_is_suspended(hub, portstatus) ||
2880 !port_is_power_on(hub, portstatus) || 2894 !port_is_power_on(hub, portstatus) ||
2881 !(portstatus & USB_PORT_STAT_CONNECTION)) { 2895 !(portstatus & USB_PORT_STAT_CONNECTION)) {
2882 if (status >= 0) 2896 if (status >= 0)
@@ -3264,6 +3278,43 @@ static int finish_port_resume(struct usb_device *udev)
3264} 3278}
3265 3279
3266/* 3280/*
3281 * There are some SS USB devices which take longer time for link training.
3282 * XHCI specs 4.19.4 says that when Link training is successful, port
3283 * sets CSC bit to 1. So if SW reads port status before successful link
3284 * training, then it will not find device to be present.
3285 * USB Analyzer log with such buggy devices show that in some cases
3286 * device switch on the RX termination after long delay of host enabling
3287 * the VBUS. In few other cases it has been seen that device fails to
3288 * negotiate link training in first attempt. It has been
3289 * reported till now that few devices take as long as 2000 ms to train
3290 * the link after host enabling its VBUS and termination. Following
3291 * routine implements a 2000 ms timeout for link training. If in a case
3292 * link trains before timeout, loop will exit earlier.
3293 *
3294 * FIXME: If a device was connected before suspend, but was removed
3295 * while system was asleep, then the loop in the following routine will
3296 * only exit at timeout.
3297 *
3298 * This routine should only be called when persist is enabled for a SS
3299 * device.
3300 */
3301static int wait_for_ss_port_enable(struct usb_device *udev,
3302 struct usb_hub *hub, int *port1,
3303 u16 *portchange, u16 *portstatus)
3304{
3305 int status = 0, delay_ms = 0;
3306
3307 while (delay_ms < 2000) {
3308 if (status || *portstatus & USB_PORT_STAT_CONNECTION)
3309 break;
3310 msleep(20);
3311 delay_ms += 20;
3312 status = hub_port_status(hub, *port1, portstatus, portchange);
3313 }
3314 return status;
3315}
3316
3317/*
3267 * usb_port_resume - re-activate a suspended usb device's upstream port 3318 * usb_port_resume - re-activate a suspended usb device's upstream port
3268 * @udev: device to re-activate, not a root hub 3319 * @udev: device to re-activate, not a root hub
3269 * Context: must be able to sleep; device not locked; pm locks held 3320 * Context: must be able to sleep; device not locked; pm locks held
@@ -3359,6 +3410,10 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
3359 } 3410 }
3360 } 3411 }
3361 3412
3413 if (udev->persist_enabled && hub_is_superspeed(hub->hdev))
3414 status = wait_for_ss_port_enable(udev, hub, &port1, &portchange,
3415 &portstatus);
3416
3362 status = check_port_resume_type(udev, 3417 status = check_port_resume_type(udev,
3363 hub, port1, status, portchange, portstatus); 3418 hub, port1, status, portchange, portstatus);
3364 if (status == 0) 3419 if (status == 0)
@@ -3879,7 +3934,8 @@ int usb_disable_lpm(struct usb_device *udev)
3879 3934
3880 if (!udev || !udev->parent || 3935 if (!udev || !udev->parent ||
3881 udev->speed != USB_SPEED_SUPER || 3936 udev->speed != USB_SPEED_SUPER ||
3882 !udev->lpm_capable) 3937 !udev->lpm_capable ||
3938 udev->state < USB_STATE_DEFAULT)
3883 return 0; 3939 return 0;
3884 3940
3885 hcd = bus_to_hcd(udev->bus); 3941 hcd = bus_to_hcd(udev->bus);
@@ -3935,7 +3991,8 @@ void usb_enable_lpm(struct usb_device *udev)
3935 3991
3936 if (!udev || !udev->parent || 3992 if (!udev || !udev->parent ||
3937 udev->speed != USB_SPEED_SUPER || 3993 udev->speed != USB_SPEED_SUPER ||
3938 !udev->lpm_capable) 3994 !udev->lpm_capable ||
3995 udev->state < USB_STATE_DEFAULT)
3939 return; 3996 return;
3940 3997
3941 udev->lpm_disable_count--; 3998 udev->lpm_disable_count--;
@@ -4550,6 +4607,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
4550 struct usb_hcd *hcd = bus_to_hcd(hdev->bus); 4607 struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
4551 struct usb_port *port_dev = hub->ports[port1 - 1]; 4608 struct usb_port *port_dev = hub->ports[port1 - 1];
4552 struct usb_device *udev = port_dev->child; 4609 struct usb_device *udev = port_dev->child;
4610 static int unreliable_port = -1;
4553 4611
4554 /* Disconnect any existing devices under this port */ 4612 /* Disconnect any existing devices under this port */
4555 if (udev) { 4613 if (udev) {
@@ -4570,10 +4628,14 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
4570 USB_PORT_STAT_C_ENABLE)) { 4628 USB_PORT_STAT_C_ENABLE)) {
4571 status = hub_port_debounce_be_stable(hub, port1); 4629 status = hub_port_debounce_be_stable(hub, port1);
4572 if (status < 0) { 4630 if (status < 0) {
4573 if (status != -ENODEV && printk_ratelimit()) 4631 if (status != -ENODEV &&
4574 dev_err(&port_dev->dev, 4632 port1 != unreliable_port &&
4575 "connect-debounce failed\n"); 4633 printk_ratelimit())
4634 dev_err(&udev->dev, "connect-debounce failed, port %d disabled\n",
4635 port1);
4636
4576 portstatus &= ~USB_PORT_STAT_CONNECTION; 4637 portstatus &= ~USB_PORT_STAT_CONNECTION;
4638 unreliable_port = port1;
4577 } else { 4639 } else {
4578 portstatus = status; 4640 portstatus = status;
4579 } 4641 }
@@ -4889,7 +4951,7 @@ static void port_event(struct usb_hub *hub, int port1)
4889 * Warm reset a USB3 protocol port if it's in 4951 * Warm reset a USB3 protocol port if it's in
4890 * SS.Inactive state. 4952 * SS.Inactive state.
4891 */ 4953 */
4892 if (hub_port_warm_reset_required(hub, portstatus)) { 4954 if (hub_port_warm_reset_required(hub, port1, portstatus)) {
4893 dev_dbg(&port_dev->dev, "do warm reset\n"); 4955 dev_dbg(&port_dev->dev, "do warm reset\n");
4894 if (!udev || !(portstatus & USB_PORT_STAT_CONNECTION) 4956 if (!udev || !(portstatus & USB_PORT_STAT_CONNECTION)
4895 || udev->state == USB_STATE_NOTATTACHED) { 4957 || udev->state == USB_STATE_NOTATTACHED) {
diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
index 326308e53961..c77d8778af4b 100644
--- a/drivers/usb/core/hub.h
+++ b/drivers/usb/core/hub.h
@@ -52,6 +52,8 @@ struct usb_hub {
52 unsigned long power_bits[1]; /* ports that are powered */ 52 unsigned long power_bits[1]; /* ports that are powered */
53 unsigned long child_usage_bits[1]; /* ports powered on for 53 unsigned long child_usage_bits[1]; /* ports powered on for
54 children */ 54 children */
55 unsigned long warm_reset_bits[1]; /* ports requesting warm
56 reset recovery */
55#if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */ 57#if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */
56#error event_bits[] is too short! 58#error event_bits[] is too short!
57#endif 59#endif
diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c
index fe1b6d0967e3..cd3f9dc24a06 100644
--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
@@ -103,16 +103,19 @@ static int usb_port_runtime_resume(struct device *dev)
103 msleep(hub_power_on_good_delay(hub)); 103 msleep(hub_power_on_good_delay(hub));
104 if (udev && !retval) { 104 if (udev && !retval) {
105 /* 105 /*
106 * Attempt to wait for usb hub port to be reconnected in order 106 * Our preference is to simply wait for the port to reconnect,
107 * to make the resume procedure successful. The device may have 107 * as that is the lowest latency method to restart the port.
108 * disconnected while the port was powered off, so ignore the 108 * However, there are cases where toggling port power results in
109 * return status. 109 * the host port and the device port getting out of sync causing
110 * a link training live lock. Upon timeout, flag the port as
111 * needing warm reset recovery (to be performed later by
112 * usb_port_resume() as requested via usb_wakeup_notification())
110 */ 113 */
111 retval = hub_port_debounce_be_connected(hub, port1); 114 if (hub_port_debounce_be_connected(hub, port1) < 0) {
112 if (retval < 0) 115 dev_dbg(&port_dev->dev, "reconnect timeout\n");
113 dev_dbg(&port_dev->dev, "can't get reconnection after setting port power on, status %d\n", 116 if (hub_is_superspeed(hdev))
114 retval); 117 set_bit(port1, hub->warm_reset_bits);
115 retval = 0; 118 }
116 119
117 /* Force the child awake to revalidate after the power loss. */ 120 /* Force the child awake to revalidate after the power loss. */
118 if (!test_and_set_bit(port1, hub->child_usage_bits)) { 121 if (!test_and_set_bit(port1, hub->child_usage_bits)) {
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 739ee8e8bdfd..bae636e2a1a3 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -145,6 +145,10 @@ static const struct usb_device_id usb_quirk_list[] = {
145 /* SKYMEDI USB_DRIVE */ 145 /* SKYMEDI USB_DRIVE */
146 { USB_DEVICE(0x1516, 0x8628), .driver_info = USB_QUIRK_RESET_RESUME }, 146 { USB_DEVICE(0x1516, 0x8628), .driver_info = USB_QUIRK_RESET_RESUME },
147 147
148 /* Razer - Razer Blade Keyboard */
149 { USB_DEVICE(0x1532, 0x0116), .driver_info =
150 USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
151
148 /* BUILDWIN Photo Frame */ 152 /* BUILDWIN Photo Frame */
149 { USB_DEVICE(0x1908, 0x1315), .driver_info = 153 { USB_DEVICE(0x1908, 0x1315), .driver_info =
150 USB_QUIRK_HONOR_BNUMINTERFACES }, 154 USB_QUIRK_HONOR_BNUMINTERFACES },
@@ -152,6 +156,9 @@ static const struct usb_device_id usb_quirk_list[] = {
152 /* INTEL VALUE SSD */ 156 /* INTEL VALUE SSD */
153 { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, 157 { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
154 158
159 /* USB3503 */
160 { USB_DEVICE(0x0424, 0x3503), .driver_info = USB_QUIRK_RESET_RESUME },
161
155 { } /* terminating entry must be last */ 162 { } /* terminating entry must be last */
156}; 163};
157 164
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 991386ceb4ec..c9e8ee81b6b7 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -454,6 +454,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
454 URB_FREE_BUFFER); 454 URB_FREE_BUFFER);
455 switch (xfertype) { 455 switch (xfertype) {
456 case USB_ENDPOINT_XFER_BULK: 456 case USB_ENDPOINT_XFER_BULK:
457 case USB_ENDPOINT_XFER_INT:
457 if (is_out) 458 if (is_out)
458 allowed |= URB_ZERO_PACKET; 459 allowed |= URB_ZERO_PACKET;
459 /* FALLTHROUGH */ 460 /* FALLTHROUGH */
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 4d1144990d4c..2dd2362198d2 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -501,6 +501,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
501 } 501 }
502 return dev; 502 return dev;
503} 503}
504EXPORT_SYMBOL_GPL(usb_alloc_dev);
504 505
505/** 506/**
506 * usb_get_dev - increments the reference count of the usb device structure 507 * usb_get_dev - increments the reference count of the usb device structure