diff options
author | Lalit Chandivade <lalit.chandivade@qlogic.com> | 2009-03-24 12:08:07 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 10:22:49 -0400 |
commit | 2533cf671da0603129c8af9c31c735e1d2654e20 (patch) | |
tree | 3ef7f6c0b4266823c07bc0687ac9009e1cc281c0 /drivers/scsi/qla2xxx/qla_os.c | |
parent | 1d2874de809a14e6780246b99a18bbc0fc0a8f2a (diff) |
[SCSI] qla2xxx: Correct ISP abort semantics for NVRAM, VPD, and flash update.
Ensure that an ISP-abort has completed before performing any
update. After the update do not wait for an ISP-abort completion,
instead just wait until the ISP is reset. This avoids long
delays due to waiting for loop ready in qla2x00_abort_isp().
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index c7954612ef11..1c3d165c035b 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -535,6 +535,34 @@ qla2x00_wait_for_hba_online(scsi_qla_host_t *vha) | |||
535 | return (return_status); | 535 | return (return_status); |
536 | } | 536 | } |
537 | 537 | ||
538 | int | ||
539 | qla2x00_wait_for_chip_reset(scsi_qla_host_t *vha) | ||
540 | { | ||
541 | int return_status; | ||
542 | unsigned long wait_reset; | ||
543 | struct qla_hw_data *ha = vha->hw; | ||
544 | scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); | ||
545 | |||
546 | wait_reset = jiffies + (MAX_LOOP_TIMEOUT * HZ); | ||
547 | while (((test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags)) || | ||
548 | test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) || | ||
549 | test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) || | ||
550 | ha->dpc_active) && time_before(jiffies, wait_reset)) { | ||
551 | |||
552 | msleep(1000); | ||
553 | |||
554 | if (!test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) && | ||
555 | ha->flags.chip_reset_done) | ||
556 | break; | ||
557 | } | ||
558 | if (ha->flags.chip_reset_done) | ||
559 | return_status = QLA_SUCCESS; | ||
560 | else | ||
561 | return_status = QLA_FUNCTION_FAILED; | ||
562 | |||
563 | return return_status; | ||
564 | } | ||
565 | |||
538 | /* | 566 | /* |
539 | * qla2x00_wait_for_loop_ready | 567 | * qla2x00_wait_for_loop_ready |
540 | * Wait for MAX_LOOP_TIMEOUT(5 min) value for loop | 568 | * Wait for MAX_LOOP_TIMEOUT(5 min) value for loop |