diff mbox series

[1/2] net/cxgbe: do not link down for every link config change

Message ID 46d699461ce3089b1a7040a3498fb22d691134c0.1610730372.git.rahul.lakkireddy@chelsio.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series net/cxgbe: minor fixes for link related changes | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Rahul Lakkireddy Jan. 15, 2021, 5:19 p.m. UTC
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 mbox series

Patch

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;
 }