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.lakkire...@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