Commit fafbda9f authored by Arun Easi's avatar Arun Easi Committed by James Bottomley

[SCSI] qla2xxx: Use #defines instead of hardcoded values for intr status.

Signed-off-by: default avatarArun Easi <arun.easi@qlogic.com>
Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 711aa7f7
...@@ -675,6 +675,17 @@ typedef struct { ...@@ -675,6 +675,17 @@ typedef struct {
/* 83XX FCoE specific */ /* 83XX FCoE specific */
#define MBA_IDC_AEN 0x8200 /* FCoE: NIC Core state change AEN */ #define MBA_IDC_AEN 0x8200 /* FCoE: NIC Core state change AEN */
/* Interrupt type codes */
#define INTR_ROM_MB_SUCCESS 0x1
#define INTR_ROM_MB_FAILED 0x2
#define INTR_MB_SUCCESS 0x10
#define INTR_MB_FAILED 0x11
#define INTR_ASYNC_EVENT 0x12
#define INTR_RSP_QUE_UPDATE 0x13
#define INTR_RSP_QUE_UPDATE_83XX 0x14
#define INTR_ATIO_QUE_UPDATE 0x1C
#define INTR_ATIO_RSP_QUE_UPDATE 0x1D
/* ISP mailbox loopback echo diagnostic error code */ /* ISP mailbox loopback echo diagnostic error code */
#define MBS_LB_RESET 0x17 #define MBS_LB_RESET 0x17
/* /*
......
...@@ -2522,29 +2522,29 @@ qla24xx_intr_handler(int irq, void *dev_id) ...@@ -2522,29 +2522,29 @@ qla24xx_intr_handler(int irq, void *dev_id)
break; break;
switch (stat & 0xff) { switch (stat & 0xff) {
case 0x1: case INTR_ROM_MB_SUCCESS:
case 0x2: case INTR_ROM_MB_FAILED:
case 0x10: case INTR_MB_SUCCESS:
case 0x11: case INTR_MB_FAILED:
qla24xx_mbx_completion(vha, MSW(stat)); qla24xx_mbx_completion(vha, MSW(stat));
status |= MBX_INTERRUPT; status |= MBX_INTERRUPT;
break; break;
case 0x12: case INTR_ASYNC_EVENT:
mb[0] = MSW(stat); mb[0] = MSW(stat);
mb[1] = RD_REG_WORD(&reg->mailbox1); mb[1] = RD_REG_WORD(&reg->mailbox1);
mb[2] = RD_REG_WORD(&reg->mailbox2); mb[2] = RD_REG_WORD(&reg->mailbox2);
mb[3] = RD_REG_WORD(&reg->mailbox3); mb[3] = RD_REG_WORD(&reg->mailbox3);
qla2x00_async_event(vha, rsp, mb); qla2x00_async_event(vha, rsp, mb);
break; break;
case 0x13: case INTR_RSP_QUE_UPDATE:
case 0x14: case INTR_RSP_QUE_UPDATE_83XX:
qla24xx_process_response_queue(vha, rsp); qla24xx_process_response_queue(vha, rsp);
break; break;
case 0x1C: /* ATIO queue updated */ case INTR_ATIO_QUE_UPDATE:
qlt_24xx_process_atio_queue(vha); qlt_24xx_process_atio_queue(vha);
break; break;
case 0x1D: /* ATIO and response queues updated */ case INTR_ATIO_RSP_QUE_UPDATE:
qlt_24xx_process_atio_queue(vha); qlt_24xx_process_atio_queue(vha);
qla24xx_process_response_queue(vha, rsp); qla24xx_process_response_queue(vha, rsp);
break; break;
...@@ -2673,29 +2673,29 @@ qla24xx_msix_default(int irq, void *dev_id) ...@@ -2673,29 +2673,29 @@ qla24xx_msix_default(int irq, void *dev_id)
break; break;
switch (stat & 0xff) { switch (stat & 0xff) {
case 0x1: case INTR_ROM_MB_SUCCESS:
case 0x2: case INTR_ROM_MB_FAILED:
case 0x10: case INTR_MB_SUCCESS:
case 0x11: case INTR_MB_FAILED:
qla24xx_mbx_completion(vha, MSW(stat)); qla24xx_mbx_completion(vha, MSW(stat));
status |= MBX_INTERRUPT; status |= MBX_INTERRUPT;
break; break;
case 0x12: case INTR_ASYNC_EVENT:
mb[0] = MSW(stat); mb[0] = MSW(stat);
mb[1] = RD_REG_WORD(&reg->mailbox1); mb[1] = RD_REG_WORD(&reg->mailbox1);
mb[2] = RD_REG_WORD(&reg->mailbox2); mb[2] = RD_REG_WORD(&reg->mailbox2);
mb[3] = RD_REG_WORD(&reg->mailbox3); mb[3] = RD_REG_WORD(&reg->mailbox3);
qla2x00_async_event(vha, rsp, mb); qla2x00_async_event(vha, rsp, mb);
break; break;
case 0x13: case INTR_RSP_QUE_UPDATE:
case 0x14: case INTR_RSP_QUE_UPDATE_83XX:
qla24xx_process_response_queue(vha, rsp); qla24xx_process_response_queue(vha, rsp);
break; break;
case 0x1C: /* ATIO queue updated */ case INTR_ATIO_QUE_UPDATE:
qlt_24xx_process_atio_queue(vha); qlt_24xx_process_atio_queue(vha);
break; break;
case 0x1D: /* ATIO and response queues updated */ case INTR_ATIO_RSP_QUE_UPDATE:
qlt_24xx_process_atio_queue(vha); qlt_24xx_process_atio_queue(vha);
qla24xx_process_response_queue(vha, rsp); qla24xx_process_response_queue(vha, rsp);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment