From: Vincent Jardin <vjardin@free.fr>
To: sashiko-reviews@lists.linux.dev
Cc: imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH v3 1/2] i2c: imx: fix locked bus on SMBus block-read of 0 (atomic)
Date: Mon, 13 Jul 2026 21:39:24 +0200 [thread overview]
Message-ID: <alU-7MXMiRth36Qr@l30177.home> (raw)
In-Reply-To: <20260713182637.8A9141F000E9@smtp.kernel.org>
Hi Bot,
Le 13/07/26 18:26, sashiko-bot@kernel.org a écrit :
> - [High] `i2c_imx_prepare_read()` fails to clear `I2CR_TXAK` for SMBus block reads, causing the block length byte to be incorrectly NACKed.
> - [High] The interrupt-driven SMBus block read path (`i2c_imx_isr_read_block_data_len`) fails to properly terminate the transaction when receiving an invalid length (0 or > I2C_SMBUS_BLOCK_MAX), leaving the I2C bus stuck.
Both topics were already raised on v1 and v2 and answered. No change with v3,
so no need to reopend those threads.
> [Severity: High]
> This isn't a bug introduced by this patch, but does the interrupt-driven
> SMBus block read path in i2c_imx_isr_read_block_data_len() fail to properly
> terminate the transaction when receiving an invalid length?
[...}
> I see the commit message acknowledges this flaw exists in the interrupt
> path but defers fixing it to a separate patch. Since that patch is not
> included in this series, the hang remains active in the codebase.
See 2/2 of this serie.
Same for v1: https://lore.kernel.org/all/ahRoKMLtrirbowbj@L30177.local/
and v2: https://lore.kernel.org/all/ahVZPLHymdsZtgg5@L30177.local/
> [Severity: High]
> This is a pre-existing issue, but does i2c_imx_prepare_read() fail to clear
> I2CR_TXAK for SMBus block reads?
>
> In i2c_imx_prepare_read(), there is no check for I2C_M_RECV_LEN:
>
> if (msgs->len - 1)
> temp &= ~I2CR_TXAK;
[...}
> A compliant SMBus slave will immediately abort the transaction upon receiving
> a nack, causing all subsequent data bytes to read as 0xFF. Should this check
> include the I2C_M_RECV_LEN flag to properly clear TXAK?
Already explained with v1:
https://lore.kernel.org/all/ahRmjr9cxYmkYvm5@L30177.local/
Best regards,
Vincent
next prev parent reply other threads:[~2026-07-13 19:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 18:11 [PATCH v3 0/2] i2c: imx: fix SMBus block-read of 0 locking the bus Vincent Jardin
2026-07-13 18:11 ` [PATCH v3 1/2] i2c: imx: fix locked bus on SMBus block-read of 0 (atomic) Vincent Jardin
2026-07-13 18:26 ` sashiko-bot
2026-07-13 19:39 ` Vincent Jardin [this message]
2026-07-13 18:12 ` [PATCH v3 2/2] i2c: imx: fix locked bus on SMBus block-read of 0 (IRQ) Vincent Jardin
2026-07-13 18:29 ` sashiko-bot
2026-07-13 19:50 ` Vincent Jardin
2026-07-14 15:00 ` [PATCH v3 0/2] i2c: imx: fix SMBus block-read of 0 locking the bus Andi Shyti
2026-07-14 15:18 ` Vincent Jardin
2026-07-14 15:45 ` Wolfram Sang
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=alU-7MXMiRth36Qr@l30177.home \
--to=vjardin@free.fr \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox