From nobody Tue Jul 02 08:06:19 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 4WCwTm2m7Xz5Phgw; Tue, 02 Jul 2024 08:06:20 +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 4WCwTm0Hh9z4J3D; Tue, 2 Jul 2024 08:06:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907580; 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=0YhPKKouZYx+nvo7vUj/RkKXYoN+vuqqxgSHK8a6veY=; b=npnxy6k8Eia/Owq9EMnnvJHwd6XzVCC3bG2FAerwvo2javANm1kB6ci9P3u0IOmlD6VE8R gZh3CUsGY6G0a94kN64Kd0qqZxC0xwJG1mllLuybuVRxdGrHpKEr0Qmp4JDpuwL1/dIwmd PwCw2g+sU4gXef99BxyZuvgcQT6+84clZJT0s9kXtGMO/FWuZR9YMxInlZViLkOver/Jk1 SLyu2xXW9TkTEH87JvAUfssTEp7hWu3SiEXlGogkeSJOph/aikNdNuQ3bthl0NU6Biik7I ixCJmUFWmECzj130gZ8PiQ0tFdPbq+HK6UWBtCZb9l1KWc73dTAAbsUVujPJGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907580; a=rsa-sha256; cv=none; b=bTPnzs+hhKURMYIDcceJJJUusl9SUCgRkKd/Oj0f9L6YXcPWlB6Kra8TBiVeZ92Ptg1CCp hMtgWf72FhW3S5YwmUIKb1GqLpB6KBbec+iJX3qwxOm7U49BjsRiGxTqd0JT3NfP5Fp1eB 1LRPOlo8Dzp/ZK+Yvd7eOjnLrZZTMRUoaAFDB4qNbmez5A2SHRKbPgoz3IhBfObx0iJ2Cb q5QOAkLqpssg/I8a7qp8MdOxaImVGUwNbneitC5Lo/8AiSUXXz6gKMoNPsLcC6f3porFau tLTKj5XK5kGx8hGJUxfJ3RgJDJflUTsmGOagHRa2mbMoU2WrehJQhfYKX3zcrQ== 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=1719907580; 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=0YhPKKouZYx+nvo7vUj/RkKXYoN+vuqqxgSHK8a6veY=; b=OCPm0zxbTl/NEQePRcRpmtr/ElLycyJdpFEKq+5sKyVS6780nycBAGvnOCE1jZbvn/x0Gz 6/coH0lVfDO2/6Z0n+zGDzPCYChGrjWybc2bMcExEQ7bQhkekSdav7FdCO3C00GC2yJcFt LCD9RNso5fxBGvlSytvNJbvwjkTtlbAiL+pqIpuvnZADOjnSdLSB969AS2QYzUFVRXz8g6 LIxiZza2CLJi3VXuUTdCVvfA2eLUBkjdpumpyYX+uCzwnOoqFt7QdYCg/LAjsl1JslrCmo gH+F7USzvgQ5FosMAmHh1rt69NESsLb38HQRU2cF9B2RBfl9oARCdHlJA+iFdw== 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 4WCwTl6jYpzgNm; Tue, 2 Jul 2024 08:06:19 +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 46286JKl083001; Tue, 2 Jul 2024 08:06:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286JiE082989; Tue, 2 Jul 2024 08:06:19 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:19 GMT Message-Id: <202407020806.46286JiE082989@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: 7aa9202bc8ea - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 7aa9202bc8eaf8df44a40f5bcae0ae39d08a36a7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7aa9202bc8eaf8df44a40f5bcae0ae39d08a36a7 commit 7aa9202bc8eaf8df44a40f5bcae0ae39d08a36a7 Author: Navdeep Parhar AuthorDate: 2024-06-13 18:05:51 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:07:47 +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 f79bcfdabacf..f3bee2bbda3f 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -6015,25 +6015,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