Re: [PATCH] usb: pd: fix the offset for SVID specific commands
On Mon, Dec 18, 2017 at 03:08:35PM +0100, Greg Kroah-Hartman wrote: > 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> > Does this fix any specific code that uses this macro? Should it go to > the stable tree(s)? No, nothing uses the macro yet. Thanks, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: pd: fix the offset for SVID specific commands
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> --- > 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_MODE5 > #define CMD_ATTENTION6 > > -#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 > /* 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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: pd: fix the offset for SVID specific commands
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 KrogerusDoes this fix any specific code that uses this macro? Should it go to the stable tree(s)? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] usb: pd: fix the offset for SVID specific commands
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--- 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)) /* ChromeOS specific commands */ #define VDO_CMD_VERSIONVDO_CMD_VENDOR(0) -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html