[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>

authored by

Jing Huang and committed by
James Bottomley
e0a08a30 53440260

+15 -32
+1 -1
drivers/scsi/bfa/bfa_defs_fcs.h
··· 93 93 wwn_t pwwn; /* port wwn */ 94 94 wwn_t nwwn; /* node wwn */ 95 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 97 enum bfa_lport_role roles; /* FCS port roles */ 98 98 u8 tag[16]; /* opaque tag from application */ 99 99 };
-17
drivers/scsi/bfa/bfad.c
··· 861 861 pci_set_drvdata(pdev, NULL); 862 862 } 863 863 864 - void 865 - bfad_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 - 878 864 bfa_status_t 879 865 bfad_drv_init(struct bfad_s *bfad) 880 866 { ··· 1050 1064 bfa_fcs_driver_info_init(&bfad->bfa_fcs, &driver_info); 1051 1065 bfa_fcs_init(&bfad->bfa_fcs); 1052 1066 spin_unlock_irqrestore(&bfad->bfad_lock, flags); 1053 - 1054 - /* PPORT FCS config */ 1055 - bfad_fcs_port_cfg(bfad); 1056 1067 1057 1068 retval = bfad_cfg_pport(bfad, BFA_LPORT_ROLE_FCP_IM); 1058 1069 if (retval != BFA_STATUS_OK) {
-1
drivers/scsi/bfa/bfad_drv.h
··· 309 309 void bfad_init_timer(struct bfad_s *bfad); 310 310 int bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad); 311 311 void bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad); 312 - void bfad_fcs_port_cfg(struct bfad_s *bfad); 313 312 void bfad_drv_uninit(struct bfad_s *bfad); 314 313 int bfad_worker(void *ptr); 315 314 void bfad_debugfs_init(struct bfad_port_s *port);
+14 -13
drivers/scsi/bfa/bfad_im.c
··· 915 915 static u32 916 916 bfad_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 919 u32 supported_speed = 0; 920 920 921 - bfa_get_attr(bfa, &ioc_attr); 922 - if (ioc_attr.adapter_attr.max_speed == BFA_PORT_SPEED_8GBPS) { 923 - if (ioc_attr.adapter_attr.is_mezz) { 921 + ioc_attr = kzalloc(sizeof(struct bfa_ioc_attr_s), GFP_KERNEL); 922 + if (!ioc_attr) 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 928 supported_speed |= FC_PORTSPEED_8GBIT | 925 929 FC_PORTSPEED_4GBIT | 926 930 FC_PORTSPEED_2GBIT | FC_PORTSPEED_1GBIT; ··· 933 929 FC_PORTSPEED_4GBIT | 934 930 FC_PORTSPEED_2GBIT; 935 931 } 936 - } else if (ioc_attr.adapter_attr.max_speed == BFA_PORT_SPEED_4GBPS) { 932 + } else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_4GBPS) { 937 933 supported_speed |= FC_PORTSPEED_4GBIT | FC_PORTSPEED_2GBIT | 938 934 FC_PORTSPEED_1GBIT; 939 - } else if (ioc_attr.adapter_attr.max_speed == BFA_PORT_SPEED_10GBPS) { 935 + } else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_10GBPS) { 940 936 supported_speed |= FC_PORTSPEED_10GBIT; 941 937 } 938 + kfree(ioc_attr); 942 939 return supported_speed; 943 940 } 944 941 ··· 949 944 struct Scsi_Host *host = im_port->shost; 950 945 struct bfad_s *bfad = im_port->bfad; 951 946 struct bfad_port_s *port = im_port->port; 952 - struct bfa_port_attr_s pattr; 953 - struct bfa_lport_attr_s port_attr; 954 947 char symname[BFA_SYMNAME_MAXLEN]; 948 + struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(&bfad->bfa); 955 949 956 950 fc_host_node_name(host) = 957 951 cpu_to_be64((bfa_fcs_lport_get_nwwn(port->fcs_port))); ··· 968 964 /* For fibre channel services type 0x20 */ 969 965 fc_host_supported_fc4s(host)[7] = 1; 970 966 971 - bfa_fcs_lport_get_attr(&bfad->bfa_fcs.fabric.bport, &port_attr); 972 - strncpy(symname, port_attr.port_cfg.sym_name.symname, 967 + strncpy(symname, bfad->bfa_fcs.fabric.bport.port_cfg.sym_name.symname, 973 968 BFA_SYMNAME_MAXLEN); 974 969 sprintf(fc_host_symbolic_name(host), "%s", symname); 975 970 976 971 fc_host_supported_speeds(host) = bfad_im_supported_speeds(&bfad->bfa); 977 - 978 - bfa_fcport_get_attr(&bfad->bfa, &pattr); 979 - fc_host_maxframe_size(host) = pattr.pport_cfg.maxfrsize; 972 + fc_host_maxframe_size(host) = fcport->cfg.maxfrsize; 980 973 } 981 974 982 975 static void