chrome-platform.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Benson Leung <bleung@chromium.org>,
	chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
	Daisuke Nojiri <dnojiri@chromium.org>,
	Rob Barnes <robbarnes@google.com>,
	Rajat Jain <rajatja@google.com>,
	Parth Malkan <parthmalkan@google.com>
Subject: Re: [PATCH v2] platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls
Date: Fri, 18 Mar 2022 18:22:11 -0700	[thread overview]
Message-ID: <YjUwQ1kgjHF2AMBV@google.com> (raw)
In-Reply-To: <20220318165422.686848-1-linux@roeck-us.net>

On Fri, Mar 18, 2022 at 09:54:22AM -0700, Guenter Roeck wrote:
> Commit 413dda8f2c6f ("platform/chrome: cros_ec_chardev: Use
> cros_ec_cmd_xfer_status helper") inadvertendly changed the userspace ABI.
> Previously, cros_ec ioctls would only report errors if the EC communication
> failed, and otherwise return success and the result of the EC
> communication. An EC command execution failure was reported in the EC
> response field. The above mentioned commit changed this behavior, and the
> ioctl itself would fail. This breaks userspace commands trying to analyze
> the EC command execution error since the actual EC command response is no
> longer reported to userspace.
> 
> Fix the problem by re-introducing the cros_ec_cmd_xfer() helper, and use it
> to handle ioctl messages.
> 
> Fixes: 413dda8f2c6f ("platform/chrome: cros_ec_chardev: Use cros_ec_cmd_xfer_status helper")

Probably could use a Cc: <stable@vger.kernel.org> in here, since this is
a user-space ABI regression. But these days, there's effectively no
difference vs. just a Fixes tag, because someone's bot will usually pick
it up.

> Cc: Daisuke Nojiri <dnojiri@chromium.org>
> Cc: Rob Barnes <robbarnes@google.com>
> Cc: Rajat Jain <rajatja@google.com>
> Cc: Brian Norris <briannorris@chromium.org>
> Cc: Parth Malkan <parthmalkan@google.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v2: Updated comments / return value description. No functional change.

Reviewed-by: Brian Norris <briannorris@chromium.org>

  parent reply	other threads:[~2022-03-19  1:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 16:54 [PATCH v2] platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls Guenter Roeck
2022-03-18 17:59 ` Daisuke Nojiri
     [not found] ` <CAC0y+AjJxRGE570hTAq4WEtFrWa71e9q_h4xyN_52o4b9G_r2g@mail.gmail.com>
2022-03-18 18:00   ` Daisuke Nojiri
2022-03-19  1:22 ` Brian Norris [this message]
2022-04-19  3:30 ` patchwork-bot+chrome-platform
2022-04-20  9:10 ` patchwork-bot+chrome-platform

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=YjUwQ1kgjHF2AMBV@google.com \
    --to=briannorris@chromium.org \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=dnojiri@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=parthmalkan@google.com \
    --cc=rajatja@google.com \
    --cc=robbarnes@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).