Skip to content

Commit 9b69e5e

Browse files
committed
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: David S. Miller <[email protected]>
2 parents bd0b68a + 5e29c16 commit 9b69e5e

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,22 +1700,11 @@ static int dpaa2_eth_open(struct net_device *net_dev)
17001700
goto enable_err;
17011701
}
17021702

1703-
if (!priv->mac) {
1704-
/* If the DPMAC object has already processed the link up
1705-
* interrupt, we have to learn the link state ourselves.
1706-
*/
1707-
err = dpaa2_eth_link_state_update(priv);
1708-
if (err < 0) {
1709-
netdev_err(net_dev, "Can't update link state\n");
1710-
goto link_state_err;
1711-
}
1712-
} else {
1703+
if (priv->mac)
17131704
phylink_start(priv->mac->phylink);
1714-
}
17151705

17161706
return 0;
17171707

1718-
link_state_err:
17191708
enable_err:
17201709
dpaa2_eth_disable_ch_napi(priv);
17211710
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
34653454
dev_err(dev, "dpni_set_rx_hash_dist failed\n");
34663455
break;
34673456
}
3457+
3458+
/* If the flow steering / hashing key is shared between all
3459+
* traffic classes, install it just once
3460+
*/
3461+
if (priv->dpni_attrs.options & DPNI_OPT_SHARED_FS)
3462+
break;
34683463
}
34693464

34703465
return err;
@@ -3491,6 +3486,12 @@ static int dpaa2_eth_config_cls_key(struct dpaa2_eth_priv *priv, dma_addr_t key)
34913486
dev_err(dev, "dpni_set_rx_fs_dist failed\n");
34923487
break;
34933488
}
3489+
3490+
/* If the flow steering / hashing key is shared between all
3491+
* traffic classes, install it just once
3492+
*/
3493+
if (priv->dpni_attrs.options & DPNI_OPT_SHARED_FS)
3494+
break;
34943495
}
34953496

34963497
return err;

drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ static int dpaa2_eth_do_cls_rule(struct net_device *net_dev,
618618
err = dpni_remove_fs_entry(priv->mc_io, 0,
619619
priv->mc_token, i,
620620
&rule_cfg);
621-
if (err)
621+
if (err || priv->dpni_attrs.options & DPNI_OPT_SHARED_FS)
622622
break;
623623
}
624624

drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
267267
return 0;
268268
}
269269

270-
if (!of_device_is_available(node) ||
271-
!of_device_is_available(node->parent)) {
270+
if (!of_device_is_available(node)) {
272271
netdev_err(mac->net_dev, "pcs-handle node not available\n");
273272
return -ENODEV;
274273
}

drivers/net/ethernet/freescale/dpaa2/dpni.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ struct fsl_mc_io;
7575
* Disables the flow steering table.
7676
*/
7777
#define DPNI_OPT_NO_FS 0x000020
78+
/**
79+
* Flow steering table is shared between all traffic classes
80+
*/
81+
#define DPNI_OPT_SHARED_FS 0x001000
7882

7983
int dpni_open(struct fsl_mc_io *mc_io,
8084
u32 cmd_flags,

0 commit comments

Comments
 (0)