Commit f5c3fffa authored by Ioana Ciornei's avatar Ioana Ciornei Committed by David S. Miller

dpaa2-eth: update the TX frame queues on DPNI_IRQ_EVENT_ENDPOINT_CHANGED

Currently the function is called at every link up event, although the
FQID values will only change when the DPNI is disconnected from the
current object and reconnected to a different one.

The patch also avoids the forward declaration of update_tx_fqids.
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ac210d1
...@@ -1255,8 +1255,6 @@ static void dpaa2_eth_set_rx_taildrop(struct dpaa2_eth_priv *priv, bool enable) ...@@ -1255,8 +1255,6 @@ static void dpaa2_eth_set_rx_taildrop(struct dpaa2_eth_priv *priv, bool enable)
priv->rx_td_enabled = enable; priv->rx_td_enabled = enable;
} }
static void update_tx_fqids(struct dpaa2_eth_priv *priv);
static int link_state_update(struct dpaa2_eth_priv *priv) static int link_state_update(struct dpaa2_eth_priv *priv)
{ {
struct dpni_link_state state = {0}; struct dpni_link_state state = {0};
...@@ -1283,7 +1281,6 @@ static int link_state_update(struct dpaa2_eth_priv *priv) ...@@ -1283,7 +1281,6 @@ static int link_state_update(struct dpaa2_eth_priv *priv)
goto out; goto out;
if (state.up) { if (state.up) {
update_tx_fqids(priv);
netif_carrier_on(priv->net_dev); netif_carrier_on(priv->net_dev);
netif_tx_start_all_queues(priv->net_dev); netif_tx_start_all_queues(priv->net_dev);
} else { } else {
...@@ -3363,8 +3360,10 @@ static irqreturn_t dpni_irq0_handler_thread(int irq_num, void *arg) ...@@ -3363,8 +3360,10 @@ static irqreturn_t dpni_irq0_handler_thread(int irq_num, void *arg)
if (status & DPNI_IRQ_EVENT_LINK_CHANGED) if (status & DPNI_IRQ_EVENT_LINK_CHANGED)
link_state_update(netdev_priv(net_dev)); link_state_update(netdev_priv(net_dev));
if (status & DPNI_IRQ_EVENT_ENDPOINT_CHANGED) if (status & DPNI_IRQ_EVENT_ENDPOINT_CHANGED) {
set_mac_addr(netdev_priv(net_dev)); set_mac_addr(netdev_priv(net_dev));
update_tx_fqids(priv);
}
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
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