From: Guenter Roeck <linux@roeck-us.net>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org
Subject: usb: pd: fix the offset for SVID specific commands
Date: Mon, 18 Dec 2017 09:33:56 -0800 [thread overview]
Message-ID: <20171218173356.GA17029@roeck-us.net> (raw)
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
next reply other threads:[~2017-12-18 17:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 17:33 Guenter Roeck [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-12-18 15:57 usb: pd: fix the offset for SVID specific commands Heikki Krogerus
2017-12-18 14:08 Greg Kroah-Hartman
2017-12-18 14:03 Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171218173356.GA17029@roeck-us.net \
--to=linux@roeck-us.net \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.