[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <024e01d8f13a$00b85ff0$02291fd0$@gmail.com>
Date: Sat, 5 Nov 2022 18:14:02 +0100
From: <piergiorgio.beruto@...il.com>
To: "'Vladimir Oltean'" <olteanv@...il.com>
Cc: <netdev@...r.kernel.org>
Subject: RE: Potential issue with PHYs connected to the same MDIO bus and different MACs
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@...il.com>
Sent: 5 November, 2022 17:38
To: piergiorgio.beruto@...il.com
Cc: netdev@...r.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@...il.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);
Powered by blists - more mailing lists