Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Vincent Jardin <vjardin@free.fr>
To: sashiko-reviews@lists.linux.dev
Cc: Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v2 2/2] i2c: imx: fix locked bus on SMBus block-read of 0 (IRQ)
Date: Tue, 26 May 2026 10:26:36 +0200	[thread overview]
Message-ID: <ahVZPLHymdsZtgg5@L30177.local> (raw)
In-Reply-To: <20260525182420.05AA01F000E9@smtp.kernel.org>

Hi bot,


> i2c: imx: fix locked bus on SMBus block-read of 0 (IRQ)
> [Severity: High]
> This is a pre-existing issue, but does this function also need to set the
> TXAK bit when len is exactly 1?
> 
> When the length byte is read here, the hardware immediately starts clocking
> in the next byte, which is the first data byte. If the block read length is
> exactly 1, this first data byte is also the last byte of the transfer.
> 
> Because TXAK is explicitly cleared earlier in i2c_imx_isr_read for length
> transfers, the controller will ACK this final data byte if TXAK is not set
> at this point.
> 
> If the slave holds SDA low as a result of receiving an ACK instead of a NACK
> on its final byte, would the subsequent attempt to generate a STOP condition
> in i2c_imx_isr_read_continue fail and permanently hang the bus?
> 
> The atomic path in i2c_imx_atomic_read appears to handle this safely by
> setting TXAK when reading the second-to-last byte.

once again, see the answers on v1:
  https://lore.kernel.org/all/ahRoKMLtrirbowbj@L30177.local/

regards,
  Vincent

  reply	other threads:[~2026-05-26  8:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25 11:24 [PATCH 0/2] i2c: imx: fix SMBus block-read of 0 locking the bus Vincent Jardin
2026-05-25 11:24 ` [PATCH 1/2] i2c: imx: fix locked bus on SMBus block-read of 0 (atomic) Vincent Jardin
2026-05-25 12:04   ` sashiko-bot
2026-05-25 15:11     ` Vincent Jardin
2026-05-25 11:24 ` [PATCH 2/2] i2c: imx: fix locked bus on SMBus block-read of 0 (IRQ) Vincent Jardin
2026-05-25 13:33   ` sashiko-bot
2026-05-25 15:18     ` Vincent Jardin
2026-05-25 16:43 ` [PATCH v2 0/2] i2c: imx: fix SMBus block-read of 0 locking the bus Vincent Jardin
2026-05-25 16:43   ` [PATCH v2 1/2] i2c: imx: fix locked bus on SMBus block-read of 0 (atomic) Vincent Jardin
2026-05-25 17:18     ` sashiko-bot
2026-05-26  8:24       ` Vincent Jardin
2026-05-25 16:43   ` [PATCH v2 2/2] i2c: imx: fix locked bus on SMBus block-read of 0 (IRQ) Vincent Jardin
2026-05-25 18:24     ` sashiko-bot
2026-05-26  8:26       ` Vincent Jardin [this message]
     [not found]   ` <AM0PR04MB6802B906706F0CDE5BA73696E80B2@AM0PR04MB6802.eurprd04.prod.outlook.com>
2026-05-26  8:12     ` [PATCH v2 0/2] i2c: imx: fix SMBus block-read of 0 locking the bus Vincent Jardin
2026-05-26  9:00       ` Carlos Song (OSS)

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=ahVZPLHymdsZtgg5@L30177.local \
    --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