linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saurav Kashyap <saurav.kashyap@qlogic.com>
To: jbottomley@parallels.com
Cc: giridhar.malavali@qlogic.com, saurav.kashyap@qlogic.com,
	andrew.vasquez@qlogic.com, linux-scsi@vger.kernel.org
Subject: [PATCH 16/20] qla2xxx: Simplyfy the ISPFX00 interrupt handler code for ISPFX00.
Date: Fri, 13 Dec 2013 15:03:56 -0500	[thread overview]
Message-ID: <1386965040-20611-17-git-send-email-saurav.kashyap@qlogic.com> (raw)
In-Reply-To: <1386965040-20611-1-git-send-email-saurav.kashyap@qlogic.com>

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_mr.c |   25 +++++++++----------------
 drivers/scsi/qla2xxx/qla_mr.h |    4 ----
 2 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
index 290322f..046a169 100644
--- a/drivers/scsi/qla2xxx/qla_mr.c
+++ b/drivers/scsi/qla2xxx/qla_mr.c
@@ -3014,6 +3014,7 @@ qlafx00_intr_handler(int irq, void *dev_id)
 	struct rsp_que *rsp;
 	unsigned long	flags;
 	uint32_t clr_intr = 0;
+	uint32_t intr_stat = 0;
 
 	rsp = (struct rsp_que *) dev_id;
 	if (!rsp) {
@@ -3035,34 +3036,26 @@ qlafx00_intr_handler(int irq, void *dev_id)
 		stat = QLAFX00_RD_INTR_REG(ha);
 		if (qla2x00_check_reg_for_disconnect(vha, stat))
 			break;
-		if ((stat & QLAFX00_HST_INT_STS_BITS) == 0)
+		intr_stat = stat & QLAFX00_HST_INT_STS_BITS;
+		if (!intr_stat)
 			break;
 
-		switch (stat & QLAFX00_HST_INT_STS_BITS) {
-		case QLAFX00_INTR_MB_CMPLT:
-		case QLAFX00_INTR_MB_RSP_CMPLT:
-		case QLAFX00_INTR_MB_ASYNC_CMPLT:
-		case QLAFX00_INTR_ALL_CMPLT:
+		if (stat & QLAFX00_INTR_MB_CMPLT) {
 			mb[0] = RD_REG_WORD(&reg->mailbox16);
 			qlafx00_mbx_completion(vha, mb[0]);
 			status |= MBX_INTERRUPT;
 			clr_intr |= QLAFX00_INTR_MB_CMPLT;
-			break;
-		case QLAFX00_INTR_ASYNC_CMPLT:
-		case QLAFX00_INTR_RSP_ASYNC_CMPLT:
+		}
+		if (intr_stat & QLAFX00_INTR_ASYNC_CMPLT) {
 			ha->aenmb[0] = RD_REG_WORD(&reg->aenmailbox0);
 			qlafx00_async_event(vha);
 			clr_intr |= QLAFX00_INTR_ASYNC_CMPLT;
-			break;
-		case QLAFX00_INTR_RSP_CMPLT:
+		}
+		if (intr_stat & QLAFX00_INTR_RSP_CMPLT) {
 			qlafx00_process_response_queue(vha, rsp);
 			clr_intr |= QLAFX00_INTR_RSP_CMPLT;
-			break;
-		default:
-			ql_dbg(ql_dbg_async, vha, 0x507a,
-			    "Unrecognized interrupt type (%d).\n", stat);
-			break;
 		}
+
 		QLAFX00_CLR_INTR_REG(ha, clr_intr);
 		QLAFX00_RD_INTR_REG(ha);
 	}
diff --git a/drivers/scsi/qla2xxx/qla_mr.h b/drivers/scsi/qla2xxx/qla_mr.h
index 3cf5ddc..e529dfa 100644
--- a/drivers/scsi/qla2xxx/qla_mr.h
+++ b/drivers/scsi/qla2xxx/qla_mr.h
@@ -336,11 +336,7 @@ struct config_info_data {
 
 #define QLAFX00_INTR_MB_CMPLT		0x1
 #define QLAFX00_INTR_RSP_CMPLT		0x2
-#define QLAFX00_INTR_MB_RSP_CMPLT	0x3
 #define QLAFX00_INTR_ASYNC_CMPLT	0x4
-#define QLAFX00_INTR_MB_ASYNC_CMPLT	0x5
-#define QLAFX00_INTR_RSP_ASYNC_CMPLT	0x6
-#define QLAFX00_INTR_ALL_CMPLT		0x7
 
 #define QLAFX00_MBA_SYSTEM_ERR		0x8002
 #define QLAFX00_MBA_TEMP_OVER		0x8005
-- 
1.7.7


  parent reply	other threads:[~2013-12-13 20:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 20:03 [PATCH 00/20] qla2xxx: Patches for scsi "misc" branch Saurav Kashyap
2013-12-13 20:03 ` [PATCH 01/20] qla2xxx: Add mutex around optrom calls to serialize accesses Saurav Kashyap
2013-12-13 20:03 ` [PATCH 02/20] qla2xxx: Add handling for boot indication progress AENs for ISPFX00 Saurav Kashyap
2013-12-13 20:03 ` [PATCH 03/20] qla2xxx: Replace constant value for IOCTL IOCB abort execution status with a macro " Saurav Kashyap
2013-12-13 20:03 ` [PATCH 04/20] qla2xxx: Use proper message for Non owner reset ACK Timeout Saurav Kashyap
2013-12-13 20:03 ` [PATCH 05/20] qla2xxx: Remove init control block related dead code for ISPFX00 Saurav Kashyap
2013-12-13 20:03 ` [PATCH 06/20] qla2xxx: Select correct request queue for error type IOCB " Saurav Kashyap
2013-12-13 20:03 ` [PATCH 07/20] qla2xxx: Enable the Flash Access Control (FAC) mailbox command Saurav Kashyap
2013-12-13 20:03 ` [PATCH 08/20] qla2xxx: Properly handle 32 bit mailbox register for ISPFX00 Saurav Kashyap
2013-12-13 20:03 ` [PATCH 09/20] qla2xxx: Set host can_queue value based on available resources Saurav Kashyap
2013-12-13 20:03 ` [PATCH 10/20] scsi_transport_fc: Add 32Gbps speed definition Saurav Kashyap
2013-12-13 20:03 ` [PATCH 11/20] qla2xxx: Add support for ISP2701 Saurav Kashyap
2013-12-16  6:56   ` Bart Van Assche
2013-12-13 20:03 ` [PATCH 12/20] qla2xxx: Remove Marker type IOCB logic for ISPFX00 Saurav Kashyap
2013-12-13 20:03 ` [PATCH 13/20] qla2xxx: Remove ISP_ABORT_NEEDED and ISP_ABORT_RETRY checks from watchdog function for ISP8044 Saurav Kashyap
2013-12-13 20:03 ` [PATCH 14/20] qla2xxx: Add changes in the IOCB structures to adjust driver source codes to ISPFX00 firmware spec Saurav Kashyap
2013-12-13 20:03 ` [PATCH 15/20] qla2xxx: Avoid poisoining in the response queue for ISPFX00 Saurav Kashyap
2013-12-16  6:56   ` Bart Van Assche
2013-12-13 20:03 ` Saurav Kashyap [this message]
2013-12-16  6:56   ` [PATCH 16/20] qla2xxx: Simplyfy the ISPFX00 interrupt handler code " Bart Van Assche
2013-12-17  4:01     ` Saurav Kashyap
2013-12-13 20:03 ` [PATCH 17/20] qla2xxx: Read capture firmware dump on mailbox timeout for ISP8044 and ISP82XX Saurav Kashyap
2013-12-13 20:03 ` [PATCH 18/20] qla2xxx: Correctly set the read_optrom pointer for ISP8044 Saurav Kashyap
2013-12-13 20:03 ` [PATCH 19/20] qla2xxx: Fix multiqueue MSI-X registration Saurav Kashyap
2013-12-16  6:47   ` Bart Van Assche
2013-12-13 20:04 ` [PATCH 20/20] qla2xxx: Update the driver version to 8.07.00.02-k Saurav Kashyap

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=1386965040-20611-17-git-send-email-saurav.kashyap@qlogic.com \
    --to=saurav.kashyap@qlogic.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=giridhar.malavali@qlogic.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).