diff options
Diffstat (limited to 'drivers/scsi/bfa/bfad_im.c')
| -rw-r--r-- | drivers/scsi/bfa/bfad_im.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 23390b40b9c3..cee3d89d1412 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c | |||
| @@ -167,17 +167,15 @@ bfad_im_info(struct Scsi_Host *shost) | |||
| 167 | static char bfa_buf[256]; | 167 | static char bfa_buf[256]; |
| 168 | struct bfad_im_port_s *im_port = | 168 | struct bfad_im_port_s *im_port = |
| 169 | (struct bfad_im_port_s *) shost->hostdata[0]; | 169 | (struct bfad_im_port_s *) shost->hostdata[0]; |
| 170 | struct bfa_ioc_attr_s ioc_attr; | ||
| 171 | struct bfad_s *bfad = im_port->bfad; | 170 | struct bfad_s *bfad = im_port->bfad; |
| 171 | char model[BFA_ADAPTER_MODEL_NAME_LEN]; | ||
| 172 | 172 | ||
| 173 | memset(&ioc_attr, 0, sizeof(ioc_attr)); | 173 | bfa_get_adapter_model(&bfad->bfa, model); |
| 174 | bfa_get_attr(&bfad->bfa, &ioc_attr); | ||
| 175 | 174 | ||
| 176 | memset(bfa_buf, 0, sizeof(bfa_buf)); | 175 | memset(bfa_buf, 0, sizeof(bfa_buf)); |
| 177 | snprintf(bfa_buf, sizeof(bfa_buf), | 176 | snprintf(bfa_buf, sizeof(bfa_buf), |
| 178 | "Brocade FC/FCOE Adapter, " "model: %s hwpath: %s driver: %s", | 177 | "Brocade FC/FCOE Adapter, " "model: %s hwpath: %s driver: %s", |
| 179 | ioc_attr.adapter_attr.model, bfad->pci_name, | 178 | model, bfad->pci_name, BFAD_DRIVER_VERSION); |
| 180 | BFAD_DRIVER_VERSION); | ||
| 181 | return bfa_buf; | 179 | return bfa_buf; |
| 182 | } | 180 | } |
| 183 | 181 | ||
| @@ -931,10 +929,9 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port) | |||
| 931 | struct Scsi_Host *host = im_port->shost; | 929 | struct Scsi_Host *host = im_port->shost; |
| 932 | struct bfad_s *bfad = im_port->bfad; | 930 | struct bfad_s *bfad = im_port->bfad; |
| 933 | struct bfad_port_s *port = im_port->port; | 931 | struct bfad_port_s *port = im_port->port; |
| 934 | union attr { | 932 | struct bfa_pport_attr_s pattr; |
| 935 | struct bfa_pport_attr_s pattr; | 933 | char model[BFA_ADAPTER_MODEL_NAME_LEN]; |
| 936 | struct bfa_ioc_attr_s ioc_attr; | 934 | char fw_ver[BFA_VERSION_LEN]; |
| 937 | } attr; | ||
| 938 | 935 | ||
| 939 | fc_host_node_name(host) = | 936 | fc_host_node_name(host) = |
| 940 | bfa_os_htonll((bfa_fcs_port_get_nwwn(port->fcs_port))); | 937 | bfa_os_htonll((bfa_fcs_port_get_nwwn(port->fcs_port))); |
| @@ -954,20 +951,18 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port) | |||
| 954 | /* For fibre channel services type 0x20 */ | 951 | /* For fibre channel services type 0x20 */ |
| 955 | fc_host_supported_fc4s(host)[7] = 1; | 952 | fc_host_supported_fc4s(host)[7] = 1; |
| 956 | 953 | ||
| 957 | memset(&attr.ioc_attr, 0, sizeof(attr.ioc_attr)); | 954 | bfa_get_adapter_model(&bfad->bfa, model); |
| 958 | bfa_get_attr(&bfad->bfa, &attr.ioc_attr); | 955 | bfa_get_adapter_fw_ver(&bfad->bfa, fw_ver); |
| 959 | sprintf(fc_host_symbolic_name(host), "Brocade %s FV%s DV%s", | 956 | sprintf(fc_host_symbolic_name(host), "Brocade %s FV%s DV%s", |
| 960 | attr.ioc_attr.adapter_attr.model, | 957 | model, fw_ver, BFAD_DRIVER_VERSION); |
| 961 | attr.ioc_attr.adapter_attr.fw_ver, BFAD_DRIVER_VERSION); | ||
| 962 | 958 | ||
| 963 | fc_host_supported_speeds(host) = 0; | 959 | fc_host_supported_speeds(host) = 0; |
| 964 | fc_host_supported_speeds(host) |= | 960 | fc_host_supported_speeds(host) |= |
| 965 | FC_PORTSPEED_8GBIT | FC_PORTSPEED_4GBIT | FC_PORTSPEED_2GBIT | | 961 | FC_PORTSPEED_8GBIT | FC_PORTSPEED_4GBIT | FC_PORTSPEED_2GBIT | |
| 966 | FC_PORTSPEED_1GBIT; | 962 | FC_PORTSPEED_1GBIT; |
| 967 | 963 | ||
| 968 | memset(&attr.pattr, 0, sizeof(attr.pattr)); | 964 | bfa_fcport_get_attr(&bfad->bfa, &pattr); |
| 969 | bfa_fcport_get_attr(&bfad->bfa, &attr.pattr); | 965 | fc_host_maxframe_size(host) = pattr.pport_cfg.maxfrsize; |
| 970 | fc_host_maxframe_size(host) = attr.pattr.pport_cfg.maxfrsize; | ||
| 971 | } | 966 | } |
| 972 | 967 | ||
| 973 | static void | 968 | static void |
