Commit c142caf0 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: Limit excessive DPC cycles.

The 'continue' cases neglected to place the thread in an
interruptible state, causing the DPC routine to wake immediately.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 4fa94f83
...@@ -3445,27 +3445,21 @@ qla2x00_do_dpc(void *data) ...@@ -3445,27 +3445,21 @@ qla2x00_do_dpc(void *data)
schedule(); schedule();
__set_current_state(TASK_RUNNING); __set_current_state(TASK_RUNNING);
ql_dbg(ql_dbg_dpc, base_vha, 0x4001, if (!base_vha->flags.init_done || ha->flags.mbox_busy)
"DPC handler waking up.\n"); goto end_loop;
ql_dbg(ql_dbg_dpc, base_vha, 0x4002,
"dpc_flags=0x%lx.\n", base_vha->dpc_flags);
/* Initialization not yet finished. Don't do anything yet. */
if (!base_vha->flags.init_done)
continue;
if (ha->flags.eeh_busy) { if (ha->flags.eeh_busy) {
ql_dbg(ql_dbg_dpc, base_vha, 0x4003, ql_dbg(ql_dbg_dpc, base_vha, 0x4003,
"eeh_busy=%d.\n", ha->flags.eeh_busy); "eeh_busy=%d.\n", ha->flags.eeh_busy);
continue; goto end_loop;
} }
ha->dpc_active = 1; ha->dpc_active = 1;
if (ha->flags.mbox_busy) { ql_dbg(ql_dbg_dpc, base_vha, 0x4001,
ha->dpc_active = 0; "DPC handler waking up.\n");
continue; ql_dbg(ql_dbg_dpc, base_vha, 0x4002,
} "dpc_flags=0x%lx.\n", base_vha->dpc_flags);
qla2x00_do_work(base_vha); qla2x00_do_work(base_vha);
...@@ -3607,6 +3601,7 @@ qla2x00_do_dpc(void *data) ...@@ -3607,6 +3601,7 @@ qla2x00_do_dpc(void *data)
qla2x00_do_dpc_all_vps(base_vha); qla2x00_do_dpc_all_vps(base_vha);
ha->dpc_active = 0; ha->dpc_active = 0;
end_loop:
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
} /* End of while(1) */ } /* End of while(1) */
__set_current_state(TASK_RUNNING); __set_current_state(TASK_RUNNING);
......
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