From: "Haberlander, Markus" <Markus.Haberlander@rosenberger.com>
To: Thomas Richard <thomas.richard@bootlin.com>,
Andi Shyti <andi.shyti@kernel.org>
Cc: Lee Jones <lee@kernel.org>,
"mfd@lists.linux.dev" <mfd@lists.linux.dev>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] i2c: cgbc: Fetch the status of a write transfer
Date: Fri, 27 Nov 2026 09:20:59 +0000 [thread overview]
Message-ID: <FR4P281MB4840894892BD79C05D844CEC84412@FR4P281MB4840.DEUP281.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <b0d32861-c123-4f4f-8bac-aa0e7e48c719@bootlin.com>
Hi Thomas, Andi,
On 11/26/26 9:18 PM, Thomas Richard wrote:
> If I'm not mistaken, USEC_PER_SEC is only used if master_xfer returns
> -EGAIN (arbitration loss), else __i2c_transfer() directly returns so no
> 1s timeout. And we never return -EAGAIN.
>
> So why should we wait 1s?
Thanks for looking into this! I think Andi means the one-second loop in
cgbc_i2c_xfer(). Before my patch, when the controller was still busy
with a write, the next call returned -EBUSY and that loop simply tried
again, for up to a second.
My patch now waits only 2 * read_maxtime_us for a write to finish. That
is enough for the transfer itself. But if a device stretches the clock,
the controller might stay busy for longer, and the write would fail
where it used to succeed. That's why USEC_PER_SEC sounds like the safer
choice to me. I'm happy with either, though - you know this hardware
much better than I do.
If you go with USEC_PER_SEC, could you simply change the timeout when
picking up the patch? I can also send an updated patch on top of your
series, tested on our conga-PA7, if you prefer that.
And could you keep it right after 2/10, with its Fixes and Cc: stable
tags? Then both can go to stable together.
Thanks,
Markus
The information contained in this message is confidential or protected by law. If you are not the intended recipient, please contact the sender and delete this message. Any unauthorised copying of this message or unauthorised distribution of the information contained herein is prohibited.
Diese E-Mail enthält vertrauliche oder rechtlich geschützte Informationen. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail. Das unbefugte Kopieren dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen ist nicht gestattet.
Data security advice: Please be aware, that data exchange via Internet or E-Mail is not 100% safe. Therefore, please handle sensitive or confidential (bank) data with care. Please take note, that Rosenberger is not asking you for bank data or providing you such data via E-Mail, in principle. In case of deviations or questions please contact us immediately.
Rosenberger Hochfrequenztechnik GmbH & Co. KG, Registergericht: Amtsgericht Traunstein, HRA 5566
Persönlich haftender Gesellschafter: Rosenberger Hochfrequenztechnik GmbH, Registergericht: Amtsgericht Traunstein, HRB 4405
Geschäftsführer: Josef Rottenaicher, Jochen Ehrenberg, Hauke Schütt
Please consider our data policy: https://www.rosenberger.com/data-policy
next prev parent reply other threads:[~2026-11-27 9:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 12:33 Markus Haberlander via B4 Relay
2026-11-26 10:19 ` Thomas Richard (congatec GmbH)
2026-11-26 13:14 ` Andi Shyti
2026-11-26 17:49 ` Andi Shyti
2026-11-26 18:04 ` Thomas Richard
2026-11-26 18:28 ` Lee Jones
2026-11-26 20:18 ` Thomas Richard
2026-11-27 9:20 ` Haberlander, Markus [this message]
2026-11-27 11:04 ` 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=FR4P281MB4840894892BD79C05D844CEC84412@FR4P281MB4840.DEUP281.PROD.OUTLOOK.COM \
--to=markus.haberlander@rosenberger.com \
--cc=andi.shyti@kernel.org \
--cc=lee@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=stable@vger.kernel.org \
--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
all inboxes | Powered by JetHome®