diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2012-05-11 20:49:59 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-05-22 06:06:29 -0400 |
commit | 6192bd7cdc37e2df9391403235b72668a5bf27da (patch) | |
tree | c5e3363c7f3b4a8a4cf74fe1f45bfb67eb93597f /drivers/scsi/bfa | |
parent | e91506dbcfc9e405b2a8013e3a59741bbedce471 (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')
-rw-r--r-- | drivers/scsi/bfa/bfad_attr.c | 17 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfad_im.c | 2 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfad_im.h | 1 |
3 files changed, 19 insertions, 1 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) | |||
426 | vshost = vport->drv_port.im_port->shost; | 426 | vshost = vport->drv_port.im_port->shost; |
427 | fc_host_node_name(vshost) = wwn_to_u64((u8 *)&port_cfg.nwwn); | 427 | fc_host_node_name(vshost) = wwn_to_u64((u8 *)&port_cfg.nwwn); |
428 | fc_host_port_name(vshost) = wwn_to_u64((u8 *)&port_cfg.pwwn); | 428 | fc_host_port_name(vshost) = wwn_to_u64((u8 *)&port_cfg.pwwn); |
429 | fc_host_supported_classes(vshost) = FC_COS_CLASS3; | ||
430 | |||
431 | memset(fc_host_supported_fc4s(vshost), 0, | ||
432 | sizeof(fc_host_supported_fc4s(vshost))); | ||
433 | |||
434 | /* For FCP type 0x08 */ | ||
435 | if (supported_fc4s & BFA_LPORT_ROLE_FCP_IM) | ||
436 | fc_host_supported_fc4s(vshost)[2] = 1; | ||
437 | |||
438 | /* For fibre channel services type 0x20 */ | ||
439 | fc_host_supported_fc4s(vshost)[7] = 1; | ||
440 | |||
441 | fc_host_supported_speeds(vshost) = | ||
442 | bfad_im_supported_speeds(&bfad->bfa); | ||
443 | fc_host_maxframe_size(vshost) = | ||
444 | bfa_fcport_get_maxfrsize(&bfad->bfa); | ||
445 | |||
429 | fc_vport->dd_data = vport; | 446 | fc_vport->dd_data = vport; |
430 | vport->drv_port.im_port->fc_vport = fc_vport; | 447 | vport->drv_port.im_port->fc_vport = fc_vport; |
431 | } else if (rc == BFA_STATUS_INVALID_WWN) | 448 | } else if (rc == BFA_STATUS_INVALID_WWN) |
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 3153923f5b60..1ac09afe35ee 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c | |||
@@ -987,7 +987,7 @@ done: | |||
987 | return 0; | 987 | return 0; |
988 | } | 988 | } |
989 | 989 | ||
990 | static u32 | 990 | u32 |
991 | bfad_im_supported_speeds(struct bfa_s *bfa) | 991 | bfad_im_supported_speeds(struct bfa_s *bfa) |
992 | { | 992 | { |
993 | struct bfa_ioc_attr_s *ioc_attr; | 993 | struct bfa_ioc_attr_s *ioc_attr; |
diff --git a/drivers/scsi/bfa/bfad_im.h b/drivers/scsi/bfa/bfad_im.h index 0814367ef101..f6c1023e502a 100644 --- a/drivers/scsi/bfa/bfad_im.h +++ b/drivers/scsi/bfa/bfad_im.h | |||
@@ -37,6 +37,7 @@ int bfad_im_scsi_host_alloc(struct bfad_s *bfad, | |||
37 | struct bfad_im_port_s *im_port, struct device *dev); | 37 | struct bfad_im_port_s *im_port, struct device *dev); |
38 | void bfad_im_scsi_host_free(struct bfad_s *bfad, | 38 | void bfad_im_scsi_host_free(struct bfad_s *bfad, |
39 | struct bfad_im_port_s *im_port); | 39 | struct bfad_im_port_s *im_port); |
40 | u32 bfad_im_supported_speeds(struct bfa_s *bfa); | ||
40 | 41 | ||
41 | #define MAX_FCP_TARGET 1024 | 42 | #define MAX_FCP_TARGET 1024 |
42 | #define MAX_FCP_LUN 16384 | 43 | #define MAX_FCP_LUN 16384 |