mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Shawn N <shawnn@chromium.org>,
	Brian Norris <briannorris@chromium.org>,
	<linux-kernel@vger.kernel.org>,
	Benson Leung <bleung@chromium.org>
Subject: Re: [PATCH] mfd: cros ec: spi: Fix "in progress" error signaling
Date: Wed, 29 Nov 2017 11:50:15 +0000	[thread overview]
Message-ID: <bc933b49-9990-5bdf-22b8-9c0ee2c415f4@nvidia.com> (raw)
In-Reply-To: <CALaWCOOPJ-Pp7RF=c7Uz60MTCm9iz=KuEaHav5Miu4PciAD27A@mail.gmail.com>

Hi Lee,

On 14/11/17 17:00, Shawn N wrote:
> On Wed, Sep 27, 2017 at 3:19 PM, Brian Norris <briannorris@chromium.org> wrote:
>> On Wed, Sep 27, 2017 at 02:35:27PM -0700, Shawn Nematbakhsh wrote:
>>> For host commands that take a long time to process, cros ec can return
>>> early by signaling a EC_RES_IN_PROGRESS result. The host must then poll
>>> status with EC_CMD_GET_COMMS_STATUS until completion of the command.
>>>
>>> None of the above applies when data link errors are encountered. When
>>> errors such as EC_SPI_PAST_END are encountered during command
>>> transmission, it usually means the command was not received by the EC.
>>> Treating such errors as if they were 'EC_RES_IN_PROGRESS' results is
>>> almost always the wrong decision, and can result in host commands
>>> silently being lost.
>>>
>>> Reported-and-tested-by: Jon Hunter <jonathanh@nvidia.com>
>>> Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
>>> ---
>>>  drivers/mfd/cros_ec_spi.c | 52 ++++++++++++++++++++++-------------------------
>>>  1 file changed, 24 insertions(+), 28 deletions(-)
>>
>> I'm still not sure I understand the full extent of the
>> originally-reported error (it's still likely a SPI transport issue?),
>> but I believe this patch is good anyway:
>>
>> Reviewed-by: Brian Norris <briannorris@chromium.org>
> 
> Jon tracked down the root cause of the originally-reported error, but
> we should still land this patch, as it fixes error signaling that was
> previously broken.

Can you also queue this one as a fix for v4.15?

Cheers
Jon

-- 
nvpublic

  reply	other threads:[~2017-11-29 11:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 21:35 Shawn Nematbakhsh
2017-09-27 22:19 ` Brian Norris
2017-11-14 17:00   ` Shawn N
2017-11-29 11:50     ` Jon Hunter [this message]
2017-11-22  3:54 ` Benson Leung
2017-11-29 12:11 ` Lee Jones
2018-03-26 16:48   ` Enric Balletbo Serra
2018-03-26 17:26     ` Alexandru M Stan
2018-03-27 10:49       ` Enric Balletbo Serra
2018-03-29 22:08         ` Alexandru M Stan

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=bc933b49-9990-5bdf-22b8-9c0ee2c415f4@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=bleung@chromium.org \
    --cc=briannorris@chromium.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawnn@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome