usb: pd: fix the offset for SVID specific commands
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 18 Dec 2017 14:03:03 +0000 (17:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Dec 2017 10:47:23 +0000 (11:47 +0100)
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.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/usb/pd_vdo.h

index d92259f..2b64d23 100644 (file)
@@ -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)