From: Andrew Boyer Date: Mon, 18 Jan 2021 20:35:04 +0000 (-0800) Subject: net/ionic: observe endiannness in ioread/iowrite X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f3926b1f876a8bb1c90e516c790c91eb5b4921cf;p=dpdk.git net/ionic: observe endiannness in ioread/iowrite The IONIC FW is little-endian. Signed-off-by: Andrew Boyer --- diff --git a/drivers/net/ionic/ionic_dev.h b/drivers/net/ionic/ionic_dev.h index ef63ff7abd..e13b6c82cc 100644 --- a/drivers/net/ionic/ionic_dev.h +++ b/drivers/net/ionic/ionic_dev.h @@ -277,7 +277,7 @@ ionic_q_flush(struct ionic_queue *q) { uint64_t val = IONIC_DBELL_QID(q->hw_index) | q->head_idx; - rte_write64(val, q->db); + rte_write64(rte_cpu_to_le_64(val), q->db); } int ionic_adminq_post(struct ionic_lif *lif, struct ionic_admin_ctx *ctx); diff --git a/drivers/net/ionic/ionic_osdep.h b/drivers/net/ionic/ionic_osdep.h index a352849189..a6575c36b5 100644 --- a/drivers/net/ionic/ionic_osdep.h +++ b/drivers/net/ionic/ionic_osdep.h @@ -40,8 +40,8 @@ typedef uint32_t __le32; typedef uint64_t __le64; #define ioread8(reg) rte_read8(reg) -#define ioread32(reg) rte_read32(reg) +#define ioread32(reg) rte_read32(rte_le_to_cpu_32(reg)) #define iowrite8(value, reg) rte_write8(value, reg) -#define iowrite32(value, reg) rte_write32(value, reg) +#define iowrite32(value, reg) rte_write32(rte_cpu_to_le_32(value), reg) #endif