From nobody Wed Feb 15 22:41:21 2023 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 4PHCjZ0V3pz3rRTw; Wed, 15 Feb 2023 22:41:22 +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 4PHCjY53bkz3nvj; Wed, 15 Feb 2023 22:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676500881; 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=ax2pTv67IRLMyboB+1nrwK30bdilsgbyn2ALAP8N7wM=; b=Dcz8FiBRYHRajyoed/0pe/zlJz7z2S7ewNhOVF4/EXOnvKCOaf0kwL24aHN25OgES8byN2 jpcFm7yeckhbEfBAT9NrJkyTSQibCCekkyF7Yn7IQbznmhOBrK9LJO9I9EZ1+UWaokDtjb X+6BBnGLMJlPZOwrcXdMhTDLM+tbmDVibPbyQqmdoazBsFcLlkxG7PFy3LxeyfHTylk3k9 mpz91Z5thZLMGTbFYOB9zAYRdKhLKjP6hhT4KorgSOOIIG3vOPjVouavyb61gp+euxFvHE CHH2j/S3GcmehtPTNPzuV1jDgSTcLkOR+GEH3i6ndztqc/QLpw7bR7wZxoWxZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676500881; 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=ax2pTv67IRLMyboB+1nrwK30bdilsgbyn2ALAP8N7wM=; b=aTFFqt95bEsf7KFc6gpY9b2Hf9rMuspJpfIKGgk+8/DURT4JD0/oGLyXxuvNrBca+p3imt qrsAN0d+3OIJEMgJ0c4bAaiIOHikzeXExrzPgeDG4bNPSnjvr5cAmQuX7m+/93m6o45xgc SdpnK6rcjrwWWRK8hNrTzooH3/5tSM0whKCw/K7iSlxRFUYI++UCDSpjU7xjIgZLq47aGb 400r5CN4m/JyjF5uyjV3A5iGa5iLiBpAu3/vWV53avoGlKdkIXseZ7RSnU4mL0ks2f+oMM zQQB9GNhlKvHdQNNSOC41yfUf72cxHgAsv9eiajcBJr3FUQ5hxfAE8UZEJRvpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676500881; a=rsa-sha256; cv=none; b=oRUxZlR4lG9/ck/KU8sETiNkWl9u4jmHWUlJjl1OPSY1YLDDh8YUymAP3Q/AVnEQEWymIk 7GhF2Kia+B0RigOXUb/kOCm0WuTSwo4S2q3UvrYoq2CeGdLNhurUbYdg3ARzl3i6kZi1lA Z8/JoxzrlkNIrMJb5zOyH3QRNYirGwGs/WyV0/QEMUiDBiuYowdpmULJm6IjYvW9BAQakL yeEuxo0G9air8ONWgY3g9loxTRgvV0pXP1EX+NXbOBcuo+Q+ZNswzplzW+zvCDXRYKgoWW yJSkDo+9z5ZtnU8K/flMGXatS/G1L1IdIMuZMfBqXuDa+ofWx4jvWIO315/L/Q== 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 4PHCjY46JXzh39; Wed, 15 Feb 2023 22:41:21 +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 31FMfLv2017010; Wed, 15 Feb 2023 22:41:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FMfLJ5017009; Wed, 15 Feb 2023 22:41:21 GMT (envelope-from git) Date: Wed, 15 Feb 2023 22:41:21 GMT Message-Id: <202302152241.31FMfLJ5017009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: 04a5e6d7cadd - main - ixgbe(4): Filter out spurious link up indication 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 04a5e6d7cadd06b10169c3c3a560649e7dc7444c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=04a5e6d7cadd06b10169c3c3a560649e7dc7444c commit 04a5e6d7cadd06b10169c3c3a560649e7dc7444c Author: Krzysztof Galazka AuthorDate: 2023-02-15 22:35:40 +0000 Commit: Eric Joyner CommitDate: 2023-02-15 22:38:05 +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 MFC after: 3 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D38395 --- 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) {