The upper bits of the USB 2.0 extended capability BOS descriptor weren't
being shifted into the right byte position.  That didn't matter much
before now, but some USB 2.1 devices will soon have a modified BOS
descriptor that has BESL values in those upper bits.

Signed-off-by: Sarah Sharp <sarah.a.sh...@linux.intel.com>
---
 lsusb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lsusb.c b/lsusb.c
index d9c7908..fda772a 100644
--- a/lsusb.c
+++ b/lsusb.c
@@ -3613,7 +3613,7 @@ static void dump_usb2_device_capability_desc(unsigned 
char *buf)
        unsigned int wide;
 
        wide = buf[3] + (buf[4] << 8) +
-               (buf[5] << 8) + (buf[6] << 8);
+               (buf[5] << 16) + (buf[6] << 24);
        printf("  USB 2.0 Extension Device Capability:\n"
                        "    bLength             %5u\n"
                        "    bDescriptorType     %5u\n"
-- 
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to