aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-10-18 20:14:01 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-25 17:25:35 -0400
commite0a08a30c9451333c9c4a8981fbfccc80b87ce78 (patch)
tree6ec318b2d48eb6206a1e584e78873044b0712b4a /drivers/scsi
parent5344026065f79b102fcc44bc6332f856a111962a (diff)
[SCSI] bfa: fix frame size over 1024 compile warning
Fix compile warning for frame size over 1024 in gcc 4.4. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/bfa/bfa_defs_fcs.h2
-rw-r--r--drivers/scsi/bfa/bfad.c17
-rw-r--r--drivers/scsi/bfa/bfad_drv.h1
-rw-r--r--drivers/scsi/bfa/bfad_im.c27
4 files changed, 15 insertions, 32 deletions
diff --git a/drivers/scsi/bfa/bfa_defs_fcs.h b/drivers/scsi/bfa/bfa_defs_fcs.h
index 96905d301828..ae06258bda0b 100644
--- a/drivers/scsi/bfa/bfa_defs_fcs.h
+++ b/drivers/scsi/bfa/bfa_defs_fcs.h
@@ -93,7 +93,7 @@ struct bfa_lport_cfg_s {
93 wwn_t pwwn; /* port wwn */ 93 wwn_t pwwn; /* port wwn */
94 wwn_t nwwn; /* node wwn */ 94 wwn_t nwwn; /* node wwn */
95 struct bfa_lport_symname_s sym_name; /* vm port symbolic name */ 95 struct bfa_lport_symname_s sym_name; /* vm port symbolic name */
96 bfa_boolean_t preboot_vp; /* vport created from PBC */ 96 bfa_boolean_t preboot_vp; /* vport created from PBC */
97 enum bfa_lport_role roles; /* FCS port roles */ 97 enum bfa_lport_role roles; /* FCS port roles */
98 u8 tag[16]; /* opaque tag from application */ 98 u8 tag[16]; /* opaque tag from application */
99}; 99};
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index d3966bcfa205..79f8b86e30e3 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -861,20 +861,6 @@ bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad)
861 pci_set_drvdata(pdev, NULL); 861 pci_set_drvdata(pdev, NULL);
862} 862}
863 863
864void
865bfad_fcs_port_cfg(struct bfad_s *bfad)
866{
867 struct bfa_lport_cfg_s port_cfg;
868 struct bfa_port_attr_s attr;
869 char symname[BFA_SYMNAME_MAXLEN];
870
871 sprintf(symname, "%s-%d", BFAD_DRIVER_NAME, bfad->inst_no);
872 memcpy(port_cfg.sym_name.symname, symname, strlen(symname));
873 bfa_fcport_get_attr(&bfad->bfa, &attr);
874 port_cfg.nwwn = attr.nwwn;
875 port_cfg.pwwn = attr.pwwn;
876}
877
878bfa_status_t 864bfa_status_t
879bfad_drv_init(struct bfad_s *bfad) 865bfad_drv_init(struct bfad_s *bfad)
880{ 866{
@@ -1065,9 +1051,6 @@ bfad_start_ops(struct bfad_s *bfad) {
1065 bfa_fcs_init(&bfad->bfa_fcs); 1051 bfa_fcs_init(&bfad->bfa_fcs);
1066 spin_unlock_irqrestore(&bfad->bfad_lock, flags); 1052 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1067 1053
1068 /* PPORT FCS config */
1069 bfad_fcs_port_cfg(bfad);
1070
1071 retval = bfad_cfg_pport(bfad, BFA_LPORT_ROLE_FCP_IM); 1054 retval = bfad_cfg_pport(bfad, BFA_LPORT_ROLE_FCP_IM);
1072 if (retval != BFA_STATUS_OK) { 1055 if (retval != BFA_STATUS_OK) {
1073 if (bfa_sm_cmp_state(bfad, bfad_sm_initializing)) 1056 if (bfa_sm_cmp_state(bfad, bfad_sm_initializing))
diff --git a/drivers/scsi/bfa/bfad_drv.h b/drivers/scsi/bfa/bfad_drv.h
index 98420bbb4f3f..a9045a8fcbb7 100644
--- a/drivers/scsi/bfa/bfad_drv.h
+++ b/drivers/scsi/bfa/bfad_drv.h
@@ -309,7 +309,6 @@ void bfad_bfa_tmo(unsigned long data);
309void bfad_init_timer(struct bfad_s *bfad); 309void bfad_init_timer(struct bfad_s *bfad);
310int bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad); 310int bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad);
311void bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad); 311void bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad);
312void bfad_fcs_port_cfg(struct bfad_s *bfad);
313void bfad_drv_uninit(struct bfad_s *bfad); 312void bfad_drv_uninit(struct bfad_s *bfad);
314int bfad_worker(void *ptr); 313int bfad_worker(void *ptr);
315void bfad_debugfs_init(struct bfad_port_s *port); 314void bfad_debugfs_init(struct bfad_port_s *port);
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c
index 236922bc9e40..7a6f48b277c2 100644
--- a/drivers/scsi/bfa/bfad_im.c
+++ b/drivers/scsi/bfa/bfad_im.c
@@ -915,12 +915,16 @@ bfad_im_slave_alloc(struct scsi_device *sdev)
915static u32 915static u32
916bfad_im_supported_speeds(struct bfa_s *bfa) 916bfad_im_supported_speeds(struct bfa_s *bfa)
917{ 917{
918 struct bfa_ioc_attr_s ioc_attr; 918 struct bfa_ioc_attr_s *ioc_attr;
919 u32 supported_speed = 0; 919 u32 supported_speed = 0;
920 920
921 bfa_get_attr(bfa, &ioc_attr); 921 ioc_attr = kzalloc(sizeof(struct bfa_ioc_attr_s), GFP_KERNEL);
922 if (ioc_attr.adapter_attr.max_speed == BFA_PORT_SPEED_8GBPS) { 922 if (!ioc_attr)
923 if (ioc_attr.adapter_attr.is_mezz) { 923 return 0;
924
925 bfa_get_attr(bfa, ioc_attr);
926 if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_8GBPS) {
927 if (ioc_attr->adapter_attr.is_mezz) {
924 supported_speed |= FC_PORTSPEED_8GBIT | 928 supported_speed |= FC_PORTSPEED_8GBIT |
925 FC_PORTSPEED_4GBIT | 929 FC_PORTSPEED_4GBIT |
926 FC_PORTSPEED_2GBIT | FC_PORTSPEED_1GBIT; 930 FC_PORTSPEED_2GBIT | FC_PORTSPEED_1GBIT;
@@ -929,12 +933,13 @@ bfad_im_supported_speeds(struct bfa_s *bfa)
929 FC_PORTSPEED_4GBIT | 933 FC_PORTSPEED_4GBIT |
930 FC_PORTSPEED_2GBIT; 934 FC_PORTSPEED_2GBIT;
931 } 935 }
932 } else if (ioc_attr.adapter_attr.max_speed == BFA_PORT_SPEED_4GBPS) { 936 } else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_4GBPS) {
933 supported_speed |= FC_PORTSPEED_4GBIT | FC_PORTSPEED_2GBIT | 937 supported_speed |= FC_PORTSPEED_4GBIT | FC_PORTSPEED_2GBIT |
934 FC_PORTSPEED_1GBIT; 938 FC_PORTSPEED_1GBIT;
935 } else if (ioc_attr.adapter_attr.max_speed == BFA_PORT_SPEED_10GBPS) { 939 } else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_10GBPS) {
936 supported_speed |= FC_PORTSPEED_10GBIT; 940 supported_speed |= FC_PORTSPEED_10GBIT;
937 } 941 }
942 kfree(ioc_attr);
938 return supported_speed; 943 return supported_speed;
939} 944}
940 945
@@ -944,9 +949,8 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port)
944 struct Scsi_Host *host = im_port->shost; 949 struct Scsi_Host *host = im_port->shost;
945 struct bfad_s *bfad = im_port->bfad; 950 struct bfad_s *bfad = im_port->bfad;
946 struct bfad_port_s *port = im_port->port; 951 struct bfad_port_s *port = im_port->port;
947 struct bfa_port_attr_s pattr;
948 struct bfa_lport_attr_s port_attr;
949 char symname[BFA_SYMNAME_MAXLEN]; 952 char symname[BFA_SYMNAME_MAXLEN];
953 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(&bfad->bfa);
950 954
951 fc_host_node_name(host) = 955 fc_host_node_name(host) =
952 cpu_to_be64((bfa_fcs_lport_get_nwwn(port->fcs_port))); 956 cpu_to_be64((bfa_fcs_lport_get_nwwn(port->fcs_port)));
@@ -964,15 +968,12 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port)
964 /* For fibre channel services type 0x20 */ 968 /* For fibre channel services type 0x20 */
965 fc_host_supported_fc4s(host)[7] = 1; 969 fc_host_supported_fc4s(host)[7] = 1;
966 970
967 bfa_fcs_lport_get_attr(&bfad->bfa_fcs.fabric.bport, &port_attr); 971 strncpy(symname, bfad->bfa_fcs.fabric.bport.port_cfg.sym_name.symname,
968 strncpy(symname, port_attr.port_cfg.sym_name.symname,
969 BFA_SYMNAME_MAXLEN); 972 BFA_SYMNAME_MAXLEN);
970 sprintf(fc_host_symbolic_name(host), "%s", symname); 973 sprintf(fc_host_symbolic_name(host), "%s", symname);
971 974
972 fc_host_supported_speeds(host) = bfad_im_supported_speeds(&bfad->bfa); 975 fc_host_supported_speeds(host) = bfad_im_supported_speeds(&bfad->bfa);
973 976 fc_host_maxframe_size(host) = fcport->cfg.maxfrsize;
974 bfa_fcport_get_attr(&bfad->bfa, &pattr);
975 fc_host_maxframe_size(host) = pattr.pport_cfg.maxfrsize;
976} 977}
977 978
978static void 979static void