netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jianhui Zhao <zhaojh329@gmail.com>
To: zhaojh329@gmail.com
Cc: andrew@lunn.ch, davem@davemloft.net, edumazet@google.com,
	hkallweit1@gmail.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, linux@armlinux.org.uk,
	netdev@vger.kernel.org, pabeni@redhat.com
Subject: [PATCH] net: phy: Add sysfs attribute for PHY c45 identifiers.
Date: Mon, 12 Jun 2023 22:04:26 +0800	[thread overview]
Message-ID: <20230612140426.1648-1-zhaojh329@gmail.com> (raw)
In-Reply-To: <20230611152743.2158-1-zhaojh329@gmail.com>

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 17d0d0555a79..81a4bc043ee2 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -541,8 +541,10 @@ static int phy_bus_match(struct device *dev, struct device_driver *drv)
 
 			if ((phydrv->phy_id & phydrv->phy_id_mask) ==
 			    (phydev->c45_ids.device_ids[i] &
-			     phydrv->phy_id_mask))
+			     phydrv->phy_id_mask)) {
+				phydev->phy_id = phydev->c45_ids.device_ids[i];
 				return 1;
+			}
 		}
 		return 0;
 	} else {

How about modifying it like this?

  parent reply	other threads:[~2023-06-12 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-11 15:27 [PATCH] net: phy: Add sysfs attribute for PHY c45 identifiers Jianhui Zhao
2023-06-11 15:40 ` Andrew Lunn
2023-06-12 14:04 ` Jianhui Zhao [this message]
2023-06-12 14:10   ` Andrew Lunn
2023-06-12 15:06   ` Russell King (Oracle)
2023-06-12 15:10     ` Russell King (Oracle)

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=20230612140426.1648-1-zhaojh329@gmail.com \
    --to=zhaojh329@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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).