diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2009-08-25 22:36:19 +0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-12 18:35:22 +0400 |
commit | 0d6e61bc6a4f3f54444b088ae6d447f1703a21dd (patch) | |
tree | 20594eed50ae777518a1b5d9f3c6dd81cb110dfc /drivers/scsi/qla2xxx/qla_os.c | |
parent | d970432c48ab8dd28216e80942723aeb505b623e (diff) | |
download | linux-0d6e61bc6a4f3f54444b088ae6d447f1703a21dd.tar.xz |
[SCSI] qla2xxx: Correct various NPIV issues.
* Consolidate vport-count processing.
* Correct vp_idx restrictions during RSCN processing.
* Push topology verification check to qla2x00_do_dpc_all_vps().
* Don't skip vport full-login-lip/lip-reset mailbox handling.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index ea9f91756c1e..210229019588 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -1119,8 +1119,7 @@ qla2x00_loop_reset(scsi_qla_host_t *vha) struct fc_port *fcport; struct qla_hw_data *ha = vha->hw; - if (ha->flags.enable_lip_full_login && !vha->vp_idx && - !IS_QLA81XX(ha)) { + if (ha->flags.enable_lip_full_login && !IS_QLA81XX(ha)) { ret = qla2x00_full_login_lip(vha); if (ret != QLA_SUCCESS) { DEBUG2_3(printk("%s(%ld): failed: " @@ -1133,7 +1132,7 @@ qla2x00_loop_reset(scsi_qla_host_t *vha) qla2x00_wait_for_loop_ready(vha); } - if (ha->flags.enable_lip_reset && !vha->vp_idx) { + if (ha->flags.enable_lip_reset) { ret = qla2x00_lip_reset(vha); if (ret != QLA_SUCCESS) { DEBUG2_3(printk("%s(%ld): failed: " @@ -2264,8 +2263,9 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha, int defer) fc_port_t *fcport; list_for_each_entry(fcport, &vha->vp_fcports, list) { - if (vha->vp_idx != fcport->vp_idx) + if (vha->vp_idx != 0 && vha->vp_idx != fcport->vp_idx) continue; + /* * No point in marking the device as lost, if the device is * already DEAD. @@ -2273,10 +2273,12 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha, int defer) if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD) continue; if (atomic_read(&fcport->state) == FCS_ONLINE) { - atomic_set(&fcport->state, FCS_DEVICE_LOST); - qla2x00_schedule_rport_del(vha, fcport, defer); - } else - atomic_set(&fcport->state, FCS_DEVICE_LOST); + if (defer) + qla2x00_schedule_rport_del(vha, fcport, defer); + else if (vha->vp_idx == fcport->vp_idx) + qla2x00_schedule_rport_del(vha, fcport, defer); + } + atomic_set(&fcport->state, FCS_DEVICE_LOST); } } @@ -3069,8 +3071,7 @@ qla2x00_timer(scsi_qla_host_t *vha) /* if the loop has been down for 4 minutes, reinit adapter */ if (atomic_dec_and_test(&vha->loop_down_timer) != 0) { - if (!(vha->device_flags & DFLG_NO_CABLE) && - !vha->vp_idx) { + if (!(vha->device_flags & DFLG_NO_CABLE)) { DEBUG(printk("scsi(%ld): Loop down - " "aborting ISP.\n", vha->host_no)); |