ca_attr_p->vend_id = hca_info_p->vendor_id;\r
ca_attr_p->dev_id = (uint16_t)hca_info_p->dev_id;\r
ca_attr_p->revision = (uint16_t)hca_info_p->hw_ver;\r
+ ca_attr_p->fw_ver = hca_info_p->fw_ver;\r
\r
ca_attr_p->ca_guid = *(UNALIGNED64 u_int64_t *)vapi_hca_cap_p->node_guid;\r
ca_attr_p->num_ports = vapi_hca_cap_p->phys_port_num;\r
u_int32_t vendor_id; /* IEEE's 24 bit Device Vendor ID */\r
u_int32_t dev_id; /* Device ID */\r
u_int32_t hw_ver; /* Hardware version (step/rev) */\r
+ u_int64_t fw_ver;\r
struct hh_if_ops* if_ops; /* Interface operations */\r
\r
/* Size (bytes) of user-level ... */\r
tdev.dev_id = (u_int32_t)hw_props_p->device_id;\r
MTL_DEBUG1("hw_props_p: device_id = 0x%X, pci_vendor_id=0x%X,hw_ver=0x%X\n",\r
hw_props_p->device_id, hw_props_p->pci_vendor_id, hw_props_p->hw_ver);\r
+ tdev.fw_ver= tdev.fw_ver = hob_p->fw_props.fw_rev_major;\r
+ tdev.fw_ver = (tdev.fw_ver <<16) | hob_p->fw_props.fw_rev_minor;\r
+ tdev.fw_ver = (tdev.fw_ver <<16) | hob_p->fw_props.fw_rev_subminor;;\r
tdev.hw_ver = hob_p->hw_props.hw_ver; \r
tdev.if_ops = if_ops_p;\r
tdev.hca_ul_resources_sz = sizeof(THH_hca_ul_resources_t);\r
uint32_t vend_id;\r
uint16_t dev_id;\r
uint16_t revision;\r
+ uint64_t fw_ver;\r
\r
/*\r
* Total size of the ca attributes in bytes\r
* revision\r
* Revision ID of this adapter\r
*\r
+* fw_ver\r
+* Device Firmware version.\r
+*\r
* size\r
* Total size in bytes for the HCA attributes. This size includes total\r
* size required for all the variable members of the structure. If a\r
#endif\r
\r
\r
+#define VEND_ID_MELLNOX 0x02c9\r
\r
\r
/*******************************************************************\r
printf("\tvendor_id=0x%04x\n", ca_attr->vend_id);\r
printf("\tvendor_part_id=0x%04x\n", ca_attr->dev_id);\r
printf("\thw_ver=0x%x\n", ca_attr->revision); //TODO: ???\r
- printf("\tfw_ver=NA\n");\r
+ if(ca_attr->vend_id == VEND_ID_MELLNOX){\r
+ printf("\tfw_ver=%d.%.2d.%.4d\n",\r
+ (uint16_t )(ca_attr->fw_ver>>32),\r
+ (uint16_t)(ca_attr->fw_ver>>16),\r
+ (uint16_t )(ca_attr->fw_ver));\r
+ }else{\r
+ printf("\tfw_ver=0x%I64x\n",ca_attr->fw_ver);\r
+ }\r
printf("\tPSID=NA\n");\r
if(fullPrint){\r
printf("\tnum_phys_ports = %d\n",ca_attr->num_ports);\r
\r
/* Print_ca_attributes */\r
\r
- vstat_print_ca_attr((int)i,vstat_ca_attr, fullPrint);\r
+ vstat_print_ca_attr((int)i, vstat_ca_attr, fullPrint);\r
\r
\r
/* Free the memory */\r