[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZNosRDSWSa4Pbs37@shikoro>
Date: Mon, 14 Aug 2023 15:29:40 +0200
From: Wolfram Sang <wsa@...nel.org>
To: Tam Nguyen <tamnguyenchi@...amperecomputing.com>
Cc: linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
patches@...erecomputing.com, jarkko.nikula@...ux.intel.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 Wed, Jul 26, 2023 at 03:00:01PM +0700, 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>
Applied to for-current, thanks!
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists