summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
diff options
context:
space:
mode:
authorDanielle Ratson <danieller@mellanox.com>2020-07-09 16:18:21 +0300
committerDavid S. Miller <davem@davemloft.net>2020-07-09 13:15:30 -0700
commit82901ad16905832b7a79ff4316302bb59ec4b4ba (patch)
tree6a5f0e1ec66bd2232ec6827f59faaaedd211cb89 /drivers/net/ethernet/netronome/nfp/nfp_devlink.c
parenta0f49b54865273c895be3826d6d59cbc5ad725c2 (diff)
downloadlinux-stable-82901ad16905832b7a79ff4316302bb59ec4b4ba.tar.gz
linux-stable-82901ad16905832b7a79ff4316302bb59ec4b4ba.tar.bz2
linux-stable-82901ad16905832b7a79ff4316302bb59ec4b4ba.zip
devlink: Move input checks from driver to devlink
Currently, all the input checks are done in driver. After adding the split capability to devlink port, move the checks to devlink. Signed-off-by: Danielle Ratson <danieller@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_devlink.c')
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_devlink.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
index b6a10565309a..be52510d446b 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
@@ -70,9 +70,6 @@ nfp_devlink_port_split(struct devlink *devlink, unsigned int port_index,
unsigned int lanes;
int ret;
- if (count < 2)
- return -EINVAL;
-
mutex_lock(&pf->lock);
rtnl_lock();
@@ -81,7 +78,7 @@ nfp_devlink_port_split(struct devlink *devlink, unsigned int port_index,
if (ret)
goto out;
- if (eth_port.is_split || eth_port.port_lanes % count) {
+ if (eth_port.port_lanes % count) {
ret = -EINVAL;
goto out;
}