From nobody Tue Feb 21 22:45:08 2023 X-Original-To: dev-commits-src-branches@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 4PLvW83Rkhz3tZTv; Tue, 21 Feb 2023 22:45:08 +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 4PLvW82xPlz4PC2; Tue, 21 Feb 2023 22:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677019508; 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=WF1ImqSSCC9Pg2uhph6PEULkHyvwn8vm6z8Hhzj6Lw0=; b=W/hSUURA3Qe2bGnnxJsmPJz9vqivQ72EY/eN8d9urUz8v6R1EWUfuip0jYDiSYklrYTZoA I9MKgKWK2Mq+qIAy20TeXcKu7ZBdg0YnynLXNq+gjSeg2ixL2wOt6CAi5Drc0+9ToOE/U5 SddvAVt47l075a8FTf+2nUawU3mzQ7Lp72lBT9fVs5VkJGUISwkVjAO2ulJPEVl6zGZvFI JuRjd/8x3NubMaxXs93mCi5t8BUTDHZDJzCOr7ATOchsLeQgQG42PvuYD0zge5CzsAKKnt wUIG8TBB3JAlVMGS5eqxIO5Tp9Od248hvgZdblK1cXlHuhPuRd/78wl2x3//cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677019508; 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=WF1ImqSSCC9Pg2uhph6PEULkHyvwn8vm6z8Hhzj6Lw0=; b=DGmHpR1KJXg83wcA8tMnpvVftSkgXv1OYmrPlovwrXyo3gWuZRIuawvZq1HfNm8E3oQjz7 iL51BOSC39gv7SRBX5GF2uyVSB3L56qgWX42M57kTkYYBjbe+VppxrGxdIxcNRTsH/cxB+ G610Rgc0bu7WOqV+75bfkmk0DTZhOHO7Cg3fP/9BtqL2Zk8MsOz4Qa6u+bipTTfexrvycH qc3l4p6Gc7RoS6xYzfQ6/gzUMVE5dbRlICg8olXSNjnZUtsy0JMV2Y8V3y/5OPCozQHLG2 zP0EXbhNxTBpFDR3/q0C8XzcxL+a9pSUsJNJvtHfgxe5l9zrB87ld77CxZ7JLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677019508; a=rsa-sha256; cv=none; b=r6lVFfpTBO5xqDI817L6Yn/UnIvyiOaM2X+1+nsuMcufnwPgB5SRVRDXAbi4wZewRBvaKB jfXw3u/OzDY9tbBytw2g8rflAq9GGdjj1KK34+0avF9wHetpNfI6jAa66ppM/s2VXFtzxx QsjFIeEWZHUACqhbplVMse8SegR1Qv45+GeuN6t5Hk4Ef4xhjjdpT6jMKSyHgeE3Z41j+k +Si2agEtfPs3sQM7BukbIvEKJzlVKxhM1+nJXbqwPHMVOJeZsGiATp2q91hdsx5jHUq8IM lzt8+eTC+498OmofvteJWpsfDnoduZDiVrJYmWLYl0Szz88kTr7SXHmgArv+pg== 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 4PLvW81zykzd2x; Tue, 21 Feb 2023 22:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31LMj8KT067567; Tue, 21 Feb 2023 22:45:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31LMj8tJ067566; Tue, 21 Feb 2023 22:45:08 GMT (envelope-from git) Date: Tue, 21 Feb 2023 22:45:08 GMT Message-Id: <202302212245.31LMj8tJ067566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 25d43e3c6b36 - stable/13 - ixgbe(4): Filter out spurious link up indication List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 25d43e3c6b365c3fb68c594fe1b9a40b98bf4f00 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=25d43e3c6b365c3fb68c594fe1b9a40b98bf4f00 commit 25d43e3c6b365c3fb68c594fe1b9a40b98bf4f00 Author: Krzysztof Galazka AuthorDate: 2023-02-15 22:35:40 +0000 Commit: Eric Joyner CommitDate: 2023-02-21 22:42:25 +0000 ixgbe(4): Filter out spurious link up indication Extend SFP+ cage crosstalk fix by re-checking link state after 5ms delay to filter out spurious link up indication by transceiver with no fiber cable connected. Signed-off-by: Krzysztof Galazka Signed-off-by: Eric Joyner Reviewed by: erj@ Tested by: Gowtham Kumar Ks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D38395 (cherry picked from commit 04a5e6d7cadd06b10169c3c3a560649e7dc7444c) --- sys/dev/ixgbe/ixgbe_common.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 3f38f5e27123..86301dab80ed 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -4232,10 +4232,25 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS); } } else { - if (links_reg & IXGBE_LINKS_UP) + if (links_reg & IXGBE_LINKS_UP) { + if (ixgbe_need_crosstalk_fix(hw)) { + /* Check the link state again after a delay + * to filter out spurious link up + * notifications. + */ + msec_delay(5); + links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS); + if (!(links_reg & IXGBE_LINKS_UP)) { + *link_up = false; + *speed = IXGBE_LINK_SPEED_UNKNOWN; + return IXGBE_SUCCESS; + } + + } *link_up = true; - else + } else { *link_up = false; + } } switch (links_reg & IXGBE_LINKS_SPEED_82599) {