From: Quan Nguyen <quan@os.amperecomputing.com>
To: Jeremy Kerr <jk@codeconstruct.com.au>,
Matt Johnston <matt@codeconstruct.com.au>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
openbmc@lists.ozlabs.org,
Open Source Submission <patches@amperecomputing.com>
Cc: Phong Vo <phong@os.amperecomputing.com>,
Thang Nguyen <thang@os.amperecomputing.com>,
Dung Cao <dung@os.amperecomputing.com>
Subject: Re: [PATCH] mctp i2c: Requeue the packet when arbitration is lost
Date: Fri, 1 Dec 2023 18:47:30 +0700 [thread overview]
Message-ID: <a1cd2239-d8b7-412e-bca6-ebcf3a19ed65@os.amperecomputing.com> (raw)
In-Reply-To: <10491ca5819563f98e2f4414836fd4da0c84c753.camel@codeconstruct.com.au>
On 01/12/2023 15:38, Jeremy Kerr wrote:
> Hi Quan,
>
>> As per [1], __i2c_transfer() will retry for adap->retries times
>> consecutively (without any wait) within the amount of time specified
>> by adap->timeout.
>>
>> So as per my observation, once it loses the arbitration, the next
>> retry is most likely still lost as another controller who win the
>> arbitration may still be using the bus.
>
> In general (and specifically with your hardware setup), the controller
> should be waiting for a bus-idle state before attempting the
> retransmission. You may well hit another arbitration loss after that,
> but it won't be from the same bus activity.
>
Yes, that is the correct behaviour and I think that is why
__i2c_transfer() return -EAGAIN when arbitration loss.
One example I could find in kernel tree is here [a], and, it seems not
to totally rely on the retry mechanism implemented in i2c core.
[a]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c#n157
Anyway, it's been great to discuss on this topic. To answer your
questions I did have to dig around and have learn a lot. :-)
My sincere thanks to you,
- Quan
prev parent reply other threads:[~2023-12-01 11:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 7:52 Quan Nguyen
2023-11-30 8:03 ` Jeremy Kerr
2023-11-30 8:39 ` Quan Nguyen
2023-11-30 9:40 ` Jeremy Kerr
2023-12-01 6:31 ` Quan Nguyen
2023-12-01 8:38 ` Jeremy Kerr
2023-12-01 11:47 ` Quan Nguyen [this message]
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=a1cd2239-d8b7-412e-bca6-ebcf3a19ed65@os.amperecomputing.com \
--to=quan@os.amperecomputing.com \
--cc=davem@davemloft.net \
--cc=dung@os.amperecomputing.com \
--cc=edumazet@google.com \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=pabeni@redhat.com \
--cc=patches@amperecomputing.com \
--cc=phong@os.amperecomputing.com \
--cc=thang@os.amperecomputing.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®