From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3A9EC433EB for ; Sun, 28 Mar 2021 17:31:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C218661964 for ; Sun, 28 Mar 2021 17:31:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231537AbhC1Rbd (ORCPT ); Sun, 28 Mar 2021 13:31:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231199AbhC1RbS (ORCPT ); Sun, 28 Mar 2021 13:31:18 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE529C061756 for ; Sun, 28 Mar 2021 10:31:18 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id k25so10470349iob.6 for ; Sun, 28 Mar 2021 10:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qv30pzI3zwmFw9Iia44xcHu7h1Qg2DXbxdalh98PfsI=; b=Ee1M7mbekaNT7LhG4C/KiXAOx11189FcQDXokcoib8UB+YNmWOaD/9E9z80fjrDiIl fw496M5qPxQ7113cVh5VBC2sq/LPe43I9wq/RtQCtq27wA5m0ydKM2/vgEQ8YiT32Ibv UzeFz1+TYLylr66pMReHpimV2R+MfsXOCZYZpCfygSgxEyO9RCFoj7APXpJY5oh7isFh E/MqiJIVQrZ5m6FsI93f9VbciYKR21c/O1P3vl4LwRWEQ2+Q4wWZNOCgOSVny4ffjgij NWEr3yrMRoGxS07iKXhxVK/Ze0qDKWzTI4gRH77azm4wbdPJU/wmfJhFQvK6uTtjRd4U i1rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qv30pzI3zwmFw9Iia44xcHu7h1Qg2DXbxdalh98PfsI=; b=gK78ni1+qI7gfh6jIt+qPLdQL0HEl5fQ6Y4cPvXORkWN/CZNipBALhjqgb+wyJEmTM TicHa+3HrU9ix9L8FBdgL67A5q9u+esBr5CfC3TwgsU0wse2dUKuG0s4Z4vmWaM+yV5y LHMOOgU5VP+91RlDzc26AFrBmhgKNDC9umC0A3vxZYHLxBRcb3TTZ7D8jprAz356UkSb p2k2bDxvezTEQ8KWBoLDysTW0meMJhYgRwNqGNMfSfh9sLn8PFdN55bd6tXdLqeu1arF ZxChNdIGXZwB813WGThEB5Ck68cpI9MyZEVAqwDZva2MJYe2OimpkZRdkhfHQbnNkzJV SQXQ== X-Gm-Message-State: AOAM531SeRm0Vb6IFkAUMIvPcjy6xgWVQmbKI8stLY+E7arQCHx6ku4z R+G1YXYv9VWTgFMtDo6+R9HQQQ== X-Google-Smtp-Source: ABdhPJwh1NmslvCGIIYwVa6Y/OW/+XvLOhnYiVe/sNh6eTeCmZUL0UeT8V9nO3ZCTjnIRDR7gdLQUw== X-Received: by 2002:a6b:d20e:: with SMTP id q14mr17513741iob.200.1616952678218; Sun, 28 Mar 2021 10:31:18 -0700 (PDT) Received: from localhost.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id d22sm8014422iof.48.2021.03.28.10.31.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Mar 2021 10:31:17 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, subashab@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 3/7] net: ipa: don't define endpoints unnecessarily Date: Sun, 28 Mar 2021 12:31:07 -0500 Message-Id: <20210328173111.3399063-4-elder@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210328173111.3399063-1-elder@linaro.org> References: <20210328173111.3399063-1-elder@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We don't typically need much information about modem endpoints. Normally we need to specify information about modem endpoints in configuration data in only two cases: - When a modem TX endpoint supports filtering - When another endpoint's configuration refers to it For the first case, the AP initializes the filter table, and must know how many endpoints (AP and modem) support filtering. An example of the second case is the AP->modem TX endpoint, which defines the modem<-AP RX endpoint as its status endpoint. There is one exception to this, and it's due to a hardware quirk. For IPA v4.2 (only) there is a problem related to allocating GSI channels. And to work around this, the AP allocates *all* GSI channels at startup time--including those used by the modem. Get rid of the configuration information for two endpoints not required for the SDM845. SC7180 runs IPA v4.2, so we can't eliminate any modem endpoint definitions there. Two more minor changes: - Reorder the members defined for the ipa_endpoint_name enumerated type to match the order used in configuration data files when defining endpoints. - Add a new name, IPA_ENDPOINT_MODEM_DL_NLO_TX, which can be used for IPA v4.5+. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sdm845.c | 12 ------------ drivers/net/ipa/ipa_endpoint.h | 11 ++++++----- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/net/ipa/ipa_data-sdm845.c b/drivers/net/ipa/ipa_data-sdm845.c index 49a18b1047c58..ed0bfe0634d98 100644 --- a/drivers/net/ipa/ipa_data-sdm845.c +++ b/drivers/net/ipa/ipa_data-sdm845.c @@ -144,12 +144,6 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { }, }, }, - [IPA_ENDPOINT_MODEM_COMMAND_TX] = { - .ee_id = GSI_EE_MODEM, - .channel_id = 1, - .endpoint_id = 4, - .toward_ipa = true, - }, [IPA_ENDPOINT_MODEM_LAN_TX] = { .ee_id = GSI_EE_MODEM, .channel_id = 0, @@ -159,12 +153,6 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .filter_support = true, }, }, - [IPA_ENDPOINT_MODEM_LAN_RX] = { - .ee_id = GSI_EE_MODEM, - .channel_id = 3, - .endpoint_id = 13, - .toward_ipa = false, - }, [IPA_ENDPOINT_MODEM_AP_TX] = { .ee_id = GSI_EE_MODEM, .channel_id = 4, diff --git a/drivers/net/ipa/ipa_endpoint.h b/drivers/net/ipa/ipa_endpoint.h index 0d410b0504562..f034a9e6ef215 100644 --- a/drivers/net/ipa/ipa_endpoint.h +++ b/drivers/net/ipa/ipa_endpoint.h @@ -25,15 +25,16 @@ struct ipa_gsi_endpoint_data; #define IPA_MTU ETH_DATA_LEN enum ipa_endpoint_name { - IPA_ENDPOINT_AP_MODEM_TX, - IPA_ENDPOINT_MODEM_LAN_TX, - IPA_ENDPOINT_MODEM_COMMAND_TX, IPA_ENDPOINT_AP_COMMAND_TX, - IPA_ENDPOINT_MODEM_AP_TX, IPA_ENDPOINT_AP_LAN_RX, + IPA_ENDPOINT_AP_MODEM_TX, IPA_ENDPOINT_AP_MODEM_RX, - IPA_ENDPOINT_MODEM_AP_RX, + IPA_ENDPOINT_MODEM_COMMAND_TX, + IPA_ENDPOINT_MODEM_LAN_TX, IPA_ENDPOINT_MODEM_LAN_RX, + IPA_ENDPOINT_MODEM_AP_TX, + IPA_ENDPOINT_MODEM_AP_RX, + IPA_ENDPOINT_MODEM_DL_NLO_TX, IPA_ENDPOINT_COUNT, /* Number of names (not an index) */ }; -- 2.27.0