summaryrefslogtreecommitdiff
path: root/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
diff options
context:
space:
mode:
authorXie Xiaobo <xiaobo.xie@nxp.com>2017-12-12 08:23:55 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-12-12 08:23:55 (GMT)
commit708b8b8eb67124716c8579a9e259742b040d4dd3 (patch)
treeafc209d3f63c3d79e91a98c8f3ba01465977b574 /drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
parentc0246a9ec4d461ef4dd7647f94005380bb9e7f0b (diff)
parent5fe8cfe356d2dbf6f9d7e213614d6be9ad0ac592 (diff)
downloadlinux-708b8b8eb67124716c8579a9e259742b040d4dd3.tar.xz
Merge branch 'linux-4.9-nxp' into linux-4.9 on Dec. 8, 2017
Signed-off-by: Xiaobo Xie <xiaobo.xie@nxp.com>
Diffstat (limited to 'drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c')
-rw-r--r--drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
index 9859814..304a21c 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
@@ -230,7 +230,8 @@ static int dpaa2_eth_set_pauseparam(struct net_device *net_dev,
if (current_tx_pause == pause->tx_pause)
goto out;
- err = setup_fqs_taildrop(priv, !pause->tx_pause);
+ priv->tx_pause_frames = pause->tx_pause;
+ err = set_rx_taildrop(priv);
if (err)
netdev_dbg(net_dev, "ERROR %d configuring taildrop", err);
@@ -676,7 +677,7 @@ static int do_cls(struct net_device *net_dev,
struct dpni_rule_cfg rule_cfg;
struct dpni_fs_action_cfg fs_act = { 0 };
void *dma_mem;
- int err = 0;
+ int err = 0, tc;
if (!dpaa2_eth_fs_enabled(priv)) {
netdev_err(net_dev, "dev does not support steering!\n");
@@ -719,12 +720,19 @@ static int do_cls(struct net_device *net_dev,
else
fs_act.flow_id = fs->ring_cookie;
- if (add)
- err = dpni_add_fs_entry(priv->mc_io, 0, priv->mc_token,
- 0, fs->location, &rule_cfg, &fs_act);
- else
- err = dpni_remove_fs_entry(priv->mc_io, 0, priv->mc_token,
- 0, &rule_cfg);
+ for (tc = 0; tc < dpaa2_eth_tc_count(priv); tc++) {
+ if (add)
+ err = dpni_add_fs_entry(priv->mc_io, 0, priv->mc_token,
+ tc, fs->location, &rule_cfg,
+ &fs_act);
+ else
+ err = dpni_remove_fs_entry(priv->mc_io, 0,
+ priv->mc_token, tc,
+ &rule_cfg);
+
+ if (err)
+ break;
+ }
dma_unmap_single(dev, rule_cfg.key_iova,
rule_cfg.key_size * 2, DMA_TO_DEVICE);