]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: ldpaa_eth: fix the memory layout of the dpmac_get_counters() API
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 23 May 2023 13:47:43 +0000 (16:47 +0300)
committerPeng Fan <peng.fan@nxp.com>
Wed, 14 Jun 2023 10:40:16 +0000 (18:40 +0800)
Each MC commands has a specific predefined memory layout that gets
interpreted by the firmware. The dpmac_get_counters() API memory layout
is wrong, thus the results returned by the command are incorrect.

Fix this by updating the offset of the counter field.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
include/fsl-mc/fsl_dpmac.h

index 1cea123a316498b860b24494ca7d04194e9a92e4..8f5e17fe222a82d1e4948b5624b5ee2614a7cb53 100644 (file)
@@ -84,7 +84,7 @@ do { \
 
 /*                cmd, param, offset, width, type, arg_name */
 #define DPMAC_CMD_GET_COUNTER(cmd, type) \
-       MC_CMD_OP(cmd, 1, 0,  64, enum dpmac_counter, type)
+       MC_CMD_OP(cmd, 0, 0,  8, enum dpmac_counter, type)
 
 /*                cmd, param, offset, width, type, arg_name */
 #define DPMAC_RSP_GET_COUNTER(cmd, counter) \