From nobody Tue Jul 02 08:06:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WCwTl2NZVz5PhZy; Tue, 02 Jul 2024 08:06:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCwTk6xK1z4HxM; Tue, 2 Jul 2024 08:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hOtPnbe61HAMQYpfRYFPZNN1GYdMRVZm+Ztb8QkIfb8=; b=Tahg7kv3pJBrlXAv9rQgd4N0Ed3Ic9qu6By9EJcr4VJ8vDCvPO/EiuOJRtEfcIUXCB/zJf buu4eCFrij6PuDYQHoJwJkPLLVy/Vcx/xA53hUqmpX+Lg5sAy1hvRaYwZSbgpgNAK2PHKm jazMHe3XVmn7xq2Y3UkzQiUmiXQVp81mqyccm4eCJx3O+vICiu+GdwzkQUcOIjyqWGUC1p DxjND88KkhggZYG5e2M9+wcZ455gx0DeL+8Fi+J2jKRideoho6r6IpFwgrgQrZU0+SKuz/ sh+ypicZct5u46ZVZ503FPjQmdJSrDrW6S94k605OWbUJwDY7IIP8RIQvVeGGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907579; a=rsa-sha256; cv=none; b=mITkL2GNKXw++NYcSZtfHuoafLcHUXzpIBXMJszUUuw+gFXSo4LzoiTiHK15HvpmfiGMD2 LbsLpS9L6C+oRkUvQrL3levs6Qje0FMMQVdGJ1l7KgfRyTXV5PhO91n20P15pQCRMzt5Ag CTgL/kp/9aT6IQz2jhXi89veS1m4MvRFpbCihVub3f6fREbBLj31TTtO5/6bB7XNsL8iEs Rh3U4uLkhutZfQ+yDYLC/WfWyF4oSGNGVwQ5CwPgUyN0mAx7AKybS7GSdDaiGJWXNcyu3y 0proItH1g+F9izJccqeSHkqu0fnUpQIyGQAfhG3Fgj4jKPhpWlbG0C0vf8TIDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hOtPnbe61HAMQYpfRYFPZNN1GYdMRVZm+Ztb8QkIfb8=; b=InOpEFjJlCD4SfDE95S8/tkpwfn05ymu3P157BVC/ZuYa4sI7nP141zF/D5KrB6C2PT2v0 0dS11ruqW6/SZblQcK8YTdNUbGAU1Rl1wg+KNiWL1dEOZjOiIq3Qkwc3tbS2F/+jkkZxXy XWcMLNgl9iZVrWybeidpCB2fgtho4MbQUt2yOlnXOSfjJR/LslZ9INaeiccaMb5Q/iMQ5J lzA/cQ47YnCt85GfCj96xxaa0Iji6jS1twYhQ9zGa0W3pHs/xKRwC0noSNqjj+HaW3pGiu HQqKc1GUdHAPMhcOQ439cdlAz0p5Y9MoRDh0hGo542BAbh7IVUZM9HaVVJRLBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WCwTk6CrLzgb5; Tue, 2 Jul 2024 08:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46286IKX082882; Tue, 2 Jul 2024 08:06:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286Inv082879; Tue, 2 Jul 2024 08:06:18 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:18 GMT Message-Id: <202407020806.46286Inv082879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 23fb99961111 - stable/13 - cxgbe(4): Do not issue an L1CFG command from a VF. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 23fb99961111f5e3f5185cc43cd58380a675d4f8 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=23fb99961111f5e3f5185cc43cd58380a675d4f8 commit 23fb99961111f5e3f5185cc43cd58380a675d4f8 Author: Navdeep Parhar AuthorDate: 2024-06-13 18:05:51 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 07:45:54 +0000 cxgbe(4): Do not issue an L1CFG command from a VF. It is pointless to attempt an operation that is not permitted. It spams the firmware devlog with "insufficient caps" errors that distract from real errors. 78 2463625358 ERR CORE insufficient caps to process mailbox cmd: pfn 0x0 vfn 0x1; r_caps 0x86 wx_caps 0x82 required r_caps 0x81 w_caps 0x5 MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit d72db09005e53160d6c89b5221169efaac74cd55) --- sys/dev/cxgbe/t4_main.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 98f27c466bdc..d8653813f8a9 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -6084,25 +6084,27 @@ apply_link_config(struct port_info *pi) if (lc->requested_fec & FEC_BASER_RS) MPASS(lc->pcaps & FW_PORT_CAP32_FEC_BASER_RS); #endif - rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); - if (rc != 0) { - /* Don't complain if the VF driver gets back an EPERM. */ - if (!(sc->flags & IS_VF) || rc != FW_EPERM) + if (!(sc->flags & IS_VF)) { + rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); + if (rc != 0) { device_printf(pi->dev, "l1cfg failed: %d\n", rc); - } else { - /* - * An L1_CFG will almost always result in a link-change event if - * the link is up, and the driver will refresh the actual - * fec/fc/etc. when the notification is processed. If the link - * is down then the actual settings are meaningless. - * - * This takes care of the case where a change in the L1 settings - * may not result in a notification. - */ - if (lc->link_ok && !(lc->requested_fc & PAUSE_AUTONEG)) - lc->fc = lc->requested_fc & (PAUSE_TX | PAUSE_RX); + return (rc); + } } - return (rc); + + /* + * An L1_CFG will almost always result in a link-change event if the + * link is up, and the driver will refresh the actual fec/fc/etc. when + * the notification is processed. If the link is down then the actual + * settings are meaningless. + * + * This takes care of the case where a change in the L1 settings may not + * result in a notification. + */ + if (lc->link_ok && !(lc->requested_fc & PAUSE_AUTONEG)) + lc->fc = lc->requested_fc & (PAUSE_TX | PAUSE_RX); + + return (0); } #define FW_MAC_EXACT_CHUNK 7