Skip to content

Commit 2f2fa13

Browse files
Shyam SundarJames Bottomley
authored andcommitted
[SCSI] qla2xxx: Return correct port_type to FC-transport for Vports.
For Vports, the port_type should be set to FC_PORTTYPE_NPIV. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent 8f40f67 commit 2f2fa13

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/scsi/qla2xxx/qla_attr.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,9 +886,13 @@ qla2x00_get_host_speed(struct Scsi_Host *shost)
886886
static void
887887
qla2x00_get_host_port_type(struct Scsi_Host *shost)
888888
{
889-
scsi_qla_host_t *ha = to_qla_parent(shost_priv(shost));
889+
scsi_qla_host_t *ha = shost_priv(shost);
890890
uint32_t port_type = FC_PORTTYPE_UNKNOWN;
891891

892+
if (ha->parent) {
893+
fc_host_port_type(shost) = FC_PORTTYPE_NPIV;
894+
return;
895+
}
892896
switch (ha->current_topology) {
893897
case ISP_CFG_NL:
894898
port_type = FC_PORTTYPE_LPORT;

0 commit comments

Comments
 (0)