nfp: fill splittable of devlink_port_attrs correctly
stable inclusion from stable-v5.10.157 commit ce41e03cacaa1f15539785a381ef0a27cf6d25da category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ce41e03cacaa1f15539785a381ef0a27cf6d25da -------------------------------- [ Upstream commit 4abd9600 ] The error is reflected in that it shows wrong splittable status of port when executing "devlink port show". The reason which leads the error is that the assigned operation of splittable is just a simple negation operation of split and it does not consider port lanes quantity. A splittable port should have several lanes that can be split(lanes quantity > 1). If without the judgement, it will show wrong message for some firmware, such as 2x25G, 2x10G. Fixes: a0f49b54 ("devlink: Add a new devlink port split ability attribute and pass to netlink") Signed-off-by:Diana Wang <na.wang@corigine.com> Reviewed-by:
Louis Peens <louis.peens@corigine.com> Reviewed-by:
Niklas Söderlund <niklas.soderlund@corigine.com> Signed-off-by:
Simon Horman <simon.horman@corigine.com> Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment