netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <piergiorgio.beruto@gmail.com>
To: "'Vladimir Oltean'" <olteanv@gmail.com>
Cc: <netdev@vger.kernel.org>
Subject: RE: Potential issue with PHYs connected to the same MDIO bus and different MACs
Date: Sat, 5 Nov 2022 18:14:02 +0100	[thread overview]
Message-ID: <024e01d8f13a$00b85ff0$02291fd0$@gmail.com> (raw)
In-Reply-To: <20221105163751.it2mxwobzhqwtyr4@skbuf>

Oh, my!
Yes, this is so obvious but I could not see it...!
I really thank you for your time, and I apologize for overlooking this.

Kind Regards,
Piergiorgio

-----Original Message-----
From: Vladimir Oltean <olteanv@gmail.com> 
Sent: 5 November, 2022 17:38
To: piergiorgio.beruto@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: Potential issue with PHYs connected to the same MDIO bus and
different MACs

On Sat, Nov 05, 2022 at 03:39:07PM +0100, piergiorgio.beruto@gmail.com
wrote:
>    priv->phylink_config.dev = &pdev->dev;
>    priv->phylink_config.type = PHYLINK_NETDEV;

The problem is here. You think that &pdev->dev is the same as &ndev->dev,
but it isn't (and it's SET_NETDEV_DEV that makes the linkage between the 2).
Use &ndev->dev here, and check out how phylink uses the "dev" field:

#define to_net_dev(d) container_of(d, struct net_device, dev)

	if (config->type == PHYLINK_NETDEV) {
		pl->netdev = to_net_dev(config->dev);


  reply	other threads:[~2022-11-05 17:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05 12:23 Potential issue with PHYs connected to the same MDIO bus and different MACs piergiorgio.beruto
2022-11-05 13:34 ` Vladimir Oltean
2022-11-05 14:39   ` piergiorgio.beruto
2022-11-05 14:42     ` piergiorgio.beruto
2022-11-05 16:37     ` Vladimir Oltean
2022-11-05 17:14       ` piergiorgio.beruto [this message]
2022-11-05 15:34   ` piergiorgio.beruto

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='024e01d8f13a$00b85ff0$02291fd0$@gmail.com' \
    --to=piergiorgio.beruto@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@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;
as well as URLs for NNTP newsgroup(s).