[PATCH] lsusb: Fix LTM capabilities reporting.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The original code to print bmAttributes had the meaning of the LTM bit
backwards.  The USB 3.0 spec, section 9.6.2.2, says that bit 1 means:

"LTM Capable. A value of one in this bit location indicates that this
device has is capable of generating Latency Tolerance Messages."

Only print LTM supported if bit 1 is set.

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

diff --git a/lsusb.c b/lsusb.c
index 738d65a..e18bb17 100644
--- a/lsusb.c
+++ b/lsusb.c
@@ -3609,7 +3609,7 @@ static void dump_ss_device_capability_desc(unsigned char *buf)
 			"    bDevCapabilityType  %5u\n"
 			"    bmAttributes         0x%02x\n",
 			buf[0], buf[1], buf[2], buf[3]);
-	if (!(buf[3] & 0x02))
+	if (buf[3] & 0x02)
 		printf("      Latency Tolerance Messages (LTM)"
 				" Supported\n");
 	printf("    wSpeedsSupported   0x%02x%02x\n", buf[5], buf[4]);
-- 
1.7.9

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux