summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2011-02-23 23:27:13 (GMT)
committerJames Bottomley <James.Bottomley@suse.de>2011-02-25 17:58:18 (GMT)
commit6aef87bea9d37d5adf45f3d1c674ccf6f95799ca (patch)
treebfbad013dee88c0bcd8d1b89de40f05dd13a4df4 /drivers/scsi/qla2xxx
parent7a78ceda1c294addb42a54e10d614c6ff0c4a6c9 (diff)
downloadlinux-fsl-qoriq-6aef87bea9d37d5adf45f3d1c674ccf6f95799ca.tar.xz
[SCSI] qla2xxx: Clear any stale login-states during an adapter reset.
By not clearing the 'login needed' nor 'login outstanding' states for an fcport after a big-hammer (adapter reset), the driver may not properly perform a PLOGI/PRLI sequence (and lose visibility to the rport) during a follow-on SNS scan. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 6370cdc..9b6e39d 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -3943,6 +3943,7 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
struct qla_hw_data *ha = vha->hw;
struct scsi_qla_host *vp;
unsigned long flags;
+ fc_port_t *fcport;
vha->flags.online = 0;
ha->flags.chip_reset_done = 0;
@@ -3978,6 +3979,22 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
LOOP_DOWN_TIME);
}
+ /* Clear all async request states across all VPs. */
+ list_for_each_entry(fcport, &vha->vp_fcports, list)
+ fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
+ spin_lock_irqsave(&ha->vport_slock, flags);
+ list_for_each_entry(vp, &ha->vp_list, list) {
+ atomic_inc(&vp->vref_count);
+ spin_unlock_irqrestore(&ha->vport_slock, flags);
+
+ list_for_each_entry(fcport, &vp->vp_fcports, list)
+ fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
+
+ spin_lock_irqsave(&ha->vport_slock, flags);
+ atomic_dec(&vp->vref_count);
+ }
+ spin_unlock_irqrestore(&ha->vport_slock, flags);
+
if (!ha->flags.eeh_busy) {
/* Make sure for ISP 82XX IO DMA is complete */
if (IS_QLA82XX(ha))