On Mon, Dec 18, 2017 at 05:03:03PM +0300, Heikki Krogerus wrote:
> 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 <[email protected]>
> ---
>  include/linux/usb/pd_vdo.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/usb/pd_vdo.h b/include/linux/usb/pd_vdo.h
> index d92259f8de0a..2b64d23ace5c 100644
> --- a/include/linux/usb/pd_vdo.h
> +++ b/include/linux/usb/pd_vdo.h
> @@ -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))
>  
Good catch. Bad part is that this originates from
https://chromium.googlesource.com/chromiumos/platform/ec,
which uses 10 as starting point. Nothing we can do about that.

Anyway,

Reviewed-by: Guenter Roeck <[email protected]>

>  /* ChromeOS specific commands */
>  #define VDO_CMD_VERSION              VDO_CMD_VENDOR(0)
> -- 
> 2.15.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to