From 34cb995cde6136c75951b72be9867c2677f2a493 Mon Sep 17 00:00:00 2001 From: Sachin Saxena Date: Fri, 11 Jan 2019 12:24:04 +0000 Subject: [PATCH] bus/fslmc: fix to reset portal memory before use Uninitialized portal memory is causing unwanted issues. Fixes: 293c0ca94c36 ("bus/fslmc: support memory backed portals with QBMAN 5.0") Cc: stable@dpdk.org Signed-off-by: Sachin Saxena Acked-by: Shreyansh Jain --- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index ce06998426..4fc6efec57 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -369,6 +369,8 @@ dpaa2_create_dpio_device(int vdev_fd, dpio_dev->mc_portal = rte_mcp_ptr_list[MC_PORTAL_INDEX]; dpio_dev->dpio = malloc(sizeof(struct fsl_mc_io)); + memset(dpio_dev->dpio, 0, sizeof(struct fsl_mc_io)); + if (!dpio_dev->dpio) { DPAA2_BUS_ERR("Memory allocation failure"); goto err; -- 2.20.1