[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z-GO8iFP7TRPPdql@shell.armlinux.org.uk>
Date: Mon, 24 Mar 2025 16:57:22 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Jim Liu <jim.t90615@...il.com>
Cc: Florian Fainelli <florian.fainelli@...adcom.com>, JJLIU0@...oton.com,
andrew@...n.ch, hkallweit1@...il.com, kuba@...nel.org,
edumazet@...gle.com, pabeni@...hat.com, netdev@...r.kernel.org,
giulio.benetti+tekvox@...ettiengineering.com,
bcm-kernel-feedback-list@...adcom.com, linux-kernel@...r.kernel.org
Subject: Re: [v2,net] net: phy: broadcom: Correct BCM5221 PHY model detection
failure
On Tue, Mar 18, 2025 at 11:15:09AM +0800, Jim Liu wrote:
> Maybe i can add this modify in patch
>
> #define BRCM_PHY_MODEL(phydev) \
> - ((phydev)->drv->phy_id & (phydev)->drv->phy_id_mask)
> + ((phydev)->phy_id & (phydev)->drv->phy_id_mask)
I would suggest that this becomes merely:
#define BRCM_PHY_MODEL(phydev) ((phydev))->drv->phy_id)
because the constants that are being used to check against this are the
constants used to initialise that member.
Or even get rid of BRCM_PHY_MODEL() altogether, thus the tests become
(e.g.):
/* Unmask events we are interested in and mask interrupts globally. */
- if (phydev->phy_id == PHY_ID_BCM5221)
+ if (phydev->drv->phy_id == PHY_ID_BCM5221)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists