From patchwork Wed Jan 25 20:45:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 48336 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp478124wrn; Wed, 25 Jan 2023 12:47:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXskeajUgpIGIhSVdHkWwpQJ5TClmr64u2RU8SJcZqy8DTRAHH092uQefY8gLS9bfcpjYfRx X-Received: by 2002:a17:906:8298:b0:86d:be0:607d with SMTP id h24-20020a170906829800b0086d0be0607dmr36131967ejx.70.1674679673105; Wed, 25 Jan 2023 12:47:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674679673; cv=none; d=google.com; s=arc-20160816; b=ER5VWaLq9YeX6u5My/i1IBHziHMpxVtX3zS0D2IAKppj0LTwJz5e0eeg3XFQ/wdDoh vTFXyzBdllpSJUSZl7swBD3tOK+tMdfTYKxaaxF3c+XhVQTfqiDbhAcLsnr0AEwwnFCZ Fw+rNSU4HYHg5poX/RnLN3oN6R2eCp3l2CjFo1vhGN2tPrKfGraWya30ZjVrMfvy5EBT U8lGxYR84Fm+6H8lYphjgXYTlq+z6MZ5Dor4OY82fesplcDbyBAHip5dpMwueKcLKM/g 8V2zh+lpVBsg6JHCKhqrpSDDHO7uUgFW/E+W1hMjC1RTZOTj5NH47n4ChJbkfBJLSHQx eglA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iO/DlijeKlIU6w5Axu0X1q3Z8gOHm4UH5Qr0chFaDYE=; b=O/Fbp3nWbKJu94Jb545bZWy057adSwpKXqUQo667Yrnj/g7SySXSZXTiLxUOoZGkig /HNxl6ErqOuPMA4p6d7VnvKy9cLYZciAB6KGU2avqkoTezAZ5RAxp623MNtCM7B7JcEg Z7a2uKVdfJOpzSdxf+Z9lM28MGuS3kwdOs4obe26uF9MrgN7DcwgY8bao/QW7LxjSoTm PRIjcOUPnHSBDXCfr3TZIH1LwV4mbKwCQoMf1n++3XAFHnx2nqGK2jhA9xoSLs/i2HKK rMbxTbNlBhpxHIT/TdpDnEFxUtb3/AyFSswB08n++itede9C2+WN9o3xjdH7XlShXj/h bQ0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xOIrFh2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gk5-20020a17090790c500b008650ce2977bsi6523743ejb.641.2023.01.25.12.47.28; Wed, 25 Jan 2023 12:47:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xOIrFh2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236615AbjAYUqG (ORCPT + 99 others); Wed, 25 Jan 2023 15:46:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236515AbjAYUpz (ORCPT ); Wed, 25 Jan 2023 15:45:55 -0500 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0C335D91F for ; Wed, 25 Jan 2023 12:45:54 -0800 (PST) Received: by mail-io1-xd33.google.com with SMTP id q130so9020257iod.4 for ; Wed, 25 Jan 2023 12:45:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iO/DlijeKlIU6w5Axu0X1q3Z8gOHm4UH5Qr0chFaDYE=; b=xOIrFh2ybWVr5oX0yKbxF/vMXdmutKagcSVWcGSJEbIllZn/ol5s2OB7YhRaSUMCUL xrOCiVt6fb8d6xDh2/Ll4/hRPHqXV8Ed6Ii490FIE3+drwgs6CsFXXyI4V5cf5E/iY+4 ofOjR0/1o0jk5YFyXd1eICud0VRURtQAi6Yk8eyF3EM/mC39xJ8ME0tdPwir8N6lC/in uyMVlAknI+qgLP8v0ZBkEYmo7sKDz+yCceYPanhHPxHbxkWTligbNgDfS5+KeOlfpqwH tOfir8KkaZHp8uEXdIbb1nDN6lUk/DaPiz41Or+8aNHHiIDNdYOW9hg0QrZfhkNZksFD CB+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iO/DlijeKlIU6w5Axu0X1q3Z8gOHm4UH5Qr0chFaDYE=; b=inlHC1h/mWuMCHqgUZrqIQRARIqoXLrlUyaNFteD3Zoo+NDFithGVn1p7FIVFz/0w7 dxuGoHtYxkaE4A9wanqZmDvJ1wKTgFbtmYLoYojoz3kfpvpqM1kwfrPssd1vmExdF0mF 8+6nE0nf1P34BfAKKVXUtLFjH7tzcXCFBRN+pKAyL/eMULDFFqmCSRzk7YvByfUqXAFt xreOwHU4dySGdkmCDO4V3ttPRW+eosAZH+Q27vabcUG4mYIG/qMPs2e/b4hYUNDbqMJQ qXhyWy3dBXvbmpaeLOync7uYMvFGAEspU+O6RsbQcZg0ifLetGEZkWnsCf1Kf4Qs8PQ5 XsUw== X-Gm-Message-State: AFqh2kpKJ7bIGr9rE7KVOhKSYSlEPqS5MRHDDPYDPNOjJER2AKVCGrh8 3//nXnwTX49z6SVpERqRCbQuZg== X-Received: by 2002:a05:6602:2588:b0:707:82c8:d45e with SMTP id p8-20020a056602258800b0070782c8d45emr15343876ioo.4.1674679553772; Wed, 25 Jan 2023 12:45:53 -0800 (PST) Received: from presto.localdomain ([98.61.227.136]) by smtp.gmail.com with ESMTPSA id w14-20020a02968e000000b00389c2fe0f9dsm1960696jai.85.2023.01.25.12.45.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 12:45:53 -0800 (PST) From: Alex Elder To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: caleb.connolly@linaro.org, mka@chromium.org, evgreen@chromium.org, andersson@kernel.org, quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com, quic_jponduru@quicinc.com, quic_subashab@quicinc.com, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 4/8] net: ipa: rename the NAT enumerated type Date: Wed, 25 Jan 2023 14:45:41 -0600 Message-Id: <20230125204545.3788155-5-elder@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230125204545.3788155-1-elder@linaro.org> References: <20230125204545.3788155-1-elder@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756028912833717070?= X-GMAIL-MSGID: =?utf-8?q?1756028912833717070?= Rename the ipa_nat_en enumerated type to be ipa_nat_type, and rename its symbols accordingly. Add a comment indicating those values are also used in the IPA status nat_type field. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 4 +++- drivers/net/ipa/ipa_reg.h | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index 5cf3ac2b5c85a..178934f131be5 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -68,6 +68,8 @@ enum ipa_status_mask { IPA_STATUS_MASK_BYTE_LIMIT = BIT(15), }; +/** The IPA status nat_type field uses enum ipa_nat_type hardware values */ + /* Status element provided by hardware */ struct ipa_status { u8 opcode; /* enum ipa_status_opcode */ @@ -570,7 +572,7 @@ static void ipa_endpoint_init_nat(struct ipa_endpoint *endpoint) return; reg = ipa_reg(ipa, ENDP_INIT_NAT); - val = ipa_reg_encode(reg, NAT_EN, IPA_NAT_BYPASS); + val = ipa_reg_encode(reg, NAT_EN, IPA_NAT_TYPE_BYPASS); iowrite32(val, ipa->reg_virt + ipa_reg_n_offset(reg, endpoint_id)); } diff --git a/drivers/net/ipa/ipa_reg.h b/drivers/net/ipa/ipa_reg.h index ff64b19a4df8b..b1a3c2c7e1674 100644 --- a/drivers/net/ipa/ipa_reg.h +++ b/drivers/net/ipa/ipa_reg.h @@ -382,11 +382,11 @@ enum ipa_reg_endp_init_nat_field_id { NAT_EN, }; -/** enum ipa_nat_en - ENDP_INIT_NAT register NAT_EN field value */ -enum ipa_nat_en { - IPA_NAT_BYPASS = 0x0, - IPA_NAT_SRC = 0x1, - IPA_NAT_DST = 0x2, +/** enum ipa_nat_type - ENDP_INIT_NAT register NAT_EN field value */ +enum ipa_nat_type { + IPA_NAT_TYPE_BYPASS = 0, + IPA_NAT_TYPE_SRC = 1, + IPA_NAT_TYPE_DST = 2, }; /* ENDP_INIT_HDR register */