From: Remy Horton Date: Wed, 13 Apr 2016 09:44:45 +0000 (+0100) Subject: i40e: fix register dump offset X-Git-Tag: spdx-start~6969 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=af2feb72b969b2edf1ad4d7a0a34533e19f21d78;p=dpdk.git i40e: fix register dump offset The position of register values within i40e register dumps is supposed to reflect the register addresses. These were not being correctly calculated. Fixes: d9efd0136ac1 ("i40e: add EEPROM and registers dumping") Signed-off-by: Remy Horton Acked-by: Jingjing Wu --- diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index d8b6bd784a..43939ca0b7 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -9030,6 +9030,7 @@ static int i40e_get_regs(struct rte_eth_dev *dev, arr_idx2++) { reg_offset = arr_idx * reg_info->stride1 + arr_idx2 * reg_info->stride2; + reg_offset += reg_info->base_addr; ptr_data[reg_offset >> 2] = i40e_read_rx_ctl(hw, reg_offset); } @@ -9045,6 +9046,7 @@ static int i40e_get_regs(struct rte_eth_dev *dev, arr_idx2++) { reg_offset = arr_idx * reg_info->stride1 + arr_idx2 * reg_info->stride2; + reg_offset += reg_info->base_addr; ptr_data[reg_offset >> 2] = I40E_READ_REG(hw, reg_offset); }