Netdev List
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Marcin Wojtas <mw@semihalf.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: mvpp2: Defer probe if MAC address source is not yet ready
Date: Thu, 9 Mar 2023 11:29:24 +0100	[thread overview]
Message-ID: <20230309112924.2087e345@xps-13> (raw)
In-Reply-To: <5432f8f2da54d0ffc4e4e28fb88ac14f5bb682de.camel@redhat.com>

Hi Paolo,

pabeni@redhat.com wrote on Thu, 09 Mar 2023 11:12:18 +0100:

> On Tue, 2023-03-07 at 20:29 +0100, Miquel Raynal wrote:
> > NVMEM layouts are no longer registered early, and thus may not yet be
> > available when Ethernet drivers (or any other consumer) probe, leading
> > to possible probe deferrals errors. Forward the error code if this
> > happens. All other errors being discarded, the driver will eventually
> > use a random MAC address if no other source was considered valid (no
> > functional change on this regard).
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>  
> 
> The patch LGTM, but if feels like a fix more than a new feature re-
> factor. Any special reason to target the net-next tree?

That's a good question, right now nvmem support can only be built-in,
there is no EPROBE_DEFER situation that can arise when reading from an
nvmem device. The introduction of nvmem layouts has been reported due
to their lack of "modularization". Support is being upstreamed right
now in the nvmem tree and this brings two subtleties in one: nvmem cell
reads can now return -EPROBE_DEFER when coming from layouts because 
they are no longer populated very early in the boot process.

Hence IMHO this patch does not "fix" anything as there is currently
nothing broken in 6.3. But as layouts and modules get in the Linux
kernel (6.4-final), users of these layouts (like this driver) should
also handle this new case. Having this patch be merged into linux-next
after the introduction of the nvmem changes has almost no impact. It
just slightly delays the moment in time when MAC addresses can be
retrieved from specific nvmem layouts.

IOW, I believe targeting the net-next tree is fine, but feel free to
take it into net if you prefer.

Thanks,
Miquèl

  reply	other threads:[~2023-03-09 10:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 19:29 [PATCH net-next] net: mvpp2: Defer probe if MAC address source is not yet ready Miquel Raynal
2023-03-08  0:48 ` Marcin Wojtas
2023-03-09 10:12 ` Paolo Abeni
2023-03-09 10:29   ` Miquel Raynal [this message]
2023-03-11  0:30 ` patchwork-bot+netdevbpf

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=20230309112924.2087e345@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mw@semihalf.com \
    --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