All of lore.kernel.org
 help / color / mirror / Atom feed
From: Selvin Xavier <selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Selvin Xavier
	<selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>,
	Devesh Sharma
	<devesh.sharma-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH for-next 08/15] RDMA/ocrdma: Avoid reporting wrong
Date: Wed, 4 Jun 2014 14:22:39 +0530	[thread overview]
Message-ID: <1d1601b3-935a-4742-a396-6501ea55eb62@CMEXHTCAS1.ad.emulex.com> (raw)
In-Reply-To: <1401871966-20408-8-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>

Adding a check for SQ and RQ empty condition

Signed-off-by: Selvin Xavier <selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Devesh Sharma <devesh.sharma-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 0d7d808..2b68235 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -2489,6 +2489,11 @@ static bool ocrdma_poll_err_scqe(struct ocrdma_qp *qp,
 			*stop = true;
 			expand = false;
 		}
+	} else if (is_hw_sq_empty(qp)) {
+		/* Do nothing */
+		expand = false;
+		*polled = false;
+		*stop = false;
 	} else {
 		*polled = true;
 		expand = ocrdma_update_err_scqe(ibwc, cqe, qp, status);
@@ -2594,6 +2599,11 @@ static bool ocrdma_poll_err_rcqe(struct ocrdma_qp *qp, struct ocrdma_cqe *cqe,
 			*stop = true;
 			expand = false;
 		}
+	} else if (is_hw_rq_empty(qp)) {
+		/* Do nothing */
+		expand = false;
+		*polled = false;
+		*stop = false;
 	} else {
 		*polled = true;
 		expand = ocrdma_update_err_rcqe(ibwc, cqe, qp, status);
-- 
1.7.12.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-06-04  8:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1401871966-20408-1-git-send-email-selvin.xavier@emulex.com>
     [not found] ` <1401871966-20408-1-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52   ` [PATCH for-next 01/15] RDMA/ocrdma: Avoid posting DPP requests for Selvin Xavier
     [not found] ` <1401871966-20408-2-git-send-email-selvin.xavier@emulex.com>
     [not found]   ` <1401871966-20408-2-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52     ` [PATCH for-next 02/15] RDMA/ocrdma: Query and initalize the PFC SL Selvin Xavier
     [not found]       ` <17b84e4b-a78f-40a0-bfa7-cdc3afb53fc1-3RiH6ntJJkP8BX6JNMqfyFjyZtpTMMwT@public.gmane.org>
2014-06-09 21:05         ` Or Gerlitz
     [not found]   ` <1401871966-20408-3-git-send-email-selvin.xavier@emulex.com>
     [not found]     ` <1401871966-20408-3-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52       ` [PATCH for-next 03/15] RDMA/ocrdma: Adding hca_type and fixing Selvin Xavier
     [not found]     ` <1401871966-20408-4-git-send-email-selvin.xavier@emulex.com>
     [not found]       ` <1401871966-20408-4-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52         ` [PATCH for-next 04/15] be2net: issue shutdown event to ocrdma driver Selvin Xavier
     [not found]       ` <1401871966-20408-5-git-send-email-selvin.xavier@emulex.com>
     [not found]         ` <1401871966-20408-5-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52           ` [PATCH for-next 05/15] RDMA/ocrdma: Handle shutdown event from Selvin Xavier
     [not found]         ` <1401871966-20408-6-git-send-email-selvin.xavier@emulex.com>
     [not found]           ` <1401871966-20408-6-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52             ` [PATCH for-next 06/15] RDMA/ocrdma: Remove hardcoding of the max DPP Selvin Xavier
     [not found]           ` <1401871966-20408-7-git-send-email-selvin.xavier@emulex.com>
     [not found]             ` <1401871966-20408-7-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52               ` [PATCH for-next 07/15] RDMA/ocrdma: Delete AH table if Selvin Xavier
     [not found]             ` <1401871966-20408-8-git-send-email-selvin.xavier@emulex.com>
     [not found]               ` <1401871966-20408-8-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52                 ` Selvin Xavier [this message]
     [not found]               ` <1401871966-20408-9-git-send-email-selvin.xavier@emulex.com>
     [not found]                 ` <1401871966-20408-9-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52                   ` [PATCH for-next 09/15] RDMA/ocrdma: Allow only SEND opcode in case Selvin Xavier
     [not found]                 ` <1401871966-20408-10-git-send-email-selvin.xavier@emulex.com>
     [not found]                   ` <1401871966-20408-10-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52                     ` [PATCH for-next 10/15] RDMA/ocrdma: Do proper cleanup evenif FW is Selvin Xavier
     [not found]                   ` <1401871966-20408-11-git-send-email-selvin.xavier@emulex.com>
     [not found]                     ` <1401871966-20408-11-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52                       ` [PATCH for-next 11/15] RDMA/ocrdma: Return proper value for Selvin Xavier
     [not found]                     ` <1401871966-20408-12-git-send-email-selvin.xavier@emulex.com>
     [not found]                       ` <1401871966-20408-12-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52                         ` [PATCH for-next 12/15] RDMA/ocrdma : Add missing adapter mailbox Selvin Xavier
     [not found]                       ` <1401871966-20408-13-git-send-email-selvin.xavier@emulex.com>
     [not found]                         ` <1401871966-20408-13-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52                           ` [PATCH for-next 13/15] RDMA/ocrdma: Increase the size of STAG array Selvin Xavier
     [not found]                         ` <1401871966-20408-14-git-send-email-selvin.xavier@emulex.com>
     [not found]                           ` <1401871966-20408-14-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52                             ` [PATCH for-next 14/15] RDMA/ocrdma: Initialize the GID table while Selvin Xavier
     [not found]                           ` <1401871966-20408-15-git-send-email-selvin.xavier@emulex.com>
     [not found]                             ` <1401871966-20408-15-git-send-email-selvin.xavier-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-06-04  8:52                               ` [PATCH for-next 15/15] RDMA/ocrdma: Fixing a sparse warning Selvin Xavier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d1601b3-935a-4742-a396-6501ea55eb62@CMEXHTCAS1.ad.emulex.com \
    --to=selvin.xavier-lakksmnt4hbqt0dzr+alfa@public.gmane.org \
    --cc=devesh.sharma-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.