aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2010-07-23 06:28:25 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:06:09 -0400
commite8c72ba51a159f5d1cb195d3fb47262c782939d9 (patch)
tree7ea9c96011386e4c36b9bb2c35da55ae7160fcb9 /drivers/scsi/qla2xxx/qla_init.c
parent2f0f3f4f06f7cfadebf58b70bd9e7f71d8fd96e4 (diff)
[SCSI] qla2xxx: Use GFF_ID to check FCP-SCSI FC4 type before logging into Nx_Ports
The default method that qla2xxx uses is the GID_PT nameserver command to get a list of Nx_Ports. This patch adds a GFF_ID call for each port returned by GID_PT to get the FC4 type. If the FC4 type is not FCP SCSI then the qla2xxx driver will not record that port in it's port database. For switches that do not support the GFF_ID command, the behavior will be for qla2xxx to store that port anyways. 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_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index cea491bf0fc0..685c350007b0 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -3078,7 +3078,6 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha)
3078 return (rval); 3078 return (rval);
3079} 3079}
3080 3080
3081
3082/* 3081/*
3083 * qla2x00_find_all_fabric_devs 3082 * qla2x00_find_all_fabric_devs
3084 * 3083 *
@@ -3131,6 +3130,10 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha,
3131 qla2x00_gfpn_id(vha, swl) == QLA_SUCCESS) { 3130 qla2x00_gfpn_id(vha, swl) == QLA_SUCCESS) {
3132 qla2x00_gpsc(vha, swl); 3131 qla2x00_gpsc(vha, swl);
3133 } 3132 }
3133
3134 /* If other queries succeeded probe for FC-4 type */
3135 if (swl)
3136 qla2x00_gff_id(vha, swl);
3134 } 3137 }
3135 swl_idx = 0; 3138 swl_idx = 0;
3136 3139
@@ -3172,6 +3175,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha,
3172 memcpy(new_fcport->fabric_port_name, 3175 memcpy(new_fcport->fabric_port_name,
3173 swl[swl_idx].fabric_port_name, WWN_SIZE); 3176 swl[swl_idx].fabric_port_name, WWN_SIZE);
3174 new_fcport->fp_speed = swl[swl_idx].fp_speed; 3177 new_fcport->fp_speed = swl[swl_idx].fp_speed;
3178 new_fcport->fc4_type = swl[swl_idx].fc4_type;
3175 3179
3176 if (swl[swl_idx].d_id.b.rsvd_1 != 0) { 3180 if (swl[swl_idx].d_id.b.rsvd_1 != 0) {
3177 last_dev = 1; 3181 last_dev = 1;
@@ -3233,6 +3237,11 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha,
3233 if ((new_fcport->d_id.b.domain & 0xf0) == 0xf0) 3237 if ((new_fcport->d_id.b.domain & 0xf0) == 0xf0)
3234 continue; 3238 continue;
3235 3239
3240 /* Bypass ports whose FCP-4 type is not FCP_SCSI */
3241 if (new_fcport->fc4_type != FC4_TYPE_FCP_SCSI &&
3242 new_fcport->fc4_type != FC4_TYPE_UNKNOWN)
3243 continue;
3244
3236 /* Locate matching device in database. */ 3245 /* Locate matching device in database. */
3237 found = 0; 3246 found = 0;
3238 list_for_each_entry(fcport, &vha->vp_fcports, list) { 3247 list_for_each_entry(fcport, &vha->vp_fcports, list) {