aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-09-12 23:02:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-12 23:02:18 -0400
commit35d91f75c2c9548e606e813413f03c5cc35da969 (patch)
tree2a1a3f32320409303247a72ead35107c271abb17 /drivers/scsi/lpfc/lpfc_attr.c
parent9401c705f2a6a7e5df102f6443dba395c3c5e5a8 (diff)
parent70c83e110541e894fa16aee0f57bcf4207b33e7b (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 0e089a42c03a..86eaf6d408d5 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -966,21 +966,21 @@ static void
966lpfc_get_host_fabric_name (struct Scsi_Host *shost) 966lpfc_get_host_fabric_name (struct Scsi_Host *shost)
967{ 967{
968 struct lpfc_hba *phba = (struct lpfc_hba*)shost->hostdata[0]; 968 struct lpfc_hba *phba = (struct lpfc_hba*)shost->hostdata[0];
969 u64 nodename; 969 u64 node_name;
970 970
971 spin_lock_irq(shost->host_lock); 971 spin_lock_irq(shost->host_lock);
972 972
973 if ((phba->fc_flag & FC_FABRIC) || 973 if ((phba->fc_flag & FC_FABRIC) ||
974 ((phba->fc_topology == TOPOLOGY_LOOP) && 974 ((phba->fc_topology == TOPOLOGY_LOOP) &&
975 (phba->fc_flag & FC_PUBLIC_LOOP))) 975 (phba->fc_flag & FC_PUBLIC_LOOP)))
976 memcpy(&nodename, &phba->fc_fabparam.nodeName, sizeof(u64)); 976 node_name = wwn_to_u64(phba->fc_fabparam.nodeName.wwn);
977 else 977 else
978 /* fabric is local port if there is no F/FL_Port */ 978 /* fabric is local port if there is no F/FL_Port */
979 memcpy(&nodename, &phba->fc_nodename, sizeof(u64)); 979 node_name = wwn_to_u64(phba->fc_nodename.wwn);
980 980
981 spin_unlock_irq(shost->host_lock); 981 spin_unlock_irq(shost->host_lock);
982 982
983 fc_host_fabric_name(shost) = be64_to_cpu(nodename); 983 fc_host_fabric_name(shost) = node_name;
984} 984}
985 985
986 986
@@ -1103,21 +1103,20 @@ lpfc_get_starget_node_name(struct scsi_target *starget)
1103{ 1103{
1104 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); 1104 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
1105 struct lpfc_hba *phba = (struct lpfc_hba *) shost->hostdata[0]; 1105 struct lpfc_hba *phba = (struct lpfc_hba *) shost->hostdata[0];
1106 uint64_t node_name = 0; 1106 u64 node_name = 0;
1107 struct lpfc_nodelist *ndlp = NULL; 1107 struct lpfc_nodelist *ndlp = NULL;
1108 1108
1109 spin_lock_irq(shost->host_lock); 1109 spin_lock_irq(shost->host_lock);
1110 /* Search the mapped list for this target ID */ 1110 /* Search the mapped list for this target ID */
1111 list_for_each_entry(ndlp, &phba->fc_nlpmap_list, nlp_listp) { 1111 list_for_each_entry(ndlp, &phba->fc_nlpmap_list, nlp_listp) {
1112 if (starget->id == ndlp->nlp_sid) { 1112 if (starget->id == ndlp->nlp_sid) {
1113 memcpy(&node_name, &ndlp->nlp_nodename, 1113 node_name = wwn_to_u64(ndlp->nlp_nodename.wwn);
1114 sizeof(struct lpfc_name));
1115 break; 1114 break;
1116 } 1115 }
1117 } 1116 }
1118 spin_unlock_irq(shost->host_lock); 1117 spin_unlock_irq(shost->host_lock);
1119 1118
1120 fc_starget_node_name(starget) = be64_to_cpu(node_name); 1119 fc_starget_node_name(starget) = node_name;
1121} 1120}
1122 1121
1123static void 1122static void
@@ -1125,21 +1124,20 @@ lpfc_get_starget_port_name(struct scsi_target *starget)
1125{ 1124{
1126 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); 1125 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
1127 struct lpfc_hba *phba = (struct lpfc_hba *) shost->hostdata[0]; 1126 struct lpfc_hba *phba = (struct lpfc_hba *) shost->hostdata[0];
1128 uint64_t port_name = 0; 1127 u64 port_name = 0;
1129 struct lpfc_nodelist *ndlp = NULL; 1128 struct lpfc_nodelist *ndlp = NULL;
1130 1129
1131 spin_lock_irq(shost->host_lock); 1130 spin_lock_irq(shost->host_lock);
1132 /* Search the mapped list for this target ID */ 1131 /* Search the mapped list for this target ID */
1133 list_for_each_entry(ndlp, &phba->fc_nlpmap_list, nlp_listp) { 1132 list_for_each_entry(ndlp, &phba->fc_nlpmap_list, nlp_listp) {
1134 if (starget->id == ndlp->nlp_sid) { 1133 if (starget->id == ndlp->nlp_sid) {
1135 memcpy(&port_name, &ndlp->nlp_portname, 1134 port_name = wwn_to_u64(ndlp->nlp_portname.wwn);
1136 sizeof(struct lpfc_name));
1137 break; 1135 break;
1138 } 1136 }
1139 } 1137 }
1140 spin_unlock_irq(shost->host_lock); 1138 spin_unlock_irq(shost->host_lock);
1141 1139
1142 fc_starget_port_name(starget) = be64_to_cpu(port_name); 1140 fc_starget_port_name(starget) = port_name;
1143} 1141}
1144 1142
1145static void 1143static void