net/dpaa2: check SoC version for stashing enable
authorHemant Agrawal <hemant.agrawal@nxp.com>
Thu, 22 Jun 2017 13:57:11 +0000 (19:27 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jul 2017 13:00:56 +0000 (15:00 +0200)
Instead of qbman version, check the SoC version for stashing
enablement decision.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/net/dpaa2/dpaa2_ethdev.c

index 48e0997..767eb9b 100644 (file)
@@ -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;