aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-08-25 14:36:19 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-12 10:35:22 -0400
commit0d6e61bc6a4f3f54444b088ae6d447f1703a21dd (patch)
tree20594eed50ae777518a1b5d9f3c6dd81cb110dfc /drivers/scsi/qla2xxx/qla_os.c
parentd970432c48ab8dd28216e80942723aeb505b623e (diff)
[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.c21
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)
1119 struct fc_port *fcport; 1119 struct fc_port *fcport;
1120 struct qla_hw_data *ha = vha->hw; 1120 struct qla_hw_data *ha = vha->hw;
1121 1121
1122 if (ha->flags.enable_lip_full_login && !vha->vp_idx && 1122 if (ha->flags.enable_lip_full_login && !IS_QLA81XX(ha)) {
1123 !IS_QLA81XX(ha)) {
1124 ret = qla2x00_full_login_lip(vha); 1123 ret = qla2x00_full_login_lip(vha);
1125 if (ret != QLA_SUCCESS) { 1124 if (ret != QLA_SUCCESS) {
1126 DEBUG2_3(printk("%s(%ld): failed: " 1125 DEBUG2_3(printk("%s(%ld): failed: "
@@ -1133,7 +1132,7 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
1133 qla2x00_wait_for_loop_ready(vha); 1132 qla2x00_wait_for_loop_ready(vha);
1134 } 1133 }
1135 1134
1136 if (ha->flags.enable_lip_reset && !vha->vp_idx) { 1135 if (ha->flags.enable_lip_reset) {
1137 ret = qla2x00_lip_reset(vha); 1136 ret = qla2x00_lip_reset(vha);
1138 if (ret != QLA_SUCCESS) { 1137 if (ret != QLA_SUCCESS) {
1139 DEBUG2_3(printk("%s(%ld): failed: " 1138 DEBUG2_3(printk("%s(%ld): failed: "
@@ -2264,8 +2263,9 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha, int defer)
2264 fc_port_t *fcport; 2263 fc_port_t *fcport;
2265 2264
2266 list_for_each_entry(fcport, &vha->vp_fcports, list) { 2265 list_for_each_entry(fcport, &vha->vp_fcports, list) {
2267 if (vha->vp_idx != fcport->vp_idx) 2266 if (vha->vp_idx != 0 && vha->vp_idx != fcport->vp_idx)
2268 continue; 2267 continue;
2268
2269 /* 2269 /*
2270 * No point in marking the device as lost, if the device is 2270 * No point in marking the device as lost, if the device is
2271 * already DEAD. 2271 * already DEAD.
@@ -2273,10 +2273,12 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha, int defer)
2273 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD) 2273 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD)
2274 continue; 2274 continue;
2275 if (atomic_read(&fcport->state) == FCS_ONLINE) { 2275 if (atomic_read(&fcport->state) == FCS_ONLINE) {
2276 atomic_set(&fcport->state, FCS_DEVICE_LOST); 2276 if (defer)
2277 qla2x00_schedule_rport_del(vha, fcport, defer); 2277 qla2x00_schedule_rport_del(vha, fcport, defer);
2278 } else 2278 else if (vha->vp_idx == fcport->vp_idx)
2279 atomic_set(&fcport->state, FCS_DEVICE_LOST); 2279 qla2x00_schedule_rport_del(vha, fcport, defer);
2280 }
2281 atomic_set(&fcport->state, FCS_DEVICE_LOST);
2280 } 2282 }
2281} 2283}
2282 2284
@@ -3069,8 +3071,7 @@ qla2x00_timer(scsi_qla_host_t *vha)
3069 3071
3070 /* if the loop has been down for 4 minutes, reinit adapter */ 3072 /* if the loop has been down for 4 minutes, reinit adapter */
3071 if (atomic_dec_and_test(&vha->loop_down_timer) != 0) { 3073 if (atomic_dec_and_test(&vha->loop_down_timer) != 0) {
3072 if (!(vha->device_flags & DFLG_NO_CABLE) && 3074 if (!(vha->device_flags & DFLG_NO_CABLE)) {
3073 !vha->vp_idx) {
3074 DEBUG(printk("scsi(%ld): Loop down - " 3075 DEBUG(printk("scsi(%ld): Loop down - "
3075 "aborting ISP.\n", 3076 "aborting ISP.\n",
3076 vha->host_no)); 3077 vha->host_no));