summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2008-04-03 13:13:16 -0700
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-07 12:19:13 -0500
commit5ab5a4dd5444db0715b5748bab916725138d3a32 (patch)
tree0e1b6d389332506fa3848c259bc70e94b1b4bc66 /drivers/scsi/qla2xxx/qla_attr.c
parent0ddda2d1529f2d01d3b043782d2efcf0499fc3db (diff)
[SCSI] qla2xxx: Use an rport's scsi_target_id member consistently throughout driver.
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>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index aee03221ed6e..798cc613c44a 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -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;