From nobody Thu Aug 3 06:01:24 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 4RGdWm5NTmz4nG2b; Thu, 3 Aug 2023 06:01:24 +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 4RGdWm4WrGz4Ktc; Thu, 3 Aug 2023 06:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691042484; 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=jF1hq0+CrqtwXw7Iyl1Ue3shpTr/Knfxr1M4dRvimto=; b=QZBwBvQzRxIixz9OLg29xZaURk7aLA8n/rqbzo10jxZQc8RTrUbX79w+wDcmjAtLHSxvna jGBQp50tA6bV+klT0kQvPODh+tQBJIaVokveQuli7MXXoAWbeSggx1djNTHsB92hDxs2KP X2GNvyIM/o6dvL+RdD2EwjRNqYqsBIlFIKKZZ6W4wm2dVtD8VJuLihdSOq8pezo34p8YFl Q1vtGzJ8ufXIx7+dhj96n08NZJ17Bpsh0tQOXVkJ9FOvCo1G4Oj/eKQsIR+kQc49u0bXuN fxhMjxoxuQpVT8RBzJt/5HiXHYA/nK0KQRp7Rr0D3t0E0M6FfSDdbEjO33n8uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691042484; 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=jF1hq0+CrqtwXw7Iyl1Ue3shpTr/Knfxr1M4dRvimto=; b=XuD8MldGOI1rkdgy7BNTx63eGEi3Tu82SAy8U6nmdmJ/MwXOHedOde0dEAQUOJ1JLuT1tT JZLbHCtgrGV+5HT447jx6eywtIc75kNumvS9A66XY3rfjOZe82mPnkXCm/yuJaXRZ0kfAs EjD62gvSYnRHYGgegtGQuN2cK63aoOju2P8PO1+FUePWQ4rqRZsrrlKT76G+uAOTPXAtTz S/N7dQVE1Jbg2ZuSsi7jJ12OItQP07+kyX3sKwYUFiLk0RlyWerdBtaLRAQYB5g/fHAU7T 2rUL1m4yXqbEFHTjVCXN5IkJA6z3s0x32MsDmBVEIWtWQhXUbDF0eEXkP+BDuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691042484; a=rsa-sha256; cv=none; b=fQeZ2NrrGuop3KwbMoaavA3HT77hUsJFIswJmQO8w8PHpLRk6Ifg3J55oD5k6T7R87jrul 6m9v42bV0fH+isnnSPU4PXF0IK7H6dq/BNeaZ5SGThs3qdsqcoixApCaBotEwJq1gSx4Km J9d3IpFjneD4wRLO8iyJBehTh4DlIAeQgBaxG09ZE+wBVU/mVVVLqhPz16UDIwlNU8ArE8 wyi6GmoRvg3VWVzYUEYSr1jTW9vVfUZMWbhwwXd4+eFLxSqt/LM2MzDnDhdc2p+y0Jnf/O qKFd1pTvsf8qMkKRzP3eoSxQyhVWERbJY5+ekocgjsR3rC1Q7jaCKsm6thfDWA== 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 4RGdWm3db7zJfn; Thu, 3 Aug 2023 06:01:24 +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 37361OHa093234; Thu, 3 Aug 2023 06:01:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37361Op9093233; Thu, 3 Aug 2023 06:01:24 GMT (envelope-from git) Date: Thu, 3 Aug 2023 06:01:24 GMT Message-Id: <202308030601.37361Op9093233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: a93409fc3cd7 - main - ixgbe: Warn once for unsupported SFPs 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a93409fc3cd7b4d4aeb35d7ef27f84c1ae13a42d Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a93409fc3cd7b4d4aeb35d7ef27f84c1ae13a42d commit a93409fc3cd7b4d4aeb35d7ef27f84c1ae13a42d Author: Kevin Bowling AuthorDate: 2023-08-03 05:59:37 +0000 Commit: Kevin Bowling CommitDate: 2023-08-03 06:00:58 +0000 ixgbe: Warn once for unsupported SFPs The driver belabors the point about unsupported SFPs, printing multiple times on link up. Limit it to once. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39785 --- sys/dev/ixgbe/ixgbe_phy.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index eef1d40448d3..1ab4f057f810 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1302,6 +1302,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) u8 cable_tech = 0; u8 cable_spec = 0; u16 enforce_sfp = 0; + static bool warned_once = false; DEBUGFUNC("ixgbe_identify_sfp_module_generic"); @@ -1536,13 +1537,16 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) status = IXGBE_SUCCESS; } else { if (hw->allow_unsupported_sfp == true) { - EWARN(hw, - "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " - "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " - "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); + if (!warned_once) + EWARN(hw, + "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " + "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " + "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); + warned_once = true; status = IXGBE_SUCCESS; } else { - DEBUGOUT("SFP+ module not supported\n"); + DEBUGOUT + ("SFP+ module not supported\n"); hw->phy.type = ixgbe_phy_sfp_unsupported; status = IXGBE_ERR_SFP_NOT_SUPPORTED; @@ -1647,6 +1651,7 @@ s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw) u8 cable_length = 0; u8 device_tech = 0; bool active_cable = false; + static bool warned_once = false; DEBUGFUNC("ixgbe_identify_qsfp_module_generic"); @@ -1792,10 +1797,12 @@ s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw) status = IXGBE_SUCCESS; } else { if (hw->allow_unsupported_sfp == true) { - EWARN(hw, - "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " - "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " - "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); + if (!warned_once) + EWARN(hw, + "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " + "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " + "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); + warned_once = true; status = IXGBE_SUCCESS; } else { DEBUGOUT("QSFP module not supported\n");