diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index d9479c3fe5f8..8575808dbae0 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1967,7 +1967,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha) | |||
1967 | } else { | 1967 | } else { |
1968 | /* Mailbox cmd failed. Timeout on min_wait. */ | 1968 | /* Mailbox cmd failed. Timeout on min_wait. */ |
1969 | if (time_after_eq(jiffies, mtime) || | 1969 | if (time_after_eq(jiffies, mtime) || |
1970 | (IS_QLA82XX(ha) && ha->flags.fw_hung)) | 1970 | ha->flags.isp82xx_fw_hung) |
1971 | break; | 1971 | break; |
1972 | } | 1972 | } |
1973 | 1973 | ||
@@ -3945,8 +3945,13 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha) | |||
3945 | struct qla_hw_data *ha = vha->hw; | 3945 | struct qla_hw_data *ha = vha->hw; |
3946 | struct scsi_qla_host *vp; | 3946 | struct scsi_qla_host *vp; |
3947 | unsigned long flags; | 3947 | unsigned long flags; |
3948 | fc_port_t *fcport; | ||
3948 | 3949 | ||
3949 | vha->flags.online = 0; | 3950 | /* For ISP82XX, driver waits for completion of the commands. |
3951 | * online flag should be set. | ||
3952 | */ | ||
3953 | if (!IS_QLA82XX(ha)) | ||
3954 | vha->flags.online = 0; | ||
3950 | ha->flags.chip_reset_done = 0; | 3955 | ha->flags.chip_reset_done = 0; |
3951 | clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 3956 | clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
3952 | ha->qla_stats.total_isp_aborts++; | 3957 | ha->qla_stats.total_isp_aborts++; |
@@ -3954,7 +3959,10 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha) | |||
3954 | qla_printk(KERN_INFO, ha, | 3959 | qla_printk(KERN_INFO, ha, |
3955 | "Performing ISP error recovery - ha= %p.\n", ha); | 3960 | "Performing ISP error recovery - ha= %p.\n", ha); |
3956 | 3961 | ||
3957 | /* Chip reset does not apply to 82XX */ | 3962 | /* For ISP82XX, reset_chip is just disabling interrupts. |
3963 | * Driver waits for the completion of the commands. | ||
3964 | * the interrupts need to be enabled. | ||
3965 | */ | ||
3958 | if (!IS_QLA82XX(ha)) | 3966 | if (!IS_QLA82XX(ha)) |
3959 | ha->isp_ops->reset_chip(vha); | 3967 | ha->isp_ops->reset_chip(vha); |
3960 | 3968 | ||
@@ -3980,14 +3988,31 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha) | |||
3980 | LOOP_DOWN_TIME); | 3988 | LOOP_DOWN_TIME); |
3981 | } | 3989 | } |
3982 | 3990 | ||
3991 | /* Clear all async request states across all VPs. */ | ||
3992 | list_for_each_entry(fcport, &vha->vp_fcports, list) | ||
3993 | fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); | ||
3994 | spin_lock_irqsave(&ha->vport_slock, flags); | ||
3995 | list_for_each_entry(vp, &ha->vp_list, list) { | ||
3996 | atomic_inc(&vp->vref_count); | ||
3997 | spin_unlock_irqrestore(&ha->vport_slock, flags); | ||
3998 | |||
3999 | list_for_each_entry(fcport, &vp->vp_fcports, list) | ||
4000 | fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); | ||
4001 | |||
4002 | spin_lock_irqsave(&ha->vport_slock, flags); | ||
4003 | atomic_dec(&vp->vref_count); | ||
4004 | } | ||
4005 | spin_unlock_irqrestore(&ha->vport_slock, flags); | ||
4006 | |||
3983 | if (!ha->flags.eeh_busy) { | 4007 | if (!ha->flags.eeh_busy) { |
3984 | /* Make sure for ISP 82XX IO DMA is complete */ | 4008 | /* Make sure for ISP 82XX IO DMA is complete */ |
3985 | if (IS_QLA82XX(ha)) { | 4009 | if (IS_QLA82XX(ha)) { |
3986 | if (qla2x00_eh_wait_for_pending_commands(vha, 0, 0, | 4010 | qla82xx_chip_reset_cleanup(vha); |
3987 | WAIT_HOST) == QLA_SUCCESS) { | 4011 | |
3988 | DEBUG2(qla_printk(KERN_INFO, ha, | 4012 | /* Done waiting for pending commands. |
3989 | "Done wait for pending commands\n")); | 4013 | * Reset the online flag. |
3990 | } | 4014 | */ |
4015 | vha->flags.online = 0; | ||
3991 | } | 4016 | } |
3992 | 4017 | ||
3993 | /* Requeue all commands in outstanding command list. */ | 4018 | /* Requeue all commands in outstanding command list. */ |