Re: [PATCH net-next 7/9] net: dsa: microchip: implement port_hsr_join for KSZ9477 only
From: Bastien Curutchet
Date: Tue Jun 02 2026 - 08:35:50 EST
Hi Paolo,
On 6/1/26 11:03 AM, Paolo Abeni wrote:
On 5/26/26 11:47 AM, Bastien Curutchet (Schneider Electric) wrote:
@@ -1744,12 +1784,20 @@ void ksz9477_hsr_join(struct dsa_switch *ds, int port, struct net_device *hsr)
/* Setup HW supported features for lan HSR ports */
user = dsa_to_port(ds, port)->user;
user->features |= KSZ9477_SUPPORTED_HSR_FEATURES;
+
+ dev->hsr_dev = hsr;
+ dev->hsr_ports |= BIT(port);
+
+ return 0;
}
-void ksz9477_hsr_leave(struct dsa_switch *ds, int port, struct net_device *hsr)
+static int ksz9477_hsr_leave(struct dsa_switch *ds, int port,
+ struct net_device *hsr)
{
struct ksz_device *dev = ds->priv;
+ WARN_ON(dev->chip_id != KSZ9477_CHIP_ID);
Since the new op is used only by the relevant switch version, I think
you could/should remove the above warning.
Ack, will do.
Best regards,
Bastien