aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c18
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c4
2 files changed, 10 insertions, 12 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index fe0fce71adc7..fc25cd834668 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -360,16 +360,16 @@ qla2x00_get_starget_node_name(struct scsi_target *starget)
360 struct Scsi_Host *host = dev_to_shost(starget->dev.parent); 360 struct Scsi_Host *host = dev_to_shost(starget->dev.parent);
361 scsi_qla_host_t *ha = to_qla_host(host); 361 scsi_qla_host_t *ha = to_qla_host(host);
362 fc_port_t *fcport; 362 fc_port_t *fcport;
363 uint64_t node_name = 0; 363 u64 node_name = 0;
364 364
365 list_for_each_entry(fcport, &ha->fcports, list) { 365 list_for_each_entry(fcport, &ha->fcports, list) {
366 if (starget->id == fcport->os_target_id) { 366 if (starget->id == fcport->os_target_id) {
367 node_name = *(uint64_t *)fcport->node_name; 367 node_name = wwn_to_u64(fcport->node_name);
368 break; 368 break;
369 } 369 }
370 } 370 }
371 371
372 fc_starget_node_name(starget) = be64_to_cpu(node_name); 372 fc_starget_node_name(starget) = node_name;
373} 373}
374 374
375static void 375static void
@@ -378,16 +378,16 @@ qla2x00_get_starget_port_name(struct scsi_target *starget)
378 struct Scsi_Host *host = dev_to_shost(starget->dev.parent); 378 struct Scsi_Host *host = dev_to_shost(starget->dev.parent);
379 scsi_qla_host_t *ha = to_qla_host(host); 379 scsi_qla_host_t *ha = to_qla_host(host);
380 fc_port_t *fcport; 380 fc_port_t *fcport;
381 uint64_t port_name = 0; 381 u64 port_name = 0;
382 382
383 list_for_each_entry(fcport, &ha->fcports, list) { 383 list_for_each_entry(fcport, &ha->fcports, list) {
384 if (starget->id == fcport->os_target_id) { 384 if (starget->id == fcport->os_target_id) {
385 port_name = *(uint64_t *)fcport->port_name; 385 port_name = wwn_to_u64(fcport->port_name);
386 break; 386 break;
387 } 387 }
388 } 388 }
389 389
390 fc_starget_port_name(starget) = be64_to_cpu(port_name); 390 fc_starget_port_name(starget) = port_name;
391} 391}
392 392
393static void 393static void
@@ -460,9 +460,7 @@ struct fc_function_template qla2xxx_transport_functions = {
460void 460void
461qla2x00_init_host_attr(scsi_qla_host_t *ha) 461qla2x00_init_host_attr(scsi_qla_host_t *ha)
462{ 462{
463 fc_host_node_name(ha->host) = 463 fc_host_node_name(ha->host) = wwn_to_u64(ha->init_cb->node_name);
464 be64_to_cpu(*(uint64_t *)ha->init_cb->node_name); 464 fc_host_port_name(ha->host) = wwn_to_u64(ha->init_cb->port_name);
465 fc_host_port_name(ha->host) =
466 be64_to_cpu(*(uint64_t *)ha->init_cb->port_name);
467 fc_host_supported_classes(ha->host) = FC_COS_CLASS3; 465 fc_host_supported_classes(ha->host) = FC_COS_CLASS3;
468} 466}
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index c619583e646b..3e9b64137873 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2066,8 +2066,8 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport)
2066 return; 2066 return;
2067 } 2067 }
2068 2068
2069 rport_ids.node_name = be64_to_cpu(*(uint64_t *)fcport->node_name); 2069 rport_ids.node_name = wwn_to_u64(fcport->node_name);
2070 rport_ids.port_name = be64_to_cpu(*(uint64_t *)fcport->port_name); 2070 rport_ids.port_name = wwn_to_u64(fcport->port_name);
2071 rport_ids.port_id = fcport->d_id.b.domain << 16 | 2071 rport_ids.port_id = fcport->d_id.b.domain << 16 |
2072 fcport->d_id.b.area << 8 | fcport->d_id.b.al_pa; 2072 fcport->d_id.b.area << 8 | fcport->d_id.b.al_pa;
2073 rport_ids.roles = FC_RPORT_ROLE_UNKNOWN; 2073 rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;