netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	"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-renesas-soc@vger.kernel.org
Subject: Re: [net-next] net: ethernet: rtsn: Add support for Renesas Ethernet-TSN
Date: Tue, 7 May 2024 13:18:40 +0200	[thread overview]
Message-ID: <20240507111840.GK720810@ragnatech.se> (raw)
In-Reply-To: <2fc4d494-4ec0-48a8-988c-68f31c4f691e@lunn.ch>

HI Andrew and Geert,

On 2024-05-06 22:00:46 +0200, Andrew Lunn wrote:
> > Note that this driver differs a bit from RAVB for which [2] targets. The 
> > RAVB driver creates the MDIO bus at probe time, this drivers creates and 
> > destroys the MDIO bus in sync with the interface state using ndo_open 
> > and ndo_stop.
> 
> That is not a good idea. It is better to create the MDIO bus at probe
> time. There are a few reasons for this.
> 
> 1) It takes while for the machinary to load the PHY driver, when it is
> a module. If it does not get time to do that, you end up with the
> generic PHY driver, even though there is a specific PHY driver, which
> becomes usable a little later in time. But your network is dead
> because the generic PHY drive is not sufficient.
> 
> 2) It is possible that creating the MDIO bus fails with
> EPROBE_DEFER. If this happens at ndo_open(), there is nothing you can
> do about it, other than return the error to user space. If it happens
> during probe, the driver core will handle it, and try to probe the
> driver again sometime later.

Thanks to both of you for your feedback in this review. I now have a way 
forward for this work.

I will drop the C45 read/write functions in the RTSN driver and rework 
the it to register the MDIO bus at probe time. As Geert then suggest I 
will need to state a PHY specific compatible which will solve my initial 
issue.

After this is done I will look to see if the PHY driver can be extended 
with more identification numbers so it can be probed on C22. But this 
will be done separate from my effort to enable the RTSN device.

Thanks again for all your help.

-- 
Kind Regards,
Niklas Söderlund

  reply	other threads:[~2024-05-07 11:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14 13:59 [net-next] net: ethernet: rtsn: Add support for Renesas Ethernet-TSN Niklas Söderlund
2024-04-15  7:34 ` Paul Barker
2024-04-16  8:36   ` Niklas Söderlund
2024-04-15 22:55 ` Andrew Lunn
2024-04-16  8:58   ` Niklas Söderlund
2024-04-16 13:05     ` Andrew Lunn
2024-04-19  8:16       ` Geert Uytterhoeven
2024-04-19 12:56         ` Andrew Lunn
2024-05-03 10:20   ` Niklas Söderlund
2024-05-03 11:59     ` Andrew Lunn
2024-05-03 13:30       ` Niklas Söderlund
2024-05-06  1:51         ` Andrew Lunn
2024-05-06 14:05           ` Niklas Söderlund
2024-05-06 17:43             ` Geert Uytterhoeven
2024-05-06 18:26               ` Niklas Söderlund
2024-05-06 20:00                 ` Andrew Lunn
2024-05-07 11:18                   ` Niklas Söderlund [this message]
2024-05-06 19:53             ` Andrew Lunn
2024-05-07 11:14               ` Niklas Söderlund
2024-04-18 18:32 ` Simon Horman
2024-04-18 19:03   ` Arnd Bergmann
2024-05-03  8:50     ` Niklas Söderlund
2024-04-18 18:35 ` Simon Horman

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=20240507111840.GK720810@ragnatech.se \
    --to=niklas.soderlund+renesas@ragnatech.se \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geert@linux-m68k.org \
    --cc=kuba@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).