summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@broadcom.com>2019-04-10 14:46:22 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2019-04-12 11:02:02 +0200
commit13856b795362e11c1db20c1a134680653144bd1a (patch)
treebf781b01b6754a9a016fdb19d0d06adc8dd64723
parent6e54c8ac5c15935d42d47950a55406c7f5517117 (diff)
downloaddpdk-13856b795362e11c1db20c1a134680653144bd1a.zip
dpdk-13856b795362e11c1db20c1a134680653144bd1a.tar.gz
dpdk-13856b795362e11c1db20c1a134680653144bd1a.tar.xz
net/bnxt: fix big endian build
The result of the endian conversion was not being used incorrectly. Fixes: b11cceb83a34 ("net/bnxt: support timesync") Cc: stable@dpdk.org Reported-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
-rw-r--r--drivers/net/bnxt/bnxt_ethdev.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 78ab07d..da0de21 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2649,7 +2649,7 @@ static int bnxt_map_regs(struct bnxt *bp, uint32_t *reg_arr, int count,
return -ERANGE;
}
win_off = BNXT_GRCPF_REG_WINDOW_BASE_OUT + (reg_win - 1) * 4;
- rte_cpu_to_le_32(rte_write32(reg_base, (uint8_t *)bp->bar0 + win_off));
+ rte_write32(reg_base, (uint8_t *)bp->bar0 + win_off);
return 0;
}
@@ -2680,10 +2680,10 @@ static int bnxt_map_ptp_regs(struct bnxt *bp)
static void bnxt_unmap_ptp_regs(struct bnxt *bp)
{
- rte_cpu_to_le_32(rte_write32(0, (uint8_t *)bp->bar0 +
- BNXT_GRCPF_REG_WINDOW_BASE_OUT + 16));
- rte_cpu_to_le_32(rte_write32(0, (uint8_t *)bp->bar0 +
- BNXT_GRCPF_REG_WINDOW_BASE_OUT + 20));
+ rte_write32(0, (uint8_t *)bp->bar0 +
+ BNXT_GRCPF_REG_WINDOW_BASE_OUT + 16);
+ rte_write32(0, (uint8_t *)bp->bar0 +
+ BNXT_GRCPF_REG_WINDOW_BASE_OUT + 20);
}
static uint64_t bnxt_cc_read(struct bnxt *bp)
@@ -2733,8 +2733,8 @@ static int bnxt_get_rx_ts(struct bnxt *bp, uint64_t *ts)
return -EAGAIN;
port_id = pf->port_id;
- rte_cpu_to_le_32(rte_write32(1 << port_id, (uint8_t *)bp->bar0 +
- ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO_ADV]));
+ rte_write32(1 << port_id, (uint8_t *)bp->bar0 +
+ ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO_ADV]);
fifo = rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO]));