put_unaligned_le64(bd->dsn, dsn);
sprintf(buf, "%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X",
dsn[7], dsn[6], dsn[5], dsn[4],
dsn[3], dsn[2], dsn[1], dsn[0]);
rc = devlink_info_serial_number_put(req, buf); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set dsn"); return rc;
}
}
if (strlen(bd->board_serialno)) {
rc = devlink_info_board_serial_number_put(req,
bd->board_serialno); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set board serial number"); return rc;
}
}
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_FIXED,
DEVLINK_INFO_VERSION_GENERIC_BOARD_ID,
bd->board_partno); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set board part number"); return rc;
}
/* More information from HWRM ver get command */
sprintf(buf, "%X", bd->chip_num);
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_FIXED,
DEVLINK_INFO_VERSION_GENERIC_ASIC_ID, buf); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set asic id"); return rc;
}
ver_resp = &bd->ver_resp;
sprintf(buf, "%c%d", 'A' + ver_resp->chip_rev, ver_resp->chip_metal);
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_FIXED,
DEVLINK_INFO_VERSION_GENERIC_ASIC_REV, buf); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set asic info"); return rc;
}
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_RUNNING,
DEVLINK_INFO_VERSION_GENERIC_FW_PSID,
bd->nvm_cfg_ver); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set firmware version"); return rc;
}
buf[0] = 0;
strncat(buf, ver_resp->active_pkg_name, HWRM_FW_VER_STR_LEN);
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_RUNNING,
DEVLINK_INFO_VERSION_GENERIC_FW, buf); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set firmware generic version"); return rc;
}
snprintf(roce_ver, FW_VER_STR_LEN, "%d.%d.%d.%d",
ver_resp->roce_fw_maj_8b, ver_resp->roce_fw_min_8b,
ver_resp->roce_fw_bld_8b, ver_resp->roce_fw_rsvd_8b);
}
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_RUNNING,
DEVLINK_INFO_VERSION_GENERIC_FW_MGMT, mgmt_ver); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set firmware mgmt version"); return rc;
}
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_RUNNING,
DEVLINK_INFO_VERSION_GENERIC_FW_MGMT_API,
bd->hwrm_ver_supp); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set firmware mgmt api version"); return rc;
}
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_RUNNING,
DEVLINK_INFO_VERSION_GENERIC_FW_NCSI, ncsi_ver); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set ncsi firmware version"); return rc;
}
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_RUNNING,
DEVLINK_INFO_VERSION_GENERIC_FW_ROCE, roce_ver); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set roce firmware version"); return rc;
}
rc = bnge_hwrm_nvm_dev_info(bd, &nvm_dev_info); if (!(nvm_dev_info.flags & NVM_GET_DEV_INFO_RESP_FLAGS_FW_VER_VALID)) return 0;
buf[0] = 0;
strncat(buf, nvm_dev_info.pkg_name, HWRM_FW_VER_STR_LEN);
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_STORED,
DEVLINK_INFO_VERSION_GENERIC_FW, buf); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set roce firmware version"); return rc;
}
snprintf(mgmt_ver, FW_VER_STR_LEN, "%d.%d.%d.%d",
nvm_dev_info.hwrm_fw_major, nvm_dev_info.hwrm_fw_minor,
nvm_dev_info.hwrm_fw_build, nvm_dev_info.hwrm_fw_patch);
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_STORED,
DEVLINK_INFO_VERSION_GENERIC_FW_MGMT, mgmt_ver); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set stored firmware version"); return rc;
}
snprintf(ncsi_ver, FW_VER_STR_LEN, "%d.%d.%d.%d",
nvm_dev_info.mgmt_fw_major, nvm_dev_info.mgmt_fw_minor,
nvm_dev_info.mgmt_fw_build, nvm_dev_info.mgmt_fw_patch);
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_STORED,
DEVLINK_INFO_VERSION_GENERIC_FW_NCSI, ncsi_ver); if (rc) {
NL_SET_ERR_MSG_MOD(extack, "Failed to set stored ncsi firmware version"); return rc;
}
snprintf(roce_ver, FW_VER_STR_LEN, "%d.%d.%d.%d",
nvm_dev_info.roce_fw_major, nvm_dev_info.roce_fw_minor,
nvm_dev_info.roce_fw_build, nvm_dev_info.roce_fw_patch);
rc = bnge_dl_info_put(bd, req, BNGE_VERSION_STORED,
DEVLINK_INFO_VERSION_GENERIC_FW_ROCE, roce_ver); if (rc)
NL_SET_ERR_MSG_MOD(extack, "Failed to set stored roce firmware version");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.