From: Nikhil Vasoya Date: Mon, 27 Sep 2021 17:56:30 +0000 (+0530) Subject: net/cxgbe: avoid sending link params change from VF X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=88ba30f0076c58ba076b13c5a2612c6bd6a465f5;p=dpdk.git net/cxgbe: avoid sending link params change from VF VFs are not allowed to change physical link params when a port module change is detected. The firmware already returns appropriate permission error when VF tries to change physical link params. But, make sure to avoid sending the command to firmware from VF in the first place and prevent flooding firmware debug logs with permission errors. Fixes: a83041b1e998 ("net/cxgbe: rework and simplify link handling") Cc: stable@dpdk.org Signed-off-by: Nikhil Vasoya Signed-off-by: Rahul Lakkireddy --- diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c index b60bcdc3bc..cdcd7e5510 100644 --- a/drivers/net/cxgbe/base/t4_hw.c +++ b/drivers/net/cxgbe/base/t4_hw.c @@ -4597,7 +4597,7 @@ static void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl) t4_os_link_changed(adapter, pi->pidx); } - if (mod_changed) { + if (mod_changed != 0 && is_pf4(adapter) != 0) { u32 mod_caps = lc->admin_caps; int ret;