lkml.org 
[lkml]   [2022]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@intel.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@intel.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
>

\
 
 \ /
  Last update: 2022-05-31 19:07    [W:0.160 / U:1.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site