diff options
author | Dmitry Torokhov <dtor@vmware.com> | 2011-03-19 00:29:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-13 19:13:46 -0400 |
commit | 2868a2b1ba8f9c7f6c4170519ebb6c62934df70e (patch) | |
tree | 3e8c583f322f508a1d7ac4044bb64de9f7680917 /drivers/usb | |
parent | 5808544690300071f09eef9ab83a0fb1f60cf1cd (diff) |
USB: fix formatting of SuperSpeed endpoints in /proc/bus/usb/devices
Isochronous and interrupt SuperSpeed endpoints use the same mechanisms
for decoding bInterval values as HighSpeed ones so adjust the code
accordingly.
Also bandwidth reservation for SuperSpeed matches highspeed, not
low/full speed.
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/devices.c | 10 |
1 files changed, 6 insertions, 4 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; |