Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a107311d authored by Desnes Augusto Nunes do Rosario's avatar Desnes Augusto Nunes do Rosario Committed by David S. Miller
Browse files

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: 4e6759be ("ibmvnic: Feature implementation of VPD for the ibmvnic driver")
Signed-off-by: default avatarDesnes A. Nunes do Rosario <desnesn@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5e264e2b
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -3305,7 +3305,11 @@ static void handle_vpd_rsp(union ibmvnic_crq *crq,
	 */
	 */
	substr = strnstr(adapter->vpd->buff, "RM", adapter->vpd->len);
	substr = strnstr(adapter->vpd->buff, "RM", adapter->vpd->len);
	if (!substr) {
	if (!substr) {
		dev_info(dev, "No FW level provided by VPD\n");
		dev_info(dev, "Warning - No FW level has been provided in the VPD buffer by the VIOS Server\n");
		ptr = strncpy((char *)adapter->fw_version, "N/A",
			      3 * sizeof(char));
		if (!ptr)
			dev_err(dev, "Failed to inform that firmware version is unavailable to the adapter\n");
		goto complete;
		goto complete;
	}
	}