From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754669AbdK2LuV (ORCPT ); Wed, 29 Nov 2017 06:50:21 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:9553 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753232AbdK2LuU (ORCPT ); Wed, 29 Nov 2017 06:50:20 -0500 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Wed, 29 Nov 2017 03:51:01 -0800 Subject: Re: [PATCH] mfd: cros ec: spi: Fix "in progress" error signaling To: Lee Jones CC: Shawn N , Brian Norris , , Benson Leung References: <20170927213527.31416-1-shawnn@chromium.org> <20170927221908.GA7699@google.com> From: Jon Hunter Message-ID: Date: Wed, 29 Nov 2017 11:50:15 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.21.132.148] X-ClientProxiedBy: UKMAIL101.nvidia.com (10.26.138.13) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lee, On 14/11/17 17:00, Shawn N wrote: > On Wed, Sep 27, 2017 at 3:19 PM, Brian Norris 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 >>> Signed-off-by: Shawn Nematbakhsh >>> --- >>> 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 > > 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