diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2011-02-23 18:27:13 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-25 12:58:18 -0500 |
commit | 6aef87bea9d37d5adf45f3d1c674ccf6f95799ca (patch) | |
tree | bfbad013dee88c0bcd8d1b89de40f05dd13a4df4 | |
parent | 7a78ceda1c294addb42a54e10d614c6ff0c4a6c9 (diff) |
[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>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 6370cdc193d5..9b6e39dc0d79 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) | |||
3943 | struct qla_hw_data *ha = vha->hw; | 3943 | struct qla_hw_data *ha = vha->hw; |
3944 | struct scsi_qla_host *vp; | 3944 | struct scsi_qla_host *vp; |
3945 | unsigned long flags; | 3945 | unsigned long flags; |
3946 | fc_port_t *fcport; | ||
3946 | 3947 | ||
3947 | vha->flags.online = 0; | 3948 | vha->flags.online = 0; |
3948 | ha->flags.chip_reset_done = 0; | 3949 | ha->flags.chip_reset_done = 0; |
@@ -3978,6 +3979,22 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha) | |||
3978 | LOOP_DOWN_TIME); | 3979 | LOOP_DOWN_TIME); |
3979 | } | 3980 | } |
3980 | 3981 | ||
3982 | /* Clear all async request states across all VPs. */ | ||
3983 | list_for_each_entry(fcport, &vha->vp_fcports, list) | ||
3984 | fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); | ||
3985 | spin_lock_irqsave(&ha->vport_slock, flags); | ||
3986 | list_for_each_entry(vp, &ha->vp_list, list) { | ||
3987 | atomic_inc(&vp->vref_count); | ||
3988 | spin_unlock_irqrestore(&ha->vport_slock, flags); | ||
3989 | |||
3990 | list_for_each_entry(fcport, &vp->vp_fcports, list) | ||
3991 | fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); | ||
3992 | |||
3993 | spin_lock_irqsave(&ha->vport_slock, flags); | ||
3994 | atomic_dec(&vp->vref_count); | ||
3995 | } | ||
3996 | spin_unlock_irqrestore(&ha->vport_slock, flags); | ||
3997 | |||
3981 | if (!ha->flags.eeh_busy) { | 3998 | if (!ha->flags.eeh_busy) { |
3982 | /* Make sure for ISP 82XX IO DMA is complete */ | 3999 | /* Make sure for ISP 82XX IO DMA is complete */ |
3983 | if (IS_QLA82XX(ha)) | 4000 | if (IS_QLA82XX(ha)) |