summaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa/bfad_attr.c
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2012-05-11 17:49:59 -0700
committerJames Bottomley <JBottomley@Parallels.com>2012-05-22 11:06:29 +0100
commit6192bd7cdc37e2df9391403235b72668a5bf27da (patch)
treec5e3363c7f3b4a8a4cf74fe1f45bfb67eb93597f /drivers/scsi/bfa/bfad_attr.c
parente91506dbcfc9e405b2a8013e3a59741bbedce471 (diff)
[SCSI] bfa: Fix to set vport FC host sysfs entries
Made changes to set the fc_host sysfs entries supported_speeds, supported_classes etc., during the vport creation from the FC transport template. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfad_attr.c')
-rw-r--r--drivers/scsi/bfa/bfad_attr.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c
index 8b6c6bf7837e..b83927440171 100644
--- a/drivers/scsi/bfa/bfad_attr.c
+++ b/drivers/scsi/bfa/bfad_attr.c
@@ -426,6 +426,23 @@ bfad_im_vport_create(struct fc_vport *fc_vport, bool disable)
vshost = vport->drv_port.im_port->shost;
fc_host_node_name(vshost) = wwn_to_u64((u8 *)&port_cfg.nwwn);
fc_host_port_name(vshost) = wwn_to_u64((u8 *)&port_cfg.pwwn);
+ fc_host_supported_classes(vshost) = FC_COS_CLASS3;
+
+ memset(fc_host_supported_fc4s(vshost), 0,
+ sizeof(fc_host_supported_fc4s(vshost)));
+
+ /* For FCP type 0x08 */
+ if (supported_fc4s & BFA_LPORT_ROLE_FCP_IM)
+ fc_host_supported_fc4s(vshost)[2] = 1;
+
+ /* For fibre channel services type 0x20 */
+ fc_host_supported_fc4s(vshost)[7] = 1;
+
+ fc_host_supported_speeds(vshost) =
+ bfad_im_supported_speeds(&bfad->bfa);
+ fc_host_maxframe_size(vshost) =
+ bfa_fcport_get_maxfrsize(&bfad->bfa);
+
fc_vport->dd_data = vport;
vport->drv_port.im_port->fc_vport = fc_vport;
} else if (rc == BFA_STATUS_INVALID_WWN)