lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9445d317-ffc4-eac2-6eb4-d76f878fae0d@broadcom.com>
Date:   Fri, 23 Oct 2020 10:14:03 -0700
From:   Ray Jui <ray.jui@...adcom.com>
To:     Rayagonda Kokatanur <rayagonda.kokatanur@...adcom.com>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        bcm-kernel-feedback-list@...adcom.com,
        Wolfram Sang <wsa@...nel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Lori Hikichi <lori.hikichi@...adcom.com>,
        Dhananjay Phadke <dphadke@...ux.microsoft.com>,
        linux-i2c@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/6] i2c: iproc: handle Master aborted error



On 10/11/2020 11:22 AM, Rayagonda Kokatanur wrote:
> Handle Master aborted error by flushing tx and rx fifo
> and reinitializing the hw.
> 
> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@...adcom.com>
> ---
>  drivers/i2c/busses/i2c-bcm-iproc.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
> index d8295b1c379d..834a98caeada 100644
> --- a/drivers/i2c/busses/i2c-bcm-iproc.c
> +++ b/drivers/i2c/busses/i2c-bcm-iproc.c
> @@ -93,6 +93,7 @@
>  #define S_CMD_STATUS_MASK            0x07
>  #define S_CMD_STATUS_SUCCESS         0x0
>  #define S_CMD_STATUS_TIMEOUT         0x5
> +#define S_CMD_STATUS_MASTER_ABORT    0x7
>  
>  #define IE_OFFSET                    0x38
>  #define IE_M_RX_FIFO_FULL_SHIFT      31
> @@ -311,9 +312,10 @@ static void bcm_iproc_i2c_check_slave_status(
>  		return;
>  
>  	val = (val >> S_CMD_STATUS_SHIFT) & S_CMD_STATUS_MASK;
> -	if (val == S_CMD_STATUS_TIMEOUT) {
> -		dev_err(iproc_i2c->device, "slave random stretch time timeout\n");
> -
> +	if (val == S_CMD_STATUS_TIMEOUT || val == S_CMD_STATUS_MASTER_ABORT) {
> +		dev_err(iproc_i2c->device, (val == S_CMD_STATUS_TIMEOUT) ?
> +			"slave random stretch time timeout\n" :
> +			"Master aborted read transaction\n");
>  		/* re-initialize i2c for recovery */
>  		bcm_iproc_i2c_enable_disable(iproc_i2c, false);
>  		bcm_iproc_i2c_slave_init(iproc_i2c, true);
> 

This looks fine to me. Thanks.

Acked-by: Ray Jui <ray.jui@...adcom.com>



Download attachment "smime.p7s" of type "application/pkcs7-signature" (4151 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ