From: Zhe Tao Date: Fri, 17 Jul 2015 07:25:40 +0000 (+0800) Subject: i40e: fix registers access from big endian CPU X-Git-Tag: spdx-start~8677 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b0343d8b36ae2a1f838de955dbf47024206ee33d;p=dpdk.git i40e: fix registers access from big endian CPU Signed-off-by: Zhe Tao Acked-by: Chao Zhu --- diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h index 3ce80578db..70d2721c5d 100644 --- a/drivers/net/i40e/base/i40e_osdep.h +++ b/drivers/net/i40e/base/i40e_osdep.h @@ -122,10 +122,10 @@ do { \ ((volatile uint32_t *)((char *)(a)->hw_addr + (reg))) static inline uint32_t i40e_read_addr(volatile void *addr) { - return I40E_PCI_REG(addr); + return rte_le_to_cpu_32(I40E_PCI_REG(addr)); } #define I40E_PCI_REG_WRITE(reg, value) \ - do {I40E_PCI_REG((reg)) = (value);} while(0) + do { I40E_PCI_REG((reg)) = rte_cpu_to_le_32(value); } while (0) #define I40E_WRITE_FLUSH(a) I40E_READ_REG(a, I40E_GLGEN_STAT) #define I40EVF_WRITE_FLUSH(a) I40E_READ_REG(a, I40E_VFGEN_RSTAT)