From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: Desnes Augusto Nunes do Rosario <desnesn@linux.vnet.ibm.com>,
netdev@vger.kernel.org
Cc: tlfalcon@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
nfont@linux.vnet.ibm.com, jallen@linux.vnet.ibm.com
Subject: Re: [PATCH, net] ibmvnic: fix firmware version when no firmware level has been provided by the VIOS server
Date: Thu, 1 Feb 2018 13:02:38 -0800 [thread overview]
Message-ID: <e82c4a78-37b3-afc5-6250-8ce8bb2ec5ce@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180201180430.16950-1-desnesn@linux.vnet.ibm.com>
On 02/01/2018 10:04 AM, Desnes Augusto Nunes do Rosario wrote:
> 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 <desnesn@linux.vnet.ibm.com>
> ---
> 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",
Is "N/A" the right thing to report? Would something like "Unknown" or "Unreported" be better?
> + 3 * sizeof(char));
> + if (!ptr)
> + dev_err(dev, "Failed to inform that firmware version is unavailable to the adapter\n");
The sentence structure here seems awkward. I would probably just get rid of this error and this one later in the function.
dev_err(dev, "Failed to isolate FW level string\n");
Instead just check and report if adapter->fw_version == NULL in the complete: label section.
-Tyrel
> goto complete;
> }
>
next prev parent reply other threads:[~2018-02-01 21:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 18:04 [PATCH, net] ibmvnic: fix firmware version when no firmware level has been provided by the VIOS server Desnes Augusto Nunes do Rosario
2018-02-01 19:59 ` David Miller
2018-02-02 14:34 ` Desnes Augusto Nunes do Rosário
2018-02-01 21:02 ` Tyrel Datwyler [this message]
2018-02-02 14:37 ` Desnes Augusto Nunes do Rosário
2018-02-02 17:55 ` Tyrel Datwyler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e82c4a78-37b3-afc5-6250-8ce8bb2ec5ce@linux.vnet.ibm.com \
--to=tyreld@linux.vnet.ibm.com \
--cc=desnesn@linux.vnet.ibm.com \
--cc=jallen@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=nfont@linux.vnet.ibm.com \
--cc=tlfalcon@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).