From: Hemant Agrawal Date: Thu, 22 Jun 2017 13:57:11 +0000 (+0530) Subject: net/dpaa2: check SoC version for stashing enable X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=30db823e0484e431c5b8eb9b9569d84a4c8cc1be;p=dpdk.git net/dpaa2: check SoC version for stashing enable Instead of qbman version, check the SoC version for stashing enablement decision. Signed-off-by: Hemant Agrawal --- diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 48e0997299..767eb9bd2b 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -361,6 +361,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, { struct dpaa2_dev_priv *priv = dev->data->dev_private; struct fsl_mc_io *dpni = (struct fsl_mc_io *)priv->hw; + struct mc_soc_version mc_plat_info = {0}; struct dpaa2_queue *dpaa2_q; struct dpni_queue cfg; uint8_t options = 0; @@ -391,7 +392,11 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, cfg.user_context = (uint64_t)(dpaa2_q); /*if ls2088 or rev2 device, enable the stashing */ - if ((qbman_get_version() & 0xFFFF0000) > QMAN_REV_4000) { + + if (mc_get_soc_version(dpni, CMD_PRI_LOW, &mc_plat_info)) + PMD_INIT_LOG(ERR, "\tmc_get_soc_version failed\n"); + + if ((mc_plat_info.svr & 0xffff0000) != SVR_LS2080A) { options |= DPNI_QUEUE_OPT_FLC; cfg.flc.stash_control = true; cfg.flc.value &= 0xFFFFFFFFFFFFFFC0;