From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A5960A054A for ; Tue, 25 Oct 2022 17:09:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DF5B42C38; Tue, 25 Oct 2022 17:09:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 7106A42C4C for ; Tue, 25 Oct 2022 17:09:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666710558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rkiRa+pX3EpFM4BMfNRDTAgOxahxgbLeWoUkkWHx0eY=; b=L2r+I0tW8YChqf57RYMWMgH1fnoythryzLzRQ/ovpZE5M7QsVEoCIdiZOT1FHETFU7pswu afTV172AEFo6f3QIfJKPGNMw3r6az8wcUqtTD4Qowy6uDx7ezoPzO8w8M9N6cTGpHygPR6 livUJdgxcSHHrwq5l/0mcSZpOi629Ls= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-384-heKHPKv1O1yglN9gzoxGqg-1; Tue, 25 Oct 2022 11:09:14 -0400 X-MC-Unique: heKHPKv1O1yglN9gzoxGqg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8D52186F140; Tue, 25 Oct 2022 15:09:13 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E4134B400F; Tue, 25 Oct 2022 15:09:12 +0000 (UTC) From: Kevin Traynor To: Qi Zhang Cc: Jacob Keller , Qiming Yang , dpdk stable Subject: patch 'net/ice/base: fix endian format' has been queued to stable release 21.11.3 Date: Tue, 25 Oct 2022 16:06:49 +0100 Message-Id: <20221025150734.142189-54-ktraynor@redhat.com> In-Reply-To: <20221025150734.142189-1-ktraynor@redhat.com> References: <20221025150734.142189-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/01/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/26b64ce3a27cb58eb0a9acd7db00182996d13056 Thanks. Kevin --- >From 26b64ce3a27cb58eb0a9acd7db00182996d13056 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Mon, 15 Aug 2022 03:31:22 -0400 Subject: [PATCH] net/ice/base: fix endian format [ upstream commit 843a099aa29fe554bf5e5ff2295eac6615d055b5 ] A few functions failed to properly convert some values into Little Endian format before sending them to the firmware. This will produce incorrect results when running on a Big Endian platform. Fix this by adding the necessary CPU_TO_LE* macros around the input to firmware. These issues were detected by sparse. Fixes: 0f61c2af88c8 ("net/ice/base: add set/get GPIO helper functions") Signed-off-by: Jacob Keller Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/ice/base/ice_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index fec51e3237..c6fc32fbc6 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -3933,5 +3933,5 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw, ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_read_topo_dev_nvm); - desc.datalen = data_size; + desc.datalen = CPU_TO_LE16(data_size); ice_memcpy(&cmd->topo_params, topo_params, sizeof(*topo_params), ICE_NONDMA_TO_NONDMA); @@ -5587,5 +5587,5 @@ ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value, ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_gpio); cmd = &desc.params.read_write_gpio; - cmd->gpio_ctrl_handle = gpio_ctrl_handle; + cmd->gpio_ctrl_handle = CPU_TO_LE16(gpio_ctrl_handle); cmd->gpio_num = pin_idx; cmd->gpio_val = value ? 1 : 0; @@ -5615,5 +5615,5 @@ ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_gpio); cmd = &desc.params.read_write_gpio; - cmd->gpio_ctrl_handle = gpio_ctrl_handle; + cmd->gpio_ctrl_handle = CPU_TO_LE16(gpio_ctrl_handle); cmd->gpio_num = pin_idx; -- 2.37.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-10-25 14:18:59.757221114 +0100 +++ 0054-net-ice-base-fix-endian-format.patch 2022-10-25 14:18:58.427798148 +0100 @@ -1 +1 @@ -From 843a099aa29fe554bf5e5ff2295eac6615d055b5 Mon Sep 17 00:00:00 2001 +From 26b64ce3a27cb58eb0a9acd7db00182996d13056 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 843a099aa29fe554bf5e5ff2295eac6615d055b5 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 57602a31e1..cb06fdf42b 100644 +index fec51e3237..c6fc32fbc6 100644 @@ -29 +30 @@ -@@ -4029,5 +4029,5 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw, +@@ -3933,5 +3933,5 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw, @@ -36 +37 @@ -@@ -5683,5 +5683,5 @@ ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value, +@@ -5587,5 +5587,5 @@ ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value, @@ -43 +44 @@ -@@ -5711,5 +5711,5 @@ ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, +@@ -5615,5 +5615,5 @@ ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,