summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorIoana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>2019-04-16 19:13:28 +0200
committerDavid S. Miller <davem@davemloft.net>2019-04-17 06:46:19 +0200
commitdf8e249be866e2f762be11b14a9e7a94752614d4 (patch)
tree269e80045f07855ac8d2eaa4784df9c930dc510f /drivers/net/ethernet
parentnfp: flower: fix implicit fallthrough warning (diff)
downloadlinux-df8e249be866e2f762be11b14a9e7a94752614d4.tar.xz
linux-df8e249be866e2f762be11b14a9e7a94752614d4.zip
dpaa2-eth: Fix Rx classification status
Set the Rx flow classification enable flag only if key config operation is successful. Fixes 3f9b5c9 ("dpaa2-eth: Configure Rx flow classification key") Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index 2055c97dc22b..1cbef6ced4fb 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -2802,6 +2802,7 @@ int dpaa2_eth_set_hash(struct net_device *net_dev, u64 flags)
static int dpaa2_eth_set_cls(struct dpaa2_eth_priv *priv)
{
struct device *dev = priv->net_dev->dev.parent;
+ int err;
/* Check if we actually support Rx flow classification */
if (dpaa2_eth_has_legacy_dist(priv)) {
@@ -2820,9 +2821,13 @@ static int dpaa2_eth_set_cls(struct dpaa2_eth_priv *priv)
return -EOPNOTSUPP;
}
+ err = dpaa2_eth_set_dist_key(priv->net_dev, DPAA2_ETH_RX_DIST_CLS, 0);
+ if (err)
+ return err;
+
priv->rx_cls_enabled = 1;
- return dpaa2_eth_set_dist_key(priv->net_dev, DPAA2_ETH_RX_DIST_CLS, 0);
+ return 0;
}
/* Bind the DPNI to its needed objects and resources: buffer pool, DPIOs,