From patchwork Thu Feb 1 18:04:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Desnes A. Nunes do Rosario" X-Patchwork-Id: 868346 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zXShl259mz9s72 for ; Fri, 2 Feb 2018 05:05:43 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753035AbeBASFk (ORCPT ); Thu, 1 Feb 2018 13:05:40 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59798 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752937AbeBASFg (ORCPT ); Thu, 1 Feb 2018 13:05:36 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w11I5X37098880 for ; Thu, 1 Feb 2018 13:05:36 -0500 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fv7uy812c-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 01 Feb 2018 13:05:35 -0500 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 1 Feb 2018 13:05:34 -0500 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 1 Feb 2018 13:05:31 -0500 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w11I5Vki48758856; Thu, 1 Feb 2018 18:05:31 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 23E86AC051; Thu, 1 Feb 2018 13:06:50 -0500 (EST) Received: from ibm.br.ibm.com (unknown [9.18.235.139]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 2B669AC040; Thu, 1 Feb 2018 13:06:49 -0500 (EST) From: Desnes Augusto Nunes do Rosario To: netdev@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, tlfalcon@linux.vnet.ibm.com, jallen@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com Subject: [PATCH, net] ibmvnic: fix firmware version when no firmware level has been provided by the VIOS server Date: Thu, 1 Feb 2018 16:04:30 -0200 X-Mailer: git-send-email 2.14.3 X-TM-AS-GCONF: 00 x-cbid: 18020118-0052-0000-0000-000002AD02E3 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008459; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000248; SDB=6.00983583; UDB=6.00498848; IPR=6.00762861; BA=6.00005808; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019323; XFM=3.00000015; UTC=2018-02-01 18:05:32 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020118-0053-0000-0000-0000536F6BC7 Message-Id: <20180201180430.16950-1-desnesn@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-01_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802010231 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: 4e6759be28e4 ("ibmvnic: Feature implementation of VPD for the ibmvnic driver") Signed-off-by: Desnes A. Nunes do Rosario --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index b65f5f3ac034..2b3e71b63a7a 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -3290,7 +3290,11 @@ static void handle_vpd_rsp(union ibmvnic_crq *crq, */ substr = strnstr(adapter->vpd->buff, "RM", adapter->vpd->len); 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; }