Skip to content

Commit a107311

Browse files
Desnes Augusto Nunes do Rosariodavem330
authored andcommitted
ibmvnic: fix firmware version when no firmware level has been provided by the VIOS server
Older versions of VIOS servers do not send the firmware level in the VPD buffer for the ibmvnic driver. Thus, not only the current message is mis- leading but the firmware version in the ethtool will be NULL. Therefore, this patch fixes the firmware string and its warning. Fixes: 4e6759b ("ibmvnic: Feature implementation of VPD for the ibmvnic driver") Signed-off-by: Desnes A. Nunes do Rosario <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5e264e2 commit a107311

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3305,7 +3305,11 @@ static void handle_vpd_rsp(union ibmvnic_crq *crq,
33053305
*/
33063306
substr = strnstr(adapter->vpd->buff, "RM", adapter->vpd->len);
33073307
if (!substr) {
3308-
dev_info(dev, "No FW level provided by VPD\n");
3308+
dev_info(dev, "Warning - No FW level has been provided in the VPD buffer by the VIOS Server\n");
3309+
ptr = strncpy((char *)adapter->fw_version, "N/A",
3310+
3 * sizeof(char));
3311+
if (!ptr)
3312+
dev_err(dev, "Failed to inform that firmware version is unavailable to the adapter\n");
33093313
goto complete;
33103314
}
33113315

0 commit comments

Comments
 (0)