From nobody Mon Jun 17 02:11:36 2024 X-Original-To: dev-commits-src-main@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 4W2YKN5Jhjz5N1ph; Mon, 17 Jun 2024 02:11:36 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2YKN4SZ4z4drS; Mon, 17 Jun 2024 02:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718590296; 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=zDhRvg9LVzmnQ/aK4Dskn8hhTK+OB3MsKtiUqmyo0uo=; b=gUG3uwpBJxrexE700hYQBeV80j553pCl4YoOMNrNqo/uJkxW8NBM9jS+fgv6/BZFqm1qOs 3cwL2h3uyb/Fgh6IO77yOzazqFt/mzbCfG4vFU40a/fz3GgffVS8rEY1ssmQ+EFQ/Ah6mn szXukhaD97YTzbvZZmSmeAWhnF+IlithC4gSiwAX4vJdFPK4Xyy1rYuaNJUrt4td6Krh5i R8/OUVxqDVL5m9aUIz6eKWu3mKxWvTh+2DGPd8UsAERM4nC32ivYu9bKEfGoqQXwj2T+1V RMUiyEu1u2giLr3PuyZcKriZVCre4SfEuDq/ox3b9rQ0cTd2vsiQXTsIuOnNVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718590296; a=rsa-sha256; cv=none; b=Tj27jjBChpZPG/O4bwGlCc6q4esZtnL464oLIVrDpb00EBLsJ/V6Jx4GO/Yn97QqaYafV4 LqEP9ebssuET8wW6fepvEKHMAC+vqgt9CLG68tHLYOl9OhNcezK8P9gAMjVF0N+cL/Kliq 97oqLmK8+RVzujYhQzRicYcCnQGR1SRbQpwEqa+QIcxRGBb8JiL1Rt4CZT8u7ewrSAnJNy NbZxb2cTH5NzRQpFAcYAJuxeXcRKuexWazAdRz9KoaNjYqgkZPGRU0+mLSyGZ2rpjh3Tow PAPYIg1rvBajixMPnrsqa7PcnFOiYccCBrP+EjohnEZ2qshyEOYoQbwcFh5E8A== 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=1718590296; 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=zDhRvg9LVzmnQ/aK4Dskn8hhTK+OB3MsKtiUqmyo0uo=; b=TomF2we9376GiYqbBMVgXEtwzDcP3bh7Il0qcOYGp0oYryfPjITeY2tjIZ3Dj2uTZnSfe1 wOpW1JqOfolyfamc2NtG6aj7eGrP+PVHLV3XAWjCR92PU5Me3l+YpDWouAVQ1KKQqCgIHs VT9y6tuxAtkXBXy8cYZqr+iWKSmErH6KFBwLjjG5SnMuNUzxtLmeHrd/FmlZqO4HpAmnlK LQi6mN4s6H1oW/Od+xDVrURMCogdwRkG76onvzL0lFLkb4tpPZwTP52gFXLFEqoVmSWNiY zAt7aVZNzeDx0lK6JglLGP/lZVFKSaM8h5jzN5ZXB8rTvj6lwBeKQAIjYwYVrg== 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 4W2YKN3Z14z1BjN; Mon, 17 Jun 2024 02:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45H2BaZJ046645; Mon, 17 Jun 2024 02:11:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45H2Bavk046642; Mon, 17 Jun 2024 02:11:36 GMT (envelope-from git) Date: Mon, 17 Jun 2024 02:11:36 GMT Message-Id: <202406170211.45H2Bavk046642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: d72db09005e5 - main - cxgbe(4): Do not issue an L1CFG command from a VF. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d72db09005e53160d6c89b5221169efaac74cd55 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=d72db09005e53160d6c89b5221169efaac74cd55 commit d72db09005e53160d6c89b5221169efaac74cd55 Author: Navdeep Parhar AuthorDate: 2024-06-13 18:05:51 +0000 Commit: Navdeep Parhar CommitDate: 2024-06-17 01:54:02 +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 --- 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 03b674cb9241..ae18efb25f15 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -6023,25 +6023,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