[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220531170743.GA1457068@alison-desk>
Date: Tue, 31 May 2022 10:07:43 -0700
From: Alison Schofield <alison.schofield@...el.com>
To: "Weiny, Ira" <ira.weiny@...el.com>
Cc: "Williams, Dan J" <dan.j.williams@...el.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
"Verma, Vishal L" <vishal.l.verma@...el.com>,
"Jiang, Dave" <dave.jiang@...el.com>,
Ben Widawsky <ben@...dawsk.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-cxl@...r.kernel.org" <linux-cxl@...r.kernel.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>
Subject: Re: [PATCH V9 8/9] cxl/port: Retry reading CDAT on failure
On Tue, May 31, 2022 at 08:26:31AM -0700, Ira Weiny wrote:
> From: Ira Weiny <ira.weiny@...el.com>
>
> The CDAT read may fail for a number of reasons but mainly it is possible
> to get different parts of a valid state. The checksum in the CDAT table
> protects against this.
>
> Now that the cdat data is validated issue a retries if the CDAT read
> fails. For now 5 retries are implemented.
>
> Signed-off-by: Ira Weiny <ira.weiny@...el.com>
>
> ---
snip
> +
> +void read_cdat_data(struct cxl_port *port)
> +{
> + int retries = 5;
> + int rc;
> +
> + while (retries--) {
> + rc = __read_cdat_data(port);
> + if (!rc)
> + break;
> + dev_err(&port->dev,
> + "CDAT data read error rc=%d (retries %d)\n",
> + rc, retries);
> + }
Perhaps dev_dbg() on retries and dev_err() only when retries are exhausted.
> }
> EXPORT_SYMBOL_NS_GPL(read_cdat_data, CXL);
> --
> 2.35.1
>
Powered by blists - more mailing lists