[SCSI] bfa: FCS and include file changes.
MS module did not invoke fdmi offline in all cases, call fdmi offline when ms module receives a port offline, so that fdmi offline is from one place in the ms module. Make changes to handle 10G speed in the conversion routine. Replaced the usage of bfa_adapter_attr_s struct with specific API's. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
Родитель
ca8b4327e4
Коммит
25e2934c26
|
@ -562,17 +562,15 @@ void
|
||||||
bfa_fcs_fabric_psymb_init(struct bfa_fcs_fabric_s *fabric)
|
bfa_fcs_fabric_psymb_init(struct bfa_fcs_fabric_s *fabric)
|
||||||
{
|
{
|
||||||
struct bfa_port_cfg_s *port_cfg = &fabric->bport.port_cfg;
|
struct bfa_port_cfg_s *port_cfg = &fabric->bport.port_cfg;
|
||||||
struct bfa_adapter_attr_s adapter_attr;
|
char model[BFA_ADAPTER_MODEL_NAME_LEN] = {0};
|
||||||
struct bfa_fcs_driver_info_s *driver_info = &fabric->fcs->driver_info;
|
struct bfa_fcs_driver_info_s *driver_info = &fabric->fcs->driver_info;
|
||||||
|
|
||||||
bfa_os_memset((void *)&adapter_attr, 0,
|
bfa_ioc_get_adapter_model(&fabric->fcs->bfa->ioc, model);
|
||||||
sizeof(struct bfa_adapter_attr_s));
|
|
||||||
bfa_ioc_get_adapter_attr(&fabric->fcs->bfa->ioc, &adapter_attr);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Model name/number
|
* Model name/number
|
||||||
*/
|
*/
|
||||||
strncpy((char *)&port_cfg->sym_name, adapter_attr.model,
|
strncpy((char *)&port_cfg->sym_name, model,
|
||||||
BFA_FCS_PORT_SYMBNAME_MODEL_SZ);
|
BFA_FCS_PORT_SYMBNAME_MODEL_SZ);
|
||||||
strncat((char *)&port_cfg->sym_name, BFA_FCS_PORT_SYMBNAME_SEPARATOR,
|
strncat((char *)&port_cfg->sym_name, BFA_FCS_PORT_SYMBNAME_SEPARATOR,
|
||||||
sizeof(BFA_FCS_PORT_SYMBNAME_SEPARATOR));
|
sizeof(BFA_FCS_PORT_SYMBNAME_SEPARATOR));
|
||||||
|
|
|
@ -72,6 +72,9 @@ fc_rpsc_operspeed_to_bfa_speed(enum fc_rpsc_op_speed_s speed)
|
||||||
case RPSC_OP_SPEED_8G:
|
case RPSC_OP_SPEED_8G:
|
||||||
return BFA_PPORT_SPEED_8GBPS;
|
return BFA_PPORT_SPEED_8GBPS;
|
||||||
|
|
||||||
|
case RPSC_OP_SPEED_10G:
|
||||||
|
return BFA_PPORT_SPEED_10GBPS;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return BFA_PPORT_SPEED_UNKNOWN;
|
return BFA_PPORT_SPEED_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
@ -97,6 +100,9 @@ fc_bfa_speed_to_rpsc_operspeed(enum bfa_pport_speed op_speed)
|
||||||
case BFA_PPORT_SPEED_8GBPS:
|
case BFA_PPORT_SPEED_8GBPS:
|
||||||
return RPSC_OP_SPEED_8G;
|
return RPSC_OP_SPEED_8G;
|
||||||
|
|
||||||
|
case BFA_PPORT_SPEED_10GBPS:
|
||||||
|
return RPSC_OP_SPEED_10G;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return RPSC_OP_SPEED_NOT_EST;
|
return RPSC_OP_SPEED_NOT_EST;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1114,36 +1114,23 @@ bfa_fcs_fdmi_get_hbaattr(struct bfa_fcs_port_fdmi_s *fdmi,
|
||||||
{
|
{
|
||||||
struct bfa_fcs_port_s *port = fdmi->ms->port;
|
struct bfa_fcs_port_s *port = fdmi->ms->port;
|
||||||
struct bfa_fcs_driver_info_s *driver_info = &port->fcs->driver_info;
|
struct bfa_fcs_driver_info_s *driver_info = &port->fcs->driver_info;
|
||||||
struct bfa_adapter_attr_s adapter_attr;
|
|
||||||
|
|
||||||
bfa_os_memset(hba_attr, 0, sizeof(struct bfa_fcs_fdmi_hba_attr_s));
|
bfa_os_memset(hba_attr, 0, sizeof(struct bfa_fcs_fdmi_hba_attr_s));
|
||||||
bfa_os_memset(&adapter_attr, 0, sizeof(struct bfa_adapter_attr_s));
|
|
||||||
|
|
||||||
bfa_ioc_get_adapter_attr(&port->fcs->bfa->ioc, &adapter_attr);
|
bfa_ioc_get_adapter_manufacturer(&port->fcs->bfa->ioc,
|
||||||
|
hba_attr->manufacturer);
|
||||||
strncpy(hba_attr->manufacturer, adapter_attr.manufacturer,
|
bfa_ioc_get_adapter_serial_num(&port->fcs->bfa->ioc,
|
||||||
sizeof(adapter_attr.manufacturer));
|
hba_attr->serial_num);
|
||||||
|
bfa_ioc_get_adapter_model(&port->fcs->bfa->ioc, hba_attr->model);
|
||||||
strncpy(hba_attr->serial_num, adapter_attr.serial_num,
|
bfa_ioc_get_adapter_model(&port->fcs->bfa->ioc, hba_attr->model_desc);
|
||||||
sizeof(adapter_attr.serial_num));
|
bfa_ioc_get_pci_chip_rev(&port->fcs->bfa->ioc, hba_attr->hw_version);
|
||||||
|
bfa_ioc_get_adapter_optrom_ver(&port->fcs->bfa->ioc,
|
||||||
strncpy(hba_attr->model, adapter_attr.model, sizeof(hba_attr->model));
|
hba_attr->option_rom_ver);
|
||||||
|
bfa_ioc_get_adapter_fw_ver(&port->fcs->bfa->ioc, hba_attr->fw_version);
|
||||||
strncpy(hba_attr->model_desc, adapter_attr.model_descr,
|
|
||||||
sizeof(hba_attr->model_desc));
|
|
||||||
|
|
||||||
strncpy(hba_attr->hw_version, adapter_attr.hw_ver,
|
|
||||||
sizeof(hba_attr->hw_version));
|
|
||||||
|
|
||||||
strncpy(hba_attr->driver_version, (char *)driver_info->version,
|
strncpy(hba_attr->driver_version, (char *)driver_info->version,
|
||||||
sizeof(hba_attr->driver_version));
|
sizeof(hba_attr->driver_version));
|
||||||
|
|
||||||
strncpy(hba_attr->option_rom_ver, adapter_attr.optrom_ver,
|
|
||||||
sizeof(hba_attr->option_rom_ver));
|
|
||||||
|
|
||||||
strncpy(hba_attr->fw_version, adapter_attr.fw_ver,
|
|
||||||
sizeof(hba_attr->fw_version));
|
|
||||||
|
|
||||||
strncpy(hba_attr->os_name, driver_info->host_os_name,
|
strncpy(hba_attr->os_name, driver_info->host_os_name,
|
||||||
sizeof(hba_attr->os_name));
|
sizeof(hba_attr->os_name));
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,7 @@ enum bfa_status {
|
||||||
* loaded */
|
* loaded */
|
||||||
BFA_STATUS_CARD_TYPE_MISMATCH = 131, /* Card type mismatch */
|
BFA_STATUS_CARD_TYPE_MISMATCH = 131, /* Card type mismatch */
|
||||||
BFA_STATUS_BAD_ASICBLK = 132, /* Bad ASIC block */
|
BFA_STATUS_BAD_ASICBLK = 132, /* Bad ASIC block */
|
||||||
BFA_STATUS_NO_DRIVER = 133, /* Storage/Ethernet driver not loaded */
|
BFA_STATUS_NO_DRIVER = 133, /* Brocade adapter/driver not installed or loaded */
|
||||||
BFA_STATUS_INVALID_MAC = 134, /* Invalid mac address */
|
BFA_STATUS_INVALID_MAC = 134, /* Invalid mac address */
|
||||||
BFA_STATUS_IM_NO_VLAN = 135, /* No VLANs configured on the adapter */
|
BFA_STATUS_IM_NO_VLAN = 135, /* No VLANs configured on the adapter */
|
||||||
BFA_STATUS_IM_ETH_LB_FAILED = 136, /* Ethernet loopback test failed */
|
BFA_STATUS_IM_ETH_LB_FAILED = 136, /* Ethernet loopback test failed */
|
||||||
|
@ -228,8 +228,7 @@ enum bfa_status {
|
||||||
BFA_STATUS_IM_GET_INETCFG_FAILED = 142, /* Acquiring Network Subsytem
|
BFA_STATUS_IM_GET_INETCFG_FAILED = 142, /* Acquiring Network Subsytem
|
||||||
* handle Failed. Please try
|
* handle Failed. Please try
|
||||||
* after some time */
|
* after some time */
|
||||||
BFA_STATUS_IM_NOT_BOUND = 143, /* Brocade 10G Ethernet Service is not
|
BFA_STATUS_IM_NOT_BOUND = 143, /* IM driver is not active */
|
||||||
* Enabled on this port */
|
|
||||||
BFA_STATUS_INSUFFICIENT_PERMS = 144, /* User doesn't have sufficient
|
BFA_STATUS_INSUFFICIENT_PERMS = 144, /* User doesn't have sufficient
|
||||||
* permissions to execute the BCU
|
* permissions to execute the BCU
|
||||||
* application */
|
* application */
|
||||||
|
|
|
@ -230,10 +230,6 @@ bfa_fcs_port_ms_sm_online(struct bfa_fcs_port_ms_s *ms,
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case MSSM_EVENT_PORT_OFFLINE:
|
case MSSM_EVENT_PORT_OFFLINE:
|
||||||
bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_offline);
|
bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_offline);
|
||||||
/*
|
|
||||||
* now invoke MS related sub-modules
|
|
||||||
*/
|
|
||||||
bfa_fcs_port_fdmi_offline(ms);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSSM_EVENT_PORT_FABRIC_RSCN:
|
case MSSM_EVENT_PORT_FABRIC_RSCN:
|
||||||
|
@ -735,6 +731,7 @@ bfa_fcs_port_ms_offline(struct bfa_fcs_port_s *port)
|
||||||
|
|
||||||
ms->port = port;
|
ms->port = port;
|
||||||
bfa_sm_send_event(ms, MSSM_EVENT_PORT_OFFLINE);
|
bfa_sm_send_event(ms, MSSM_EVENT_PORT_OFFLINE);
|
||||||
|
bfa_fcs_port_fdmi_offline(ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Загрузка…
Ссылка в новой задаче