diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2011-11-18 12:03:10 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-12-15 01:55:03 -0500 |
commit | c142caf0ab21fb57240b09138a95def1ca20ca0f (patch) | |
tree | 7242cf0ef62c6cc193bd8e5789019e3da3999827 /drivers/scsi/qla2xxx | |
parent | 4fa94f83ff12979cb7396908ddc8ad13430649ed (diff) |
[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: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index c9a74521b402..51c465542092 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -3445,27 +3445,21 @@ qla2x00_do_dpc(void *data) | |||
3445 | schedule(); | 3445 | schedule(); |
3446 | __set_current_state(TASK_RUNNING); | 3446 | __set_current_state(TASK_RUNNING); |
3447 | 3447 | ||
3448 | ql_dbg(ql_dbg_dpc, base_vha, 0x4001, | 3448 | if (!base_vha->flags.init_done || ha->flags.mbox_busy) |
3449 | "DPC handler waking up.\n"); | 3449 | goto end_loop; |
3450 | ql_dbg(ql_dbg_dpc, base_vha, 0x4002, | ||
3451 | "dpc_flags=0x%lx.\n", base_vha->dpc_flags); | ||
3452 | |||
3453 | /* Initialization not yet finished. Don't do anything yet. */ | ||
3454 | if (!base_vha->flags.init_done) | ||
3455 | continue; | ||
3456 | 3450 | ||
3457 | if (ha->flags.eeh_busy) { | 3451 | if (ha->flags.eeh_busy) { |
3458 | ql_dbg(ql_dbg_dpc, base_vha, 0x4003, | 3452 | ql_dbg(ql_dbg_dpc, base_vha, 0x4003, |
3459 | "eeh_busy=%d.\n", ha->flags.eeh_busy); | 3453 | "eeh_busy=%d.\n", ha->flags.eeh_busy); |
3460 | continue; | 3454 | goto end_loop; |
3461 | } | 3455 | } |
3462 | 3456 | ||
3463 | ha->dpc_active = 1; | 3457 | ha->dpc_active = 1; |
3464 | 3458 | ||
3465 | if (ha->flags.mbox_busy) { | 3459 | ql_dbg(ql_dbg_dpc, base_vha, 0x4001, |
3466 | ha->dpc_active = 0; | 3460 | "DPC handler waking up.\n"); |
3467 | continue; | 3461 | ql_dbg(ql_dbg_dpc, base_vha, 0x4002, |
3468 | } | 3462 | "dpc_flags=0x%lx.\n", base_vha->dpc_flags); |
3469 | 3463 | ||
3470 | qla2x00_do_work(base_vha); | 3464 | qla2x00_do_work(base_vha); |
3471 | 3465 | ||
@@ -3607,6 +3601,7 @@ qla2x00_do_dpc(void *data) | |||
3607 | qla2x00_do_dpc_all_vps(base_vha); | 3601 | qla2x00_do_dpc_all_vps(base_vha); |
3608 | 3602 | ||
3609 | ha->dpc_active = 0; | 3603 | ha->dpc_active = 0; |
3604 | end_loop: | ||
3610 | set_current_state(TASK_INTERRUPTIBLE); | 3605 | set_current_state(TASK_INTERRUPTIBLE); |
3611 | } /* End of while(1) */ | 3606 | } /* End of while(1) */ |
3612 | __set_current_state(TASK_RUNNING); | 3607 | __set_current_state(TASK_RUNNING); |