From: Thomas Falcon <tlfalcon@linux.ibm.com>
To: Murilo Fossa Vicentini <muvic@linux.ibm.com>, netdev@vger.kernel.org
Cc: muvic@br.ibm.com, abdhalee@linux.vnet.ibm.com
Subject: Re: [PATCH net] ibmvnic: Warn unknown speed message only when carrier is present
Date: Mon, 16 Sep 2019 10:21:47 -0500 [thread overview]
Message-ID: <de449a43-0313-f231-c6cc-40b6f4966a5a@linux.ibm.com> (raw)
In-Reply-To: <20190916145037.77376-1-muvic@linux.ibm.com>
On 9/16/19 9:50 AM, Murilo Fossa Vicentini wrote:
> With commit 0655f9943df2 ("net/ibmvnic: Update carrier state after link
> state change") we are now able to detect when the carrier is properly
> present in the device, so only report an unexpected unknown speed when it
> is properly detected. Unknown speed is expected to be seen by the device
> in case the backing device has no link detected.
>
> Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
> Tested-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
> Signed-off-by: Murilo Fossa Vicentini <muvic@linux.ibm.com>
> ---
Thanks, Murilo!
Reviewed-by: Thomas Falcon <tlfalcon@linux.ibm.com>
> drivers/net/ethernet/ibm/ibmvnic.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
> index 5cb55ea671e3..3a6725daf7dc 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -4312,13 +4312,14 @@ static int handle_query_phys_parms_rsp(union ibmvnic_crq *crq,
> {
> struct net_device *netdev = adapter->netdev;
> int rc;
> + __be32 rspeed = cpu_to_be32(crq->query_phys_parms_rsp.speed);
>
> rc = crq->query_phys_parms_rsp.rc.code;
> if (rc) {
> netdev_err(netdev, "Error %d in QUERY_PHYS_PARMS\n", rc);
> return rc;
> }
> - switch (cpu_to_be32(crq->query_phys_parms_rsp.speed)) {
> + switch (rspeed) {
> case IBMVNIC_10MBPS:
> adapter->speed = SPEED_10;
> break;
> @@ -4344,8 +4345,8 @@ static int handle_query_phys_parms_rsp(union ibmvnic_crq *crq,
> adapter->speed = SPEED_100000;
> break;
> default:
> - netdev_warn(netdev, "Unknown speed 0x%08x\n",
> - cpu_to_be32(crq->query_phys_parms_rsp.speed));
> + if (netif_carrier_ok(netdev))
> + netdev_warn(netdev, "Unknown speed 0x%08x\n", rspeed);
> adapter->speed = SPEED_UNKNOWN;
> }
> if (crq->query_phys_parms_rsp.flags1 & IBMVNIC_FULL_DUPLEX)
next prev parent reply other threads:[~2019-09-16 15:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-16 14:50 [PATCH net] ibmvnic: Warn unknown speed message only when carrier is present Murilo Fossa Vicentini
2019-09-16 15:21 ` Thomas Falcon [this message]
2019-09-20 0:37 ` Jakub Kicinski
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=de449a43-0313-f231-c6cc-40b6f4966a5a@linux.ibm.com \
--to=tlfalcon@linux.ibm.com \
--cc=abdhalee@linux.vnet.ibm.com \
--cc=muvic@br.ibm.com \
--cc=muvic@linux.ibm.com \
--cc=netdev@vger.kernel.org \
/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