* usb: pd: fix the offset for SVID specific commands
@ 2017-12-18 15:57 Heikki Krogerus
0 siblings, 0 replies; 4+ messages in thread
From: Heikki Krogerus @ 2017-12-18 15:57 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Guenter Roeck, linux-usb
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 <heikki.krogerus@linux.intel.com>
>
> 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,
^ permalink raw reply [flat|nested] 4+ messages in thread
* usb: pd: fix the offset for SVID specific commands
@ 2017-12-18 17:33 Guenter Roeck
0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2017-12-18 17:33 UTC (permalink / raw)
To: Heikki Krogerus; +Cc: Greg Kroah-Hartman, linux-usb
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 <heikki.krogerus@linux.intel.com>
> ---
> 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 <linux@roeck-us.net>
> /* 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* usb: pd: fix the offset for SVID specific commands
@ 2017-12-18 14:08 Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-12-18 14:08 UTC (permalink / raw)
To: Heikki Krogerus; +Cc: Guenter Roeck, linux-usb
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 <heikki.krogerus@linux.intel.com>
Does 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* usb: pd: fix the offset for SVID specific commands
@ 2017-12-18 14:03 Heikki Krogerus
0 siblings, 0 replies; 4+ messages in thread
From: Heikki Krogerus @ 2017-12-18 14:03 UTC (permalink / raw)
To: Greg Kroah-Hartman, Guenter Roeck; +Cc: linux-usb
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>
---
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_VERSION VDO_CMD_VENDOR(0)
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-18 17:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-18 15:57 usb: pd: fix the offset for SVID specific commands Heikki Krogerus
-- strict thread matches above, loose matches on Subject: below --
2017-12-18 17:33 Guenter Roeck
2017-12-18 14:08 Greg Kroah-Hartman
2017-12-18 14:03 Heikki Krogerus
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.