[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210827153331.njhcrsvnjsgyvyjv@skbuf>
Date: Fri, 27 Aug 2021 15:33:32 +0000
From: Vladimir Oltean <vladimir.oltean@....com>
To: Marek BehĂșn <kabel@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Russell King <linux@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH net] net: phy: marvell10g: fix broken PHY interrupts for
anyone after us in the driver probe list
On Fri, Aug 27, 2021 at 03:32:29AM +0200, Marek BehĂșn wrote:
> > Fixes: a5de4be0aaaa ("net: phy: marvell10g: fix differentiation of 88X3310 from 88X3340")
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> > ---
> > drivers/net/phy/marvell10g.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
> > index 53a433442803..7bf35b24fd14 100644
> > --- a/drivers/net/phy/marvell10g.c
> > +++ b/drivers/net/phy/marvell10g.c
> > @@ -987,11 +987,17 @@ static int mv3310_get_number_of_ports(struct phy_device *phydev)
> >
> > static int mv3310_match_phy_device(struct phy_device *phydev)
> > {
> > + if ((phydev->phy_id & MARVELL_PHY_ID_MASK) != MARVELL_PHY_ID_88X3310)
> > + return 0;
> > +
> > return mv3310_get_number_of_ports(phydev) == 1;
> > }
> >
> > static int mv3340_match_phy_device(struct phy_device *phydev)
> > {
> > + if ((phydev->phy_id & MARVELL_PHY_ID_MASK) != MARVELL_PHY_ID_88X3310)
> > + return 0;
> > +
> > return mv3310_get_number_of_ports(phydev) == 4;
> > }
> >
>
> I fear these checks won't work, since this is a C45 PHY.
>
> You need to check phydev->c45_ids.device_ids[1], instead of
> phydev->phy_id.
>
> And even them I am not entirely sure. I will try to test it tomorrow.
>
> Marek
Thanks for testing and resending. Last night I was trying to do
something completely different, and it looks like I concentrated all my
attention on the problem and none on the solution here.
Powered by blists - more mailing lists