DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: dev@dpdk.org
Cc: kaara.satwik@chelsio.com
Subject: [dpdk-dev] [PATCH 1/2] net/cxgbe: do not link down for every link config change
Date: Fri, 15 Jan 2021 22:49:16 +0530	[thread overview]
Message-ID: <46d699461ce3089b1a7040a3498fb22d691134c0.1610730372.git.rahul.lakkireddy@chelsio.com> (raw)
In-Reply-To: <cover.1610730372.git.rahul.lakkireddy@chelsio.com>
In-Reply-To: <cover.1610730372.git.rahul.lakkireddy@chelsio.com>

Some commands like turning local Tx/Rx pause on/off do not need link
to go down. If there are issues with link config params, then the
firmware will explicitly indicate link down in reply. So, don't always
link down for every link config param change request. Instead, rely
on actual link status coming in firmware's link config change reply.

Fixes: 61570952b138 ("net/cxgbe: rework and simplify link handling code")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/base/t4_hw.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index e87823f8f..8587eec60 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -2844,14 +2844,12 @@ int t4_link_l1cfg_core(struct port_info *pi, u32 caps, u8 sleep_ok)
 	else
 		ret = t4_wr_mbox_ns(adap, adap->mbox, &cmd, sizeof(cmd), NULL);
 
-	if (ret == FW_SUCCESS) {
-		lc->link_ok = 0;
+	if (ret == FW_SUCCESS)
 		lc->link_caps = caps;
-	} else {
+	else
 		dev_err(adap,
 			"Requested Port Capabilities %#x rejected, error %d\n",
 			caps, ret);
-	}
 
 	return ret;
 }
-- 
2.24.0


  reply	other threads:[~2021-01-15 17:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 17:19 [dpdk-dev] [PATCH 0/2] net/cxgbe: minor fixes for link related changes Rahul Lakkireddy
2021-01-15 17:19 ` Rahul Lakkireddy [this message]
2021-01-15 17:19 ` [dpdk-dev] [PATCH 2/2] net/cxgbe: avoid link FEC retraining during probe Rahul Lakkireddy
2021-01-19  1:52 ` [dpdk-dev] [PATCH 0/2] net/cxgbe: minor fixes for link related changes Ferruh Yigit

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=46d699461ce3089b1a7040a3498fb22d691134c0.1610730372.git.rahul.lakkireddy@chelsio.com \
    --to=rahul.lakkireddy@chelsio.com \
    --cc=dev@dpdk.org \
    --cc=kaara.satwik@chelsio.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).