Commit 9b69e5eb authored by David S. Miller's avatar David S. Miller

Merge branch 'dpaa2-eth-small-updates'

Ioana Ciornei says:

====================
dpaa2-eth: small updates

This patch set is just a collection of small updates to the dpaa2-eth
driver.

First, we only need to check the availability of the DTS child node, not
both child and parent node. Then remove a call to
dpaa2_eth_link_state_update() which is now just a leftover and it's not
useful in how are things working now in the PHY integration. Lastly,
modify how the driver is behaving when the the flow steering table is
used between all the traffic classes.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents bd0b68a8 5e29c16f
......@@ -1700,22 +1700,11 @@ static int dpaa2_eth_open(struct net_device *net_dev)
goto enable_err;
}
if (!priv->mac) {
/* If the DPMAC object has already processed the link up
* interrupt, we have to learn the link state ourselves.
*/
err = dpaa2_eth_link_state_update(priv);
if (err < 0) {
netdev_err(net_dev, "Can't update link state\n");
goto link_state_err;
}
} else {
if (priv->mac)
phylink_start(priv->mac->phylink);
}
return 0;
link_state_err:
enable_err:
dpaa2_eth_disable_ch_napi(priv);
dpaa2_eth_drain_pool(priv);
......@@ -3465,6 +3454,12 @@ static int dpaa2_eth_config_hash_key(struct dpaa2_eth_priv *priv, dma_addr_t key
dev_err(dev, "dpni_set_rx_hash_dist failed\n");
break;
}
/* If the flow steering / hashing key is shared between all
* traffic classes, install it just once
*/
if (priv->dpni_attrs.options & DPNI_OPT_SHARED_FS)
break;
}
return err;
......@@ -3491,6 +3486,12 @@ static int dpaa2_eth_config_cls_key(struct dpaa2_eth_priv *priv, dma_addr_t key)
dev_err(dev, "dpni_set_rx_fs_dist failed\n");
break;
}
/* If the flow steering / hashing key is shared between all
* traffic classes, install it just once
*/
if (priv->dpni_attrs.options & DPNI_OPT_SHARED_FS)
break;
}
return err;
......
......@@ -618,7 +618,7 @@ static int dpaa2_eth_do_cls_rule(struct net_device *net_dev,
err = dpni_remove_fs_entry(priv->mc_io, 0,
priv->mc_token, i,
&rule_cfg);
if (err)
if (err || priv->dpni_attrs.options & DPNI_OPT_SHARED_FS)
break;
}
......
......@@ -267,8 +267,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
return 0;
}
if (!of_device_is_available(node) ||
!of_device_is_available(node->parent)) {
if (!of_device_is_available(node)) {
netdev_err(mac->net_dev, "pcs-handle node not available\n");
return -ENODEV;
}
......
......@@ -75,6 +75,10 @@ struct fsl_mc_io;
* Disables the flow steering table.
*/
#define DPNI_OPT_NO_FS 0x000020
/**
* Flow steering table is shared between all traffic classes
*/
#define DPNI_OPT_SHARED_FS 0x001000
int dpni_open(struct fsl_mc_io *mc_io,
u32 cmd_flags,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment