Re: [PATCH net-next 7/9] net: dsa: microchip: implement port_hsr_join for KSZ9477 only

From: Paolo Abeni

Date: Mon Jun 01 2026 - 05:10:22 EST


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.

/P