aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/devices.c10
-rw-r--r--drivers/usb/core/hcd.c2
-rw-r--r--drivers/usb/core/hub.c12
3 files changed, 18 insertions, 6 deletions
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index a3d2e2399655..96fdfb815f89 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -221,7 +221,7 @@ static char *usb_dump_endpoint_descriptor(int speed, char *start, char *end,
221 break; 221 break;
222 case USB_ENDPOINT_XFER_INT: 222 case USB_ENDPOINT_XFER_INT:
223 type = "Int."; 223 type = "Int.";
224 if (speed == USB_SPEED_HIGH) 224 if (speed == USB_SPEED_HIGH || speed == USB_SPEED_SUPER)
225 interval = 1 << (desc->bInterval - 1); 225 interval = 1 << (desc->bInterval - 1);
226 else 226 else
227 interval = desc->bInterval; 227 interval = desc->bInterval;
@@ -229,7 +229,8 @@ static char *usb_dump_endpoint_descriptor(int speed, char *start, char *end,
229 default: /* "can't happen" */ 229 default: /* "can't happen" */
230 return start; 230 return start;
231 } 231 }
232 interval *= (speed == USB_SPEED_HIGH) ? 125 : 1000; 232 interval *= (speed == USB_SPEED_HIGH ||
233 speed == USB_SPEED_SUPER) ? 125 : 1000;
233 if (interval % 1000) 234 if (interval % 1000)
234 unit = 'u'; 235 unit = 'u';
235 else { 236 else {
@@ -542,8 +543,9 @@ static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes,
542 if (level == 0) { 543 if (level == 0) {
543 int max; 544 int max;
544 545
545 /* high speed reserves 80%, full/low reserves 90% */ 546 /* super/high speed reserves 80%, full/low reserves 90% */
546 if (usbdev->speed == USB_SPEED_HIGH) 547 if (usbdev->speed == USB_SPEED_HIGH ||
548 usbdev->speed == USB_SPEED_SUPER)
547 max = 800; 549 max = 800;
548 else 550 else
549 max = FRAME_TIME_MAX_USECS_ALLOC; 551 max = FRAME_TIME_MAX_USECS_ALLOC;
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 8eed05d23838..77a7faec8d78 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1908,7 +1908,7 @@ void usb_free_streams(struct usb_interface *interface,
1908 1908
1909 /* Streams only apply to bulk endpoints. */ 1909 /* Streams only apply to bulk endpoints. */
1910 for (i = 0; i < num_eps; i++) 1910 for (i = 0; i < num_eps; i++)
1911 if (!usb_endpoint_xfer_bulk(&eps[i]->desc)) 1911 if (!eps[i] || !usb_endpoint_xfer_bulk(&eps[i]->desc))
1912 return; 1912 return;
1913 1913
1914 hcd->driver->free_streams(hcd, dev, eps, num_eps, mem_flags); 1914 hcd->driver->free_streams(hcd, dev, eps, num_eps, mem_flags);
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 8fb754916c67..93720bdc9efd 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2285,7 +2285,17 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
2285 } 2285 }
2286 2286
2287 /* see 7.1.7.6 */ 2287 /* see 7.1.7.6 */
2288 status = set_port_feature(hub->hdev, port1, USB_PORT_FEAT_SUSPEND); 2288 /* Clear PORT_POWER if it's a USB3.0 device connected to USB 3.0
2289 * external hub.
2290 * FIXME: this is a temporary workaround to make the system able
2291 * to suspend/resume.
2292 */
2293 if ((hub->hdev->parent != NULL) && hub_is_superspeed(hub->hdev))
2294 status = clear_port_feature(hub->hdev, port1,
2295 USB_PORT_FEAT_POWER);
2296 else
2297 status = set_port_feature(hub->hdev, port1,
2298 USB_PORT_FEAT_SUSPEND);
2289 if (status) { 2299 if (status) {
2290 dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n", 2300 dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n",
2291 port1, status); 2301 port1, status);