[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1ec82a2-5c16-c3dd-147f-1e5256acffcd@linux.intel.com>
Date: Thu, 27 Jul 2023 13:49:36 +0300
From: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To: Tam Nguyen <tamnguyenchi@...amperecomputing.com>,
linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org
Cc: patches@...erecomputing.com, andriy.shevchenko@...ux.intel.com,
mika.westerberg@...ux.intel.com, jsd@...ihalf.com,
chuong@...amperecomputing.com, darren@...amperecomputing.com,
stable@...r.kernel.org
Subject: Re: [PATCH v2 2/2] i2c: designware: Handle invalid SMBus block data
response length value
On 7/26/23 11:00, Tam Nguyen wrote:
> In the I2C_FUNC_SMBUS_BLOCK_DATA case, the invalid length byte value
> (outside of 1-32) of the SMBus block data response from the Slave device
> is not correctly handled by the I2C Designware driver.
>
> In case IC_EMPTYFIFO_HOLD_MASTER_EN==1, which cannot be detected
> from the registers, the Master can be disabled only if the STOP bit
> is set. Without STOP bit set, the Master remains active, holding the bus
> until receiving a block data response length. This hangs the bus and
> is unrecoverable.
>
> Avoid this by issuing another dump read to reach the stop condition when
> an invalid length byte is received.
>
> Cc: stable@...r.kernel.org
> Signed-off-by: Tam Nguyen <tamnguyenchi@...amperecomputing.com>
> ---
> drivers/i2c/busses/i2c-designware-master.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
Acked-by: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Powered by blists - more mailing lists