Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38967
b: refs/heads/master
c: 7047fcd
h: refs/heads/master
i:
  38965: a8a44e4
  38963: d77f586
  38959: 1ddee75
v: v3
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Oct 3, 2006
1 parent 8b1a621 commit 6e5143c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90991c85d398fd46b2b07440b5639eb50dfacb2b
refs/heads/master: 7047fcddb1bc96a80fc54ac3a88ea18ca3ae77f6
15 changes: 15 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,19 @@ qla2x00_get_host_fabric_name(struct Scsi_Host *shost)
fc_host_fabric_name(shost) = node_name;
}

static void
qla2x00_get_host_port_state(struct Scsi_Host *shost)
{
scsi_qla_host_t *ha = to_qla_host(shost);

if (!ha->flags.online)
fc_host_port_state(shost) = FC_PORTSTATE_OFFLINE;
else if (atomic_read(&ha->loop_state) == LOOP_TIMEOUT)
fc_host_port_state(shost) = FC_PORTSTATE_UNKNOWN;
else
fc_host_port_state(shost) = FC_PORTSTATE_ONLINE;
}

struct fc_function_template qla2xxx_transport_functions = {

.show_host_node_name = 1,
Expand All @@ -897,6 +910,8 @@ struct fc_function_template qla2xxx_transport_functions = {
.show_host_system_hostname = 1,
.get_host_fabric_name = qla2x00_get_host_fabric_name,
.show_host_fabric_name = 1,
.get_host_port_state = qla2x00_get_host_port_state,
.show_host_port_state = 1,

.dd_fcrport_size = sizeof(struct fc_port *),
.show_rport_supported_classes = 1,
Expand Down

0 comments on commit 6e5143c

Please sign in to comment.