From aecb4351311a74801ee9be98798d544b1548b5a8 Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Wed, 14 Mar 2018 13:25:58 +0530 Subject: [PATCH] bus/dpaa: fix big endian build The array pointers were used without index. Fixes: b9083ea5e084 ("net/dpaa: further push mode optimizations") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal Acked-by: Shreyansh Jain --- drivers/bus/dpaa/base/qbman/qman.c | 5 +++-- drivers/bus/dpaa/base/qbman/qman_driver.c | 5 +---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 2b97671bf5..2810fdd266 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -1087,7 +1087,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, shadow[rx_number]->fd.opaque = be32_to_cpu(dq[rx_number]->fd.opaque); #else - shadow = dq; + shadow[rx_number] = dq[rx_number]; #endif /* SDQCR: context_b points to the FQ */ @@ -1095,7 +1095,8 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, fq[rx_number] = qman_fq_lookup_table[be32_to_cpu( dq[rx_number]->contextB)]; #else - fq[rx_number] = (void *)(uintptr_t)be32_to_cpu(dq->contextB); + fq[rx_number] = (void *)be32_to_cpu( + dq[rx_number]->contextB); #endif fq[rx_number]->cb.dqrr_prepare(shadow[rx_number], &bufs[rx_number]); diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c index 7cfa8ee44e..66838d25f3 100644 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c @@ -246,7 +246,6 @@ int fsl_qman_portal_destroy(struct qman_portal *qp) int qman_global_init(void) { const struct device_node *dt_node; - int ret = 0; size_t lenp; const u32 *chanid; static int ccsr_map_fd; @@ -352,9 +351,7 @@ int qman_global_init(void) qman_clk = be32_to_cpu(*clk); #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - ret = qman_setup_fq_lookup_table(CONFIG_FSL_QMAN_FQ_LOOKUP_MAX); - if (ret) - return ret; + return qman_setup_fq_lookup_table(CONFIG_FSL_QMAN_FQ_LOOKUP_MAX); #endif return 0; } -- 2.20.1