]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] qla2xxx: Use an rport's scsi_target_id member consistently throughout driver.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Thu, 3 Apr 2008 20:13:16 +0000 (13:13 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 7 Apr 2008 17:19:13 +0000 (12:19 -0500)
Rather than using a duplicate/cached value stored in the driver's
internal fcport structure.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_init.c

index aee03221ed6ed43c0ac8318ee09ec782c6ef8493..798cc613c44a5ddf507b37c1a72d3c71d4f2ac51 100644 (file)
@@ -900,7 +900,8 @@ qla2x00_get_starget_node_name(struct scsi_target *starget)
        u64 node_name = 0;
 
        list_for_each_entry(fcport, &ha->fcports, list) {
-               if (starget->id == fcport->os_target_id) {
+               if (fcport->rport &&
+                   starget->id == fcport->rport->scsi_target_id) {
                        node_name = wwn_to_u64(fcport->node_name);
                        break;
                }
@@ -918,7 +919,8 @@ qla2x00_get_starget_port_name(struct scsi_target *starget)
        u64 port_name = 0;
 
        list_for_each_entry(fcport, &ha->fcports, list) {
-               if (starget->id == fcport->os_target_id) {
+               if (fcport->rport &&
+                   starget->id == fcport->rport->scsi_target_id) {
                        port_name = wwn_to_u64(fcport->port_name);
                        break;
                }
@@ -936,7 +938,8 @@ qla2x00_get_starget_port_id(struct scsi_target *starget)
        uint32_t port_id = ~0U;
 
        list_for_each_entry(fcport, &ha->fcports, list) {
-               if (starget->id == fcport->os_target_id) {
+               if (fcport->rport &&
+                   starget->id == fcport->rport->scsi_target_id) {
                        port_id = fcport->d_id.b.domain << 16 |
                            fcport->d_id.b.area << 8 | fcport->d_id.b.al_pa;
                        break;
index aa9d2163cdf2ba832959ceab278c22dd1900ed88..f70c78b6f364423e6fdf0b71e0cc1b2bcf0bec12 100644 (file)
@@ -1542,8 +1542,6 @@ typedef struct fc_port {
        atomic_t state;
        uint32_t flags;
 
-       unsigned int os_target_id;
-
        int port_login_retry_count;
        int login_retry;
        atomic_t port_down_timer;
index 9b7ad590eb016c8d515525658a0646bfc4cac5d0..e773697cd8d5d5d8eeaefa856ad9d0b678c57880 100644 (file)
@@ -2251,10 +2251,6 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport)
        if (fcport->port_type == FCT_TARGET)
                rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
        fc_remote_port_rolechg(rport, rport_ids.roles);
-
-       if (rport->scsi_target_id != -1 &&
-           rport->scsi_target_id < ha->host->max_id)
-               fcport->os_target_id = rport->scsi_target_id;
 }
 
 /*