Thread (3 messages) flat view 3 messages, 2 authors, 2021-03-22

Re: [PATCH net-next] net: dsa: hellcreek: Report switch name and ID

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-03-20 14:23:20

+static int hellcreek_devlink_info_get(struct dsa_switch *ds,
+				      struct devlink_info_req *req,
+				      struct netlink_ext_ack *extack)
+{
+	struct hellcreek *hellcreek = ds->priv;
+	int ret;
+
+	ret = devlink_info_driver_name_put(req, "hellcreek");
+	if (ret)
+		return ret;
+
+	return devlink_info_version_fixed_put(req,
+					      DEVLINK_INFO_VERSION_GENERIC_ASIC_ID,
+					      hellcreek->pdata->name);
 static const struct hellcreek_platform_data de1soc_r1_pdata = {
+	.name		 = "Hellcreek r4c30",
Hi Kurt

The two other DSA drivers which implement this keep the
DEVLINK_INFO_VERSION_GENERIC_ASIC_ID just the model name, mv88e6390,
SJA1105E for example. You have hellcreek in the driver name, so i
don't see a need to repeat it.

      Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help