From: Andi Shyti <andi.shyti@kernel.org>
To: "Thomas Richard (congatec GmbH)" <thomas.richard@bootlin.com>
Cc: Lee Jones <lee@kernel.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Werner Gartner <Werner.Gartner@congatec.com>,
mfd@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-i2c@vger.kernel.org,
Markus Haberlander <markus.haberlander@rosenberger.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v8 11/11] i2c: cgbc: Fetch the status of a write transfer
Date: Wed, 2 Dec 2026 15:21:47 +0100 [thread overview]
Message-ID: <axApZ4CP11o25k5l@zenone.zhora.eu> (raw)
In-Reply-To: <20261130-cgbc-i2c-storage-devices-support-v8-11-83734a668a98@bootlin.com>
Hi Thomas,
On Mon, Nov 30, 2026 at 03:28:19PM +0100, Thomas Richard (congatec GmbH) wrote:
> From: Markus Haberlander <markus.haberlander@rosenberger.com>
>
> A write transfer sends the I2C command to the board controller and
> returns without reading the controller's I2C status, while a read polls
> the status until the controller is no longer busy. The status of a write
> is therefore never fetched:
>
> - the write reports success before the bus transfer has finished, and
> an error such as a NAK is only reported by the next transfer;
> - the controller keeps the status of the last write pending. On a
> conga-PA7 (BIOS PA70R026, board controller CGBCP032), a board reset
> with a write status pending does not power the board up again: after
> a reboot that follows a write on the general purpose bus, the board
> stays off until it is power cycled.
>
> Read the status after a write as well, as the read path does: poll until
> the controller is no longer busy, return the error it reports, and treat
> any state other than idle as an error.
>
> Tested on a conga-PA7 with v6.18.64 and "i2c: cgbc: Propagate hardware
> errors when polling read status": without this patch, a write to an
> absent address returns success, the next read fails, and a reboot after
> a write does not come back. With it, the write itself fails, the next
> transfer succeeds, and 14 reboots, each right after an acknowledged or a
> NAKed write, all came back.
>
> The patch and this changelog were drafted with the help of Claude
> Opus 5.5 and reviewed and tested by me.
>
> Fixes: 6894f640b8f3 ("i2c: Congatec Board Controller i2c bus driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Markus Haberlander <markus.haberlander@rosenberger.com>
> Reviewed-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
> Tested-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
> [Thomas: Use USEC_PER_SEC]
> Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
next prev parent reply other threads:[~2026-12-02 14:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 01/11] mfd: cgbc: Fix use of negative error code as valid session handle Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 02/11] i2c: cgbc: Propagate hardware errors when polling read status Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 03/11] i2c: cgbc: Use real I2C bus names Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 04/11] mfd: cgbc: Add I2C platform data Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 05/11] i2c: cgbc: Use plateform data to get bus ID and adapter name Thomas Richard (congatec GmbH)
2026-12-02 13:59 ` Andi Shyti
2026-12-02 21:00 ` Peter Korsgaard
2026-11-30 14:28 ` [PATCH v8 06/11] mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 07/11] i2c: cgbc: Add support for fixed frequency buses Thomas Richard (congatec GmbH)
2026-12-02 14:05 ` Andi Shyti
2026-11-30 14:28 ` [PATCH v8 08/11] mfd: cgbc: Add virtual I2C bus support Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 09/11] mfd: cgbc: Add virtual storage devices on the virtual I2C bus Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 10/11] i2c: cgbc: Register known I2C devices on the bus Thomas Richard (congatec GmbH)
2026-12-02 14:18 ` Andi Shyti
2026-11-30 14:28 ` [PATCH v8 11/11] i2c: cgbc: Fetch the status of a write transfer Thomas Richard (congatec GmbH)
2026-12-02 14:21 ` Andi Shyti [this message]
2026-12-02 14:25 ` [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Andi Shyti
2026-12-02 14:29 ` Thomas Richard
2026-12-02 15:15 ` Andi Shyti
2026-12-02 15:30 ` Thomas Richard
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=axApZ4CP11o25k5l@zenone.zhora.eu \
--to=andi.shyti@kernel.org \
--cc=Werner.Gartner@congatec.com \
--cc=lee@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.haberlander@rosenberger.com \
--cc=mfd@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=thomas.richard@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox