Re: [PATCH 16/20] qla2xxx: Simplyfy the ISPFX00 interrupt handler code for ISPFX00.

2013-12-16 Thread Saurav Kashyap
Hi Bart,

Thanks for the feedback, I will be submitting the updated patches soon.

Thanks,
~Saurav


On 12/13/13 21:03, Saurav Kashyap wrote:
 [ ... ]

Shouldn't the subject of this patch read Simplify instead of Simplyfy
?

Bart.


attachment: winmail.dat

Re: [PATCH 16/20] qla2xxx: Simplyfy the ISPFX00 interrupt handler code for ISPFX00.

2013-12-15 Thread Bart Van Assche
On 12/13/13 21:03, Saurav Kashyap wrote:
 [ ... ]

Shouldn't the subject of this patch read Simplify instead of Simplyfy ?

Bart.

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


[PATCH 16/20] qla2xxx: Simplyfy the ISPFX00 interrupt handler code for ISPFX00.

2013-12-13 Thread Saurav Kashyap
Signed-off-by: Giridhar Malavali giridhar.malav...@qlogic.com
Signed-off-by: Saurav Kashyap saurav.kash...@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_CMPLT0x5
-#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

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