Make sure that the firmware version is available in
dev.t4nex.X.firmware_version even if the driver fails to attach properly. At least it'll be easy to tell what we're dealing with. MFC after: 1 week
This commit is contained in:
parent
ceebc4ca95
commit
e07f03e8fc
@ -1449,6 +1449,11 @@ prep_firmware(struct adapter *sc)
|
||||
|
||||
/* Check firmware version and install a different one if necessary */
|
||||
rc = t4_check_fw_version(sc);
|
||||
snprintf(sc->fw_version, sizeof(sc->fw_version), "%u.%u.%u.%u",
|
||||
G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers),
|
||||
G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers),
|
||||
G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers),
|
||||
G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers));
|
||||
if (rc != 0) {
|
||||
uint32_t v = 0;
|
||||
|
||||
@ -1505,6 +1510,12 @@ prep_firmware(struct adapter *sc)
|
||||
} else {
|
||||
/* refresh */
|
||||
(void) t4_check_fw_version(sc);
|
||||
snprintf(sc->fw_version,
|
||||
sizeof(sc->fw_version), "%u.%u.%u.%u",
|
||||
G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers),
|
||||
G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers),
|
||||
G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers),
|
||||
G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1548,11 +1559,6 @@ prep_firmware(struct adapter *sc)
|
||||
goto done; /* error message displayed already */
|
||||
}
|
||||
|
||||
snprintf(sc->fw_version, sizeof(sc->fw_version), "%u.%u.%u.%u",
|
||||
G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers),
|
||||
G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers),
|
||||
G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers),
|
||||
G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers));
|
||||
sc->flags |= FW_OK;
|
||||
|
||||
done:
|
||||
|
Loading…
Reference in New Issue
Block a user