From: Tomasz Duszynski Date: Mon, 26 Jul 2021 13:58:10 +0000 (-0500) Subject: common/cnxk: return saner error codes X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b816b6f44851102963e792ecbbe54fa6f12fd49c;p=dpdk.git common/cnxk: return saner error codes If particular LMAC does not exist then it's saner to return ENODEV instead of EINVAL. Signed-off-by: Tomasz Duszynski Acked-by: Jerin Jacob --- diff --git a/drivers/common/cnxk/roc_bphy_cgx.c b/drivers/common/cnxk/roc_bphy_cgx.c index 9e53fe238e..7449cbe77a 100644 --- a/drivers/common/cnxk/roc_bphy_cgx.c +++ b/drivers/common/cnxk/roc_bphy_cgx.c @@ -406,7 +406,7 @@ roc_bphy_cgx_fec_set(struct roc_bphy_cgx *roc_cgx, unsigned int lmac, return -EINVAL; if (!roc_bphy_cgx_lmac_exists(roc_cgx, lmac)) - return -EINVAL; + return -ENODEV; scr1 = FIELD_PREP(SCR1_ETH_CMD_ID, ETH_CMD_SET_FEC) | FIELD_PREP(SCR1_ETH_SET_FEC_ARGS, fec); @@ -425,7 +425,7 @@ roc_bphy_cgx_fec_supported_get(struct roc_bphy_cgx *roc_cgx, unsigned int lmac, return -EINVAL; if (!roc_bphy_cgx_lmac_exists(roc_cgx, lmac)) - return -EINVAL; + return -ENODEV; scr1 = FIELD_PREP(SCR1_ETH_CMD_ID, ETH_CMD_GET_SUPPORTED_FEC);