diff mbox series

[v2,02/16] bus/dpaa: fix svr id fetch location

Message ID 1530697431-1244-2-git-send-email-hemant.agrawal@nxp.com
State Superseded
Headers show
Series [v2,01/16] bus/dpaa: fix phandle support for kernel 4.16 | expand

Commit Message

Hemant Agrawal July 4, 2018, 9:43 a.m. UTC
Otherwise the SVR may not be avilable for dpaa init.

Fixes: 3b59b73dea08 ("bus/dpaa: update platform SoC value register routines")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 drivers/bus/dpaa/dpaa_bus.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

-- 
2.7.4

Comments

Shreyansh Jain July 6, 2018, 4:44 a.m. UTC | #1
On Wednesday 04 July 2018 03:13 PM, Hemant Agrawal wrote:
> Otherwise the SVR may not be avilable for dpaa init.

> 

> Fixes: 3b59b73dea08 ("bus/dpaa: update platform SoC value register routines")

> Cc: stable@dpdk.org

> 

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> ---


Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
diff mbox series

Patch

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 2046206..7956bd0 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -539,6 +539,13 @@  rte_dpaa_bus_probe(void)
 	unsigned int svr_ver;
 	int probe_all = rte_dpaa_bus.bus.conf.scan_mode != RTE_BUS_SCAN_WHITELIST;
 
+	svr_file = fopen(DPAA_SOC_ID_FILE, "r");
+	if (svr_file) {
+		if (fscanf(svr_file, "svr:%x", &svr_ver) > 0)
+			dpaa_svr_family = svr_ver & SVR_MASK;
+		fclose(svr_file);
+	}
+
 	/* For each registered driver, and device, call the driver->probe */
 	TAILQ_FOREACH(dev, &rte_dpaa_bus.device_list, next) {
 		TAILQ_FOREACH(drv, &rte_dpaa_bus.driver_list, next) {
@@ -569,13 +576,6 @@  rte_dpaa_bus_probe(void)
 	if (!TAILQ_EMPTY(&rte_dpaa_bus.device_list))
 		rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
 
-	svr_file = fopen(DPAA_SOC_ID_FILE, "r");
-	if (svr_file) {
-		if (fscanf(svr_file, "svr:%x", &svr_ver) > 0)
-			dpaa_svr_family = svr_ver & SVR_MASK;
-		fclose(svr_file);
-	}
-
 	return 0;
 }