summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
diff options
context:
space:
mode:
authorDevesh Sharma <devesh.sharma@avagotech.com>2015-05-19 09:02:33 +0300
committerDoug Ledford <dledford@redhat.com>2015-05-18 17:25:24 +0300
commit5e6f9237f8e676e8a9110b4dafed36b1dd0b5d84 (patch)
tree9244dc592e675de1066d9d41a5d35e25b5c5106f /drivers/infiniband/hw/ocrdma/ocrdma_hw.c
parent314fdf4473bc05fa9a1f33b27b98eb0f0c836f71 (diff)
downloadlinux-5e6f9237f8e676e8a9110b4dafed36b1dd0b5d84.tar.xz
RDMA/ocrdma: Report EQ full fatal error
Detect when Event Queue (EQ) becomes full and print a warning message. Signed-off-by: Devesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: Selvin Xavier <selvin.xavier@avagotech.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_hw.c')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_hw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 3a5ea5afc2a2..65759acb12dc 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -933,12 +933,18 @@ static irqreturn_t ocrdma_irq_handler(int irq, void *handle)
struct ocrdma_eqe eqe;
struct ocrdma_eqe *ptr;
u16 cq_id;
+ u8 mcode;
int budget = eq->cq_cnt;
do {
ptr = ocrdma_get_eqe(eq);
eqe = *ptr;
ocrdma_le32_to_cpu(&eqe, sizeof(eqe));
+ mcode = (eqe.id_valid & OCRDMA_EQE_MAJOR_CODE_MASK)
+ >> OCRDMA_EQE_MAJOR_CODE_SHIFT;
+ if (mcode == OCRDMA_MAJOR_CODE_SENTINAL)
+ pr_err("EQ full on eqid = 0x%x, eqe = 0x%x\n",
+ eq->q.id, eqe.id_valid);
if ((eqe.id_valid & OCRDMA_EQE_VALID_MASK) == 0)
break;