Commit 827210ba authored by Joe Carnuccio's avatar Joe Carnuccio Committed by James Bottomley

[SCSI] Revert "[SCSI] qla2xxx: Optimize existing port name server query matching."

This reverts commit c0822b63.
Signed-off-by: default avatarJoe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent e452ceb6
...@@ -1848,9 +1848,6 @@ typedef struct fc_port { ...@@ -1848,9 +1848,6 @@ typedef struct fc_port {
uint8_t scan_state; uint8_t scan_state;
} fc_port_t; } fc_port_t;
#define QLA_FCPORT_SCAN_NONE 0
#define QLA_FCPORT_SCAN_FOUND 1
/* /*
* Fibre channel port/lun states. * Fibre channel port/lun states.
*/ */
......
...@@ -2746,7 +2746,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags) ...@@ -2746,7 +2746,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
fcport->loop_id = FC_NO_LOOP_ID; fcport->loop_id = FC_NO_LOOP_ID;
qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED);
fcport->supported_classes = FC_COS_UNSPECIFIED; fcport->supported_classes = FC_COS_UNSPECIFIED;
fcport->scan_state = QLA_FCPORT_SCAN_NONE;
return fcport; return fcport;
} }
...@@ -3229,6 +3228,13 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha) ...@@ -3229,6 +3228,13 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha)
} }
} }
#define QLA_FCPORT_SCAN 1
#define QLA_FCPORT_FOUND 2
list_for_each_entry(fcport, &vha->vp_fcports, list) {
fcport->scan_state = QLA_FCPORT_SCAN;
}
rval = qla2x00_find_all_fabric_devs(vha, &new_fcports); rval = qla2x00_find_all_fabric_devs(vha, &new_fcports);
if (rval != QLA_SUCCESS) if (rval != QLA_SUCCESS)
break; break;
...@@ -3244,7 +3250,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha) ...@@ -3244,7 +3250,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha)
if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) if ((fcport->flags & FCF_FABRIC_DEVICE) == 0)
continue; continue;
if (fcport->scan_state != QLA_FCPORT_SCAN_FOUND && if (fcport->scan_state == QLA_FCPORT_SCAN &&
atomic_read(&fcport->state) == FCS_ONLINE) { atomic_read(&fcport->state) == FCS_ONLINE) {
qla2x00_mark_device_lost(vha, fcport, qla2x00_mark_device_lost(vha, fcport,
ql2xplogiabsentdevice, 0); ql2xplogiabsentdevice, 0);
...@@ -3259,9 +3265,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha) ...@@ -3259,9 +3265,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha)
fcport->d_id.b.al_pa); fcport->d_id.b.al_pa);
fcport->loop_id = FC_NO_LOOP_ID; fcport->loop_id = FC_NO_LOOP_ID;
} }
continue;
} }
fcport->scan_state = QLA_FCPORT_SCAN_NONE;
} }
/* Starting free loop ID. */ /* Starting free loop ID. */
...@@ -3516,7 +3520,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha, ...@@ -3516,7 +3520,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha,
WWN_SIZE)) WWN_SIZE))
continue; continue;
fcport->scan_state = QLA_FCPORT_SCAN_FOUND; fcport->scan_state = QLA_FCPORT_FOUND;
found++; found++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment