public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Joyner <eric.joyner@amd.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Brett Creeley <brett.creeley@amd.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next 1/5] ionic: Small improvements in devcmd retry logic
Date: Tue, 5 May 2026 08:54:45 -0700	[thread overview]
Message-ID: <808743e2-dfce-4793-85b0-fdb771763ffa@amd.com> (raw)
In-Reply-To: <20260501163740.0f775e67@kernel.org>

On 5/1/2026 4:37 PM, Jakub Kicinski wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> On Thu, 30 Apr 2026 20:15:51 -0700 Eric Joyner wrote:
>> If the timeout time is hit when the last attempt returned EAGAIN, the
>> driver returns -ETIMEDOUT. This causes the -EAGAIN result to be lost.
>> Fix this by returning -EAGAIN if the timeout time is hit and the
>> previous result matches.
>>
>> Also, reduce the sleep between the write to done and doorbell
>> registers. The msleep(1000) was initially added in an arbitrary
>> manner. However, this long of a sleep is problematic because
>> it reduces the number of retries when -EAGAIN is returned, which
>> may result in the devmcd giving up early due to the timeout. Fix
>> this by reducing the sleep to msleep(50).
> 
> It would be useful to explain the significance of the return value
> to the callers. Are you trying to return EAGAIN to user space?
> Or some kernel-internal function catches this?

It looks like the -EAGAIN return value used here would have been used by
"[PATCH net 1/7] ionic: Allow the first devcmd to trigger deferred probe" [1];
this change got put in this series because we decided it was more of a net-next
change rather than a net change, but didn't realize these two were more
connected than what we saw at first glance.

1: https://lore.kernel.org/netdev/20260429210007.40015-2-eric.joyner@amd.com/

 - Eric

  reply	other threads:[~2026-05-05 15:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01  3:15 [PATCH net-next 0/5] Expose more port stats to ethtool Eric Joyner
2026-05-01  3:15 ` [PATCH net-next 1/5] ionic: Small improvements in devcmd retry logic Eric Joyner
2026-05-01 23:37   ` Jakub Kicinski
2026-05-05 15:54     ` Eric Joyner [this message]
2026-05-01  3:15 ` [PATCH net-next 2/5] ionic: Report "link_down_events_phy" in ethtool statistics Eric Joyner
2026-05-01 23:39   ` Jakub Kicinski
2026-05-01  3:15 ` [PATCH net-next 3/5] ionic: Update ionic_if.h with new extra port stats structure Eric Joyner
2026-05-01 23:40   ` Jakub Kicinski
2026-05-01  3:15 ` [PATCH net-next 4/5] ionic: Report rx_bits_phy stat to ethtool Eric Joyner
2026-05-01  3:15 ` [PATCH net-next 5/5] ionic: Add .get_fec_stats ethtool handler Eric Joyner
2026-05-01 23:41   ` Jakub Kicinski
2026-05-05 13:54   ` Vadim Fedorenko

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=808743e2-dfce-4793-85b0-fdb771763ffa@amd.com \
    --to=eric.joyner@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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