netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jim Liu <jim.t90615@gmail.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
	JJLIU0@nuvoton.com, andrew@lunn.ch, hkallweit1@gmail.com,
	kuba@kernel.org, edumazet@google.com, pabeni@redhat.com,
	netdev@vger.kernel.org,
	giulio.benetti+tekvox@benettiengineering.com,
	bcm-kernel-feedback-list@broadcom.com,
	linux-kernel@vger.kernel.org
Subject: Re: [v2,net] net: phy: broadcom: Correct BCM5221 PHY model detection failure
Date: Mon, 24 Mar 2025 16:57:22 +0000	[thread overview]
Message-ID: <Z-GO8iFP7TRPPdql@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAKUZ0+GV1J0VxU8Eycv2eCNs2yKvJ9YTob27n+G4Jy-TJhhLZQ@mail.gmail.com>

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!

  reply	other threads:[~2025-03-24 16:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17  6:34 [v2,net] net: phy: broadcom: Correct BCM5221 PHY model detection failure Jim Liu
2025-03-17 10:24 ` Russell King (Oracle)
2025-03-17 13:18   ` Florian Fainelli
2025-03-17 13:29     ` Russell King (Oracle)
2025-03-18  3:15       ` Jim Liu
2025-03-24 16:57         ` Russell King (Oracle) [this message]
2025-03-24 16:48 ` Jakub Kicinski

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=Z-GO8iFP7TRPPdql@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=JJLIU0@nuvoton.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=giulio.benetti+tekvox@benettiengineering.com \
    --cc=hkallweit1@gmail.com \
    --cc=jim.t90615@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).