Re: [PATCH net-next v7 4/9] net: dsa: lan9645x: add basic dsa driver for LAN9645X
From: Andrew Lunn
Date: Mon Jun 08 2026 - 14:15:38 EST
> + dsa_switch_for_each_user_port(dp, ds) {
> + if (dp->cpu_dp->ds != ds) {
> + dev_err(ds->dev,
> + "NPI port on a remote switch is not supported\n");
> + return -EINVAL;
> + }
> +
> + if (first_cpu_dp && dp->cpu_dp != first_cpu_dp) {
> + dev_err(ds->dev, "Multiple NPI ports not supported\n");
> + return -EINVAL;
> + }
> +
> + first_cpu_dp = dp->cpu_dp;
The reason i asked about NPI ports is because this is looping over
user ports. Yet you say one of these user ports is a CPU port. That
cannot be correct.
The first port returned by dsa_tree_for_each_cpu_port() would be
first_cpu_dp.
Andrew