]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/core/devices.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / drivers / usb / core / devices.c
index 2c42e06f9717b3fd3944edf04935d32e4d3ace71..2a3bbdf7eb9407568c71c0896615d30fb48ea9cb 100644 (file)
@@ -316,17 +316,23 @@ static char *usb_dump_iad_descriptor(char *start, char *end,
  */
 static char *usb_dump_config_descriptor(char *start, char *end,
                                const struct usb_config_descriptor *desc,
-                               int active)
+                               int active, int speed)
 {
+       int mul;
+
        if (start > end)
                return start;
+       if (speed == USB_SPEED_SUPER)
+               mul = 8;
+       else
+               mul = 2;
        start += sprintf(start, format_config,
                         /* mark active/actual/current cfg. */
                         active ? '*' : ' ',
                         desc->bNumInterfaces,
                         desc->bConfigurationValue,
                         desc->bmAttributes,
-                        desc->bMaxPower * 2);
+                        desc->bMaxPower * mul);
        return start;
 }
 
@@ -342,7 +348,8 @@ static char *usb_dump_config(int speed, char *start, char *end,
        if (!config)
                /* getting these some in 2.3.7; none in 2.3.6 */
                return start + sprintf(start, "(null Cfg. desc.)\n");
-       start = usb_dump_config_descriptor(start, end, &config->desc, active);
+       start = usb_dump_config_descriptor(start, end, &config->desc, active,
+                       speed);
        for (i = 0; i < USB_MAXIADS; i++) {
                if (config->intf_assoc[i] == NULL)
                        break;