diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index e03140fec179..55016328bd78 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -446,6 +446,29 @@ qla2x00_get_host_speed(struct Scsi_Host *shost) | |||
446 | } | 446 | } |
447 | 447 | ||
448 | static void | 448 | static void |
449 | qla2x00_get_host_port_type(struct Scsi_Host *shost) | ||
450 | { | ||
451 | scsi_qla_host_t *ha = to_qla_host(shost); | ||
452 | uint32_t port_type = FC_PORTTYPE_UNKNOWN; | ||
453 | |||
454 | switch (ha->current_topology) { | ||
455 | case ISP_CFG_NL: | ||
456 | port_type = FC_PORTTYPE_LPORT; | ||
457 | break; | ||
458 | case ISP_CFG_FL: | ||
459 | port_type = FC_PORTTYPE_NLPORT; | ||
460 | break; | ||
461 | case ISP_CFG_N: | ||
462 | port_type = FC_PORTTYPE_PTP; | ||
463 | break; | ||
464 | case ISP_CFG_F: | ||
465 | port_type = FC_PORTTYPE_NPORT; | ||
466 | break; | ||
467 | } | ||
468 | fc_host_port_type(shost) = port_type; | ||
469 | } | ||
470 | |||
471 | static void | ||
449 | qla2x00_get_starget_node_name(struct scsi_target *starget) | 472 | qla2x00_get_starget_node_name(struct scsi_target *starget) |
450 | { | 473 | { |
451 | struct Scsi_Host *host = dev_to_shost(starget->dev.parent); | 474 | struct Scsi_Host *host = dev_to_shost(starget->dev.parent); |
@@ -542,6 +565,8 @@ struct fc_function_template qla2xxx_transport_functions = { | |||
542 | .show_host_port_id = 1, | 565 | .show_host_port_id = 1, |
543 | .get_host_speed = qla2x00_get_host_speed, | 566 | .get_host_speed = qla2x00_get_host_speed, |
544 | .show_host_speed = 1, | 567 | .show_host_speed = 1, |
568 | .get_host_port_type = qla2x00_get_host_port_type, | ||
569 | .show_host_port_type = 1, | ||
545 | 570 | ||
546 | .dd_fcrport_size = sizeof(struct fc_port *), | 571 | .dd_fcrport_size = sizeof(struct fc_port *), |
547 | .show_rport_supported_classes = 1, | 572 | .show_rport_supported_classes = 1, |