From d5a29ba97c31a8a98ce044b3dff95fd04b71a6b4 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 13 Jul 2019 19:33:52 -0400 Subject: [PATCH] listusb: Do not try to print the port speed. The USB3 specification changed the meaning of this field, and it means different things depending on whether a USB 2 or 3 device is attached, so just don't print it. Fixes listusb saying "Fullspeed" for USB3 devices. The per-device information already prints what USB version and protocol the device is operating on, so this was redundant anyway. --- src/bin/listusb/listusb.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bin/listusb/listusb.cpp b/src/bin/listusb/listusb.cpp index 4fc0d01d82..b339ec486d 100644 --- a/src/bin/listusb/listusb.cpp +++ b/src/bin/listusb/listusb.cpp @@ -306,7 +306,7 @@ DumpInfo(BUSBDevice& device, bool verbose) index, sizeof(portStatus), (void*)&portStatus); if (actualLength != sizeof(portStatus)) continue; - printf(" Port %d status....... %04x.%04x%s%s%s%s%s%s%s%s%s\n", + printf(" Port %d status....... %04x.%04x%s%s%s%s%s%s%s%s\n", index, portStatus.status, portStatus.change, portStatus.status & PORT_STATUS_CONNECTION ? " Connect": "", portStatus.status & PORT_STATUS_ENABLE ? " Enable": "", @@ -314,10 +314,6 @@ DumpInfo(BUSBDevice& device, bool verbose) portStatus.status & PORT_STATUS_OVER_CURRENT ? " Overcurrent": "", portStatus.status & PORT_STATUS_RESET ? " Reset": "", portStatus.status & PORT_STATUS_POWER ? " Power": "", - portStatus.status & PORT_STATUS_CONNECTION - ? (portStatus.status & PORT_STATUS_LOW_SPEED ? " Lowspeed" - : (portStatus.status & PORT_STATUS_HIGH_SPEED ? " Highspeed" - : " Fullspeed")) : "", portStatus.status & PORT_STATUS_TEST ? " Test": "", portStatus.status & PORT_STATUS_INDICATOR ? " Indicator": ""); }