All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@aj.id.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	openbmc@lists.ozlabs.org,
	Eddie James <eajames@linux.vnet.ibm.com>
Subject: Re: [PATCH linux dev-4.13 2/4] fsi/occ: Add Retries on checksum errors
Date: Mon, 21 May 2018 14:56:17 +0930	[thread overview]
Message-ID: <1526880377.2644647.1378943632.1451B0E7@webmail.messagingengine.com> (raw)
In-Reply-To: <20180518013500.18005-2-benh@kernel.crashing.org>

On Fri, 18 May 2018, at 11:04, Benjamin Herrenschmidt wrote:
> Similarily to the new retry on SBE fifo errors, this adds
> retries if the data we obtain from the OCC has a bad checksum.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>  drivers/fsi/fsi-occ.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/fsi/fsi-occ.c b/drivers/fsi/fsi-occ.c
> index f4b2df7a3084..7a5afa78fb6b 100644
> --- a/drivers/fsi/fsi-occ.c
> +++ b/drivers/fsi/fsi-occ.c
> @@ -652,7 +652,7 @@ static void occ_worker(struct work_struct *work)
>  	struct occ_client *client;
>  	struct occ *occ = container_of(work, struct occ, work);
>  	struct device *sbefifo = occ->sbefifo;
> -
> +	int retries = 0;
>  again:
>  	if (occ->cancel)
>  		return;
> @@ -720,7 +720,10 @@ static void occ_worker(struct work_struct *work)
>  	xfr->resp_data_length = resp_data_length + 7;
>  
>  	rc = occ_verify_checksum(resp, resp_data_length);
> -
> +	if (rc) {
> +		if (retries++ < OCC_COMMAND_RETRIES)
> +			goto again;
> +	}

How should this interact with the OCC error handling mentioned in my reply on the previous patch? I feel like a checksum error is a bit of a grey area - probably caused by the transport, but possibly due to OCC firmware bugs as well? If it's the former then retrying independent of the OCC error handling protocol is probably okay, but if we're trying to catch the latter then maybe we should let this be handled as part of the OCC error handling code?

Eddie?

Ben: Did you actually hit cases where this path was triggered? There was the corruption issue with simultaneous LPC cycles that turned out to be issues around level-shifters and synchronisers, was that it?

>  done:
>  	mutex_unlock(&occ->occ_lock);
>  
> @@ -732,6 +735,7 @@ static void occ_worker(struct work_struct *work)
>  	clear_bit(XFR_IN_PROGRESS, &xfr->flags);
>  	list_del(&xfr->link);
>  	empty = list_empty(&occ->xfrs);
> +	retries = 0;
>  
>  	spin_unlock_irqrestore(&occ->list_lock, flags);
>  
> -- 
> 2.17.0
> 

  reply	other threads:[~2018-05-21  5:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18  1:34 [PATCH linux dev-4.13 1/4] fsi/occ: Add retries on SBE errors Benjamin Herrenschmidt
2018-05-18  1:34 ` [PATCH linux dev-4.13 2/4] fsi/occ: Add Retries on checksum errors Benjamin Herrenschmidt
2018-05-21  5:26   ` Andrew Jeffery [this message]
2018-05-21 14:48     ` Benjamin Herrenschmidt
2018-05-21 18:58       ` Eddie James
2018-05-21 22:55         ` Benjamin Herrenschmidt
2018-05-22  0:36         ` Benjamin Herrenschmidt
2018-05-22 14:06           ` Eddie James
2018-05-18  1:34 ` [PATCH linux dev-4.13 3/4] fsi/occ: Nicer error messages when talking to a host that isn't ready Benjamin Herrenschmidt
2018-05-21  5:30   ` Andrew Jeffery
2018-05-18  1:35 ` [PATCH linux dev-4.13 4/4] fsi/occ: Don't set driver data late Benjamin Herrenschmidt
2018-05-21  5:44   ` Andrew Jeffery
2018-05-21  5:14 ` [PATCH linux dev-4.13 1/4] fsi/occ: Add retries on SBE errors Andrew Jeffery
2018-05-21  8:33   ` Benjamin Herrenschmidt
2018-05-21 18:48     ` Eddie James
2018-05-21 22:53       ` Benjamin Herrenschmidt
2018-05-22 14:09         ` Eddie James

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=1526880377.2644647.1378943632.1451B0E7@webmail.messagingengine.com \
    --to=andrew@aj.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=eajames@linux.vnet.ibm.com \
    --cc=openbmc@lists.ozlabs.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.