diff options
Diffstat (limited to 'hw/rdma/vmw/pvrdma.h')
-rw-r--r-- | hw/rdma/vmw/pvrdma.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index 8c173cb824..0b46dc5a9b 100644 --- a/hw/rdma/vmw/pvrdma.h +++ b/hw/rdma/vmw/pvrdma.h @@ -31,7 +31,7 @@ #define RDMA_REG_BAR_IDX 1 #define RDMA_UAR_BAR_IDX 2 #define RDMA_BAR0_MSIX_SIZE (16 * 1024) -#define RDMA_BAR1_REGS_SIZE 256 +#define RDMA_BAR1_REGS_SIZE 64 #define RDMA_BAR2_UAR_SIZE (0x1000 * MAX_UCS) /* each uc gets page */ /* MSIX */ @@ -86,7 +86,7 @@ static inline int get_reg_val(PVRDMADev *dev, hwaddr addr, uint32_t *val) { int idx = addr >> 2; - if (idx > RDMA_BAR1_REGS_SIZE) { + if (idx >= RDMA_BAR1_REGS_SIZE) { return -EINVAL; } @@ -99,7 +99,7 @@ static inline int set_reg_val(PVRDMADev *dev, hwaddr addr, uint32_t val) { int idx = addr >> 2; - if (idx > RDMA_BAR1_REGS_SIZE) { + if (idx >= RDMA_BAR1_REGS_SIZE) { return -EINVAL; } |