Skip to contentSkip to conversation

usb: pd: fix the offset for SVID specific commands

PATCH Heikki Krogerus 1 participant 1 message Dec 18, 2017 USB

lore
Share & tools
lore
#0 lore raw

The SVID specific commands in the Command field of the Structured VDM Header start from 16, not 10. Changing the value used in VDO_CMD_VENDOR() macro from 10 to 0x10.

---
 include/linux/usb/pd_vdo.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/usb/pd_vdo.h +1 -1
index d92259f8de0a..2b64d23ace5c 100644
@@ -65,7 +65,7 @@
 #define CMD_EXIT_MODE		5
 #define CMD_ATTENTION		6
 
-#define VDO_CMD_VENDOR(x)    (((10 + (x)) & 0x1f))
+#define VDO_CMD_VENDOR(x)    (((0x10 + (x)) & 0x1f))
 
 /* ChromeOS specific commands */
 #define VDO_CMD_VERSION		VDO_CMD_VENDOR(0)