lkml.org 
[lkml]   [2023]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/4] net: dsa: hsr: Provide generic HSR ksz_hsr_{join|leave} functions
> +static int ksz_hsr_join(struct dsa_switch *ds, int port, struct net_device *hsr)
> +{
> + struct dsa_port *partner = NULL, *dp;
> + struct ksz_device *dev = ds->priv;
> + enum hsr_version ver;
> + int ret;
> +
> + ret = hsr_get_version(hsr, &ver);
> + if (ret)
> + return ret;
> +
> + switch (dev->chip_id) {
> + case KSZ9477_CHIP_ID:
> + if (ver == PRP_V1)
> + return -EOPNOTSUPP;

This should probably check for versions which are support, and not
assume PRP_V42 is not added some time in the future, which would be
accepted here.

Andrew

\
 
 \ /
  Last update: 2023-09-03 19:23    [W:0.089 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site