All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Tam Nguyen <tamnguyenchi@os.amperecomputing.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	patches@amperecomputing.com, jarkko.nikula@linux.intel.com,
	andriy.shevchenko@linux.intel.com,
	mika.westerberg@linux.intel.com, jsd@semihalf.com,
	chuong@os.amperecomputing.com, darren@os.amperecomputing.com,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 2/2] i2c: designware: Handle invalid SMBus block data response length value
Date: Mon, 14 Aug 2023 15:29:40 +0200	[thread overview]
Message-ID: <ZNosRDSWSa4Pbs37@shikoro> (raw)
In-Reply-To: <20230726080001.337353-3-tamnguyenchi@os.amperecomputing.com>

[-- Attachment #1: Type: text/plain, Size: 836 bytes --]

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@vger.kernel.org
> Signed-off-by: Tam Nguyen <tamnguyenchi@os.amperecomputing.com>

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2023-08-14 13:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26  7:59 [PATCH v2 0/2] i2c: designware: Handle invalid SMBus block data response length value Tam Nguyen
2023-07-26  8:00 ` [PATCH v2 1/2] i2c: designware: Correct length byte validation logic Tam Nguyen
2023-07-27 10:36   ` Jarkko Nikula
2023-08-14 13:29   ` Wolfram Sang
2023-07-26  8:00 ` [PATCH v2 2/2] i2c: designware: Handle invalid SMBus block data response length value Tam Nguyen
2023-07-27 10:49   ` Jarkko Nikula
2023-08-14 13:29   ` Wolfram Sang [this message]
2023-08-02 20:02 ` [PATCH v2 0/2] " Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNosRDSWSa4Pbs37@shikoro \
    --to=wsa@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=chuong@os.amperecomputing.com \
    --cc=darren@os.amperecomputing.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=patches@amperecomputing.com \
    --cc=stable@vger.kernel.org \
    --cc=tamnguyenchi@os.amperecomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.