public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Sven Peter" <sven@svenpeter.dev>
To: "Andi Shyti" <andi.shyti@kernel.org>
Cc: "Janne Grunau" <j@jannau.net>,
	"Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
	"Madhavan Srinivasan" <maddy@linux.ibm.com>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Naveen N Rao" <naveen@kernel.org>, "Neal Gompa" <neal@gompa.dev>,
	"Hector Martin" <marcan@marcan.st>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/6] i2c: pasemi: Improve error recovery
Date: Sun, 27 Apr 2025 13:29:17 +0200	[thread overview]
Message-ID: <c6590a37-97b0-4497-8cc1-c4572897f0dc@app.fastmail.com> (raw)
In-Reply-To: <dtjvj34q4ojbci67akkxfiskpiro24xupagr5rl4dn3idd6vxh@2emtiwbvpvra>

Hi,


On Thu, Apr 17, 2025, at 15:07, Andi Shyti wrote:
> Hi Sven, Hector,
>
> ...
>
>> +/*
>> + * The hardware (supposedly) has a 25ms timeout for clock stretching, thus
>> + * use 100ms here which should be plenty.
>> + */
>> +#define TRANSFER_TIMEOUT_MS	100
>
> Please use the PASEMI prefix here. TRANSFER_TIMEOUT_MS it's not a
> naming belonging to this driver.
>
> 100ms looks a bit too much to me, but if you say it works, then
> it works.
>

The problem here is that we only have very outdated documentation for this
hardware and no real idea what changed since Apple bought PASemi and continued
using their i2c controller.
We know that 10ms (which used to be the original timeout iirc) is not nearly
enough and we also know that we need at least 25ms for clock strechting
(assuming nothing changed in the past 10+ years).
We just bumped it to 100ms to be safe after we very rarely got error
reports which we tracked down to timeouts and haven't gotten any reports
since.


I've addressed all your other comments for v3 which I'll send out in a few minutes.


Best,


Sven

  reply	other threads:[~2025-04-27 11:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-15 15:36 [PATCH v2 0/6] Apple/PASemi i2c error recovery fixes Sven Peter via B4 Relay
2025-04-15 15:36 ` [PATCH v2 1/6] i2c: pasemi: Use correct bits.h include Sven Peter via B4 Relay
2025-04-15 17:10   ` Alyssa Rosenzweig
2025-04-15 15:36 ` [PATCH v2 2/6] i2c: pasemi: Sort includes alphabetically Sven Peter via B4 Relay
2025-04-15 17:11   ` Alyssa Rosenzweig
2025-04-15 15:36 ` [PATCH v2 3/6] i2c: pasemi: Improve timeout handling Sven Peter via B4 Relay
2025-04-15 17:11   ` Alyssa Rosenzweig
2025-04-17 12:57   ` Andi Shyti
2025-04-15 15:36 ` [PATCH v2 4/6] i2c: pasemi: Improve error recovery Sven Peter via B4 Relay
2025-04-15 17:12   ` Alyssa Rosenzweig
2025-04-17 13:07   ` Andi Shyti
2025-04-27 11:29     ` Sven Peter [this message]
2025-04-15 15:36 ` [PATCH v2 5/6] i2c: pasemi: Enable the unjam machine Sven Peter via B4 Relay
2025-04-15 15:37 ` [PATCH v2 6/6] i2c: pasemi: Log bus reset causes Sven Peter via B4 Relay
2025-04-17 13:10   ` Andi Shyti
2025-04-16  1:38 ` [PATCH v2 0/6] Apple/PASemi i2c error recovery fixes Neal Gompa
2025-04-17 13:16 ` 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=c6590a37-97b0-4497-8cc1-c4572897f0dc@app.fastmail.com \
    --to=sven@svenpeter.dev \
    --cc=alyssa@rosenzweig.io \
    --cc=andi.shyti@kernel.org \
    --cc=asahi@lists.linux.dev \
    --cc=christophe.leroy@csgroup.eu \
    --cc=j@jannau.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=marcan@marcan.st \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=neal@gompa.dev \
    --cc=npiggin@gmail.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