From nobody Sat Sep 28 09:26:09 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 4XG25G3hpDz5Y3BQ; Sat, 28 Sep 2024 09:26:10 +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 4XG25G1Cdcz4s4x; Sat, 28 Sep 2024 09:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515570; 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=IqHr9WswOV0kIX8n0AonxEpqLRDZ6Fm9eBEaRd/vSnw=; b=H05AgNGsXsOolo4EHoBwRB6s/PJRxdPB7Ji5Y2tU6euOJa+LtuI+LXMjHzqVoPAcfY+E7W rmaGP+lL170DZgJeUYIWvjsTxEUXt9WZrzdV2zjLSI/VRkk5zZv1UgEyukAOFqzvlnwYnA ohQwCUOvQ42z3ctnZ0L4gjnZ/pWg9Ysi1E82RHOAhMARQJBWZmR1EpHfmdM0kfMLXFDDXu NNoP9g4XHIuk4WjOChG6KVqaTNYbE2Dl6A2FTXVD2uOBr7vuhCnNTbgOOssAgR0yaT4t0O aWFFOEJzR39kkb88Ul84gmfPFf6AsL664ldeddBwgiC1Uk/fvC5AHFoPFHQlrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515570; 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=IqHr9WswOV0kIX8n0AonxEpqLRDZ6Fm9eBEaRd/vSnw=; b=UboW/JfgWcg8YnGTx1XLESWZZoMKQwXJWNd0Tz2Hk0E/xuXwN7p9LuPPuWXgzW8rVg3vK0 imirqfSOdEnXvs/Sl5Tqt0b/JvDdlcKT7T8RJo0kYD+sEMlskbEU7DtQd/j+fa09x6ZPu2 EKqWnf0FuAyo5SQtBTz8viE1qcfYGlzj88UvtzL45g0CK3Sqd8MVhfc0k2LiPmeGKIkGeq DC7NKBbZOOtPa3HaZLGO5PP5XNxlsBnLq2D2pSG60911iYJFo59T/VqRjU8MAlYLX3ypA8 NHkE3pMyxNxRjZ9UjOqedZOECviRBAzbRjSGH5qOJhtbCWPsFE1mxjUiFMPPXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515570; a=rsa-sha256; cv=none; b=v0+86FANKqy99f88GKJF7jJxUdHldzAtSFHbR22nH7FG/RTTtrSWccacmCreLeUtVTT2Zz bD+b75PBTTbjsHzrFlzTJ/kFPb86cj+DM4oBIAw2LppiBSrYbFhehwUzNHR+ruSMgj4I1/ XnXJdqNfJ8pTpIqgBIl7nQVSK2T6i/slFDSFHffR2H7mGdYW2W7W36M7vFVM2zLhpf4FgU SxfZ67XeeNp7DCdSudqhCmGEktu/xgga7QIyBvy9gUln/UbV69Xyorf+Po1xgTMPBsET6K 2/JjaL3kFwLqta4eGq2Xxvu9JaK51dKRzhy3Bg+MfpkRM2BRggix5GEQdkFGuA== 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 4XG25G0SjHzK44; Sat, 28 Sep 2024 09:26:10 +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 48S9Q9AS077134; Sat, 28 Sep 2024 09:26:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9Q9NW077131; Sat, 28 Sep 2024 09:26:09 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:26:09 GMT Message-Id: <202409280926.48S9Q9NW077131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: fa00169e26ff - stable/13 - ixgbe: update ixgbe_mbx with ix-3.3.38 changes 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fa00169e26ff91ae1aa62a00f6a5a57068442a2e Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=fa00169e26ff91ae1aa62a00f6a5a57068442a2e commit fa00169e26ff91ae1aa62a00f6a5a57068442a2e Author: Kevin Bowling AuthorDate: 2024-09-21 09:47:11 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:24:57 +0000 ixgbe: update ixgbe_mbx with ix-3.3.38 changes (cherry picked from commit 0acea458f82d95b75193bf6ce6321906032abf40) --- sys/dev/ixgbe/ixgbe_mbx.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_mbx.h | 1 + 2 files changed, 45 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index 0a0c5abde157..5f1f64e02b82 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -199,6 +199,26 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id) return ret_val; } +/** + * ixgbe_clear_mbx - Clear Mailbox Memory + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to write + * + * Set VFMBMEM of given VF to 0x0. + **/ +s32 ixgbe_clear_mbx(struct ixgbe_hw *hw, u16 mbx_id) +{ + struct ixgbe_mbx_info *mbx = &hw->mbx; + s32 ret_val = IXGBE_ERR_CONFIG; + + DEBUGFUNC("ixgbe_clear_mbx"); + + if (mbx->ops[mbx_id].clear) + ret_val = mbx->ops[mbx_id].clear(hw, mbx_id); + + return ret_val; +} + /** * ixgbe_poll_for_msg - Wait for message notification * @hw: pointer to the HW structure @@ -658,6 +678,7 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) mbx->ops[0].check_for_msg = ixgbe_check_for_msg_vf; mbx->ops[0].check_for_ack = ixgbe_check_for_ack_vf; mbx->ops[0].check_for_rst = ixgbe_check_for_rst_vf; + mbx->ops[0].clear = NULL; mbx->stats.msgs_tx = 0; mbx->stats.msgs_rx = 0; @@ -1054,6 +1075,27 @@ static s32 ixgbe_read_mbx_pf(struct ixgbe_hw *hw, u32 *msg, u16 size, return IXGBE_SUCCESS; } +/** + * ixgbe_clear_mbx_pf - Clear Mailbox Memory + * @hw: pointer to the HW structure + * @vf_id: the VF index + * + * Set VFMBMEM of given VF to 0x0. + **/ +static s32 ixgbe_clear_mbx_pf(struct ixgbe_hw *hw, u16 vf_id) +{ + u16 mbx_size = hw->mbx.size; + u16 i; + + if (vf_id > 63) + return IXGBE_ERR_PARAM; + + for (i = 0; i < mbx_size; ++i) + IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_id), i, 0x0); + + return IXGBE_SUCCESS; +} + /** * ixgbe_init_mbx_params_pf_id - set initial values for pf mailbox * @hw: pointer to the HW structure @@ -1072,6 +1114,7 @@ void ixgbe_init_mbx_params_pf_id(struct ixgbe_hw *hw, u16 vf_id) mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf; mbx->ops[vf_id].check_for_ack = ixgbe_check_for_ack_pf; mbx->ops[vf_id].check_for_rst = ixgbe_check_for_rst_pf; + mbx->ops[vf_id].clear = ixgbe_clear_mbx_pf; } /** @@ -1147,6 +1190,7 @@ void ixgbe_upgrade_mbx_params_pf(struct ixgbe_hw *hw, u16 vf_id) mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf; mbx->ops[vf_id].check_for_ack = ixgbe_check_for_ack_pf; mbx->ops[vf_id].check_for_rst = ixgbe_check_for_rst_pf; + mbx->ops[vf_id].clear = ixgbe_clear_mbx_pf; mbx->stats.msgs_tx = 0; mbx->stats.msgs_rx = 0; diff --git a/sys/dev/ixgbe/ixgbe_mbx.h b/sys/dev/ixgbe/ixgbe_mbx.h index 3a9bd34a137f..e6519963242e 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.h +++ b/sys/dev/ixgbe/ixgbe_mbx.h @@ -195,6 +195,7 @@ s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id); s32 ixgbe_check_for_msg(struct ixgbe_hw *hw, u16 mbx_id); s32 ixgbe_check_for_ack(struct ixgbe_hw *hw, u16 mbx_id); s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id); +s32 ixgbe_clear_mbx(struct ixgbe_hw *hw, u16 vf_number); void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw); void ixgbe_upgrade_mbx_params_vf(struct ixgbe_hw *hw); void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw);