Thread (12 messages) 12 messages, 2 authors, 2025-03-10

Re: [PATCH net-next v2 5/7] net: ethtool: phy: Convert the PHY_GET command to generic phy dump

From: Kory Maincent <kory.maincent@bootlin.com>
Date: 2025-03-10 12:14:19
Also in: lkml, netdev

On Sat,  8 Mar 2025 16:54:37 +0100
Maxime Chevallier [off-list ref] wrote:
Now that we have an infrastructure in ethnl for perphy DUMPs, we can get
rid of the custom ->doit and ->dumpit to deal with PHY listing commands.

As most of the code was custom, this basically means re-writing how we
deal with PHY listing.
Only nitpick ;)
-static int
-ethnl_phy_fill_reply(const struct ethnl_req_info *req_base, struct sk_buff
*skb) +static int phy_prepare_data(const struct ethnl_req_info *req_info,
+			    struct ethnl_reply_data *reply_data,
+			    const struct genl_info *info)
 {
-	struct phy_req_info *req_info = PHY_REQINFO(req_base);
-	struct phy_device_node *pdn = req_info->pdn;
-	struct phy_device *phydev = pdn->phy;
-	enum phy_upstream ptype;
+	struct phy_reply_data *rep_data = PHY_REPDATA(reply_data);
+	struct phy_link_topology *topo = reply_data->dev->link_topo;
+	struct nlattr **tb = info->attrs;
+	struct phy_device_node *pdn;
+	struct phy_device *phydev;
  
Reverse xmas tree.
-	ptype = pdn->upstream_type;
+	/* RTNL is held by th caller */
Small typo here *the*.

The rest is good for me.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help