From patchwork Mon Oct 24 16:56:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 10007 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp617432wru; Mon, 24 Oct 2022 12:31:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7DIpZiouOdO9986tFoWZjHobZVZ/nmwR767ps9iDzopPQTMrgoXRT05qWEHYfULA0nYXQf X-Received: by 2002:a05:6a00:4093:b0:563:2d96:8f44 with SMTP id bw19-20020a056a00409300b005632d968f44mr35255340pfb.4.1666639895174; Mon, 24 Oct 2022 12:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666639895; cv=none; d=google.com; s=arc-20160816; b=tK6tRtejAzcAepkQY1/4DdMRc50mXNAK3PZwkydo37FZgc9torLHPjL5sUiIY0lTiJ /xWJ8KeCswUuvU5osifRLC5A/gLL0VloD4pm230GVXvdqg045SOUwYrgTsZ3KfQ56SPU /XipimD09Jnw09ijRi8zivTa8Pqcflx/f5OXW1IerWpgtzqg2k9Kd40wmULZbCa2Ltyg 4o+5pD9QdorS/MFyMhyY5u35yvaw3Jat4Bpon5sZGipb6fDjI9FJuaCcqKrlrptQZ+C6 +9BNILLjhwXrZfxcwBCHmVkanQ9slV7owV9xJ0b919VUOg6+0mOVLu74p6bustIVM9Le iYBg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=FyTv7D4Ail3A9f9S3utxw/t9/+Mc7/bdxQ5aSmaZ4hU=; b=pumdYnFoKpuTEJR/k4zqBP0rZZm856CzeYMrDmAJGqlrrAUodvkpbzmzSrpHmUeRbI 2+LVn0XJlinK4Yf68WhRrnPz5wCvcGjHmgUcAWtMyBX5cUjaXvM8Qex/i7UvGepmevrT Ay17ot/DS11H1+2e/+dEAnEH5KgVt/Wu8hi05kxGsZJZvb3OtM/+/187U44730DYEFvG k6VqDDFULFiF5aLx5gAjYo9x1ROIIMkiGE82UymlzAB+n0dSrYxFqqxNLDFTBlDSGmAg ljOMt4vowgHmr8qkOHtbc/hbOGnClphnEy3NP1BO91ZgkC/yHxJgO3+pwG/BXrJ9xWbK JKOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="eaIXARF/"; 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 y12-20020a170902700c00b00183f6ff534dsi282143plk.535.2022.10.24.12.31.21; Mon, 24 Oct 2022 12:31:35 -0700 (PDT) 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="eaIXARF/"; 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 S231690AbiJXTaq (ORCPT + 99 others); Mon, 24 Oct 2022 15:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233525AbiJXT31 (ORCPT ); Mon, 24 Oct 2022 15:29:27 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAC78192994 for ; Mon, 24 Oct 2022 11:01:00 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id j15so6889944wrq.3 for ; Mon, 24 Oct 2022 11:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FyTv7D4Ail3A9f9S3utxw/t9/+Mc7/bdxQ5aSmaZ4hU=; b=eaIXARF/eciHDHcBHNEBNWKsY1Nd3axjYeOy2NVHQuOI4PSDtN+yb9t3ZifnpWKhxq 0dwN53gdvnQqyauuoaCGc7C2mtMM/qUqlmqXSgRSejABUOy02ci4fd8g7z7+FbGVeTMH FUA4D31yl6HUu8NReIbBKjRzMEnGWTBgyVWUNboWaWAbmcR93xZr4OV9iL+pLxoPGYJW 36xJyePTneQ6Rs6uKLGQvnCC0FxVFQEf3Ve5BWeAsQ1J/oDgSI34NjYfYr9jE3eF4IgT Ca76r/7EKLppXClh5JwgNKkeBTaGiU7odx2jUkqq7M9zDuO8pUw86Jk32HgxXLTx6JSU 1RCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FyTv7D4Ail3A9f9S3utxw/t9/+Mc7/bdxQ5aSmaZ4hU=; b=Ce6vR13Dx+nuP2nt561O3V08cMOXhOpsWfjXcrxEU4X59fG1nq3DH/rU/T7qfx/HQd d+B89+K4pub5NNSx+qhkLlPOH372+HQcWk4MLQYoSy+Lk4/bQed0I11W9hoDyXI7BgAo KpKJKvAFirluT/dsifffr6hjfCovEHAZgnyq7wMXjEl3XrHbYKP1kPhMWgrYtDtmj5tW 04+AoZsrC4em+nLdnDOB3M99pgl4UkyIO1Ezho+mnOjpmg80YLAQm2PUG5kPaooqly2X N9GRLsvxJFj6rOk8NVvKLhpgKPctraiOivo7IprkJksOYNQyKYL02faQbn7MZlDwg4P2 KzIA== X-Gm-Message-State: ACrzQf2PRxpi+67k/l6/NWLRPk/gHCPYXGjKTns+WtiaxMrn0S2e6XeA KDcBBBkdn7bRSI4YH057crIzDvqWr7GriQ== X-Received: by 2002:adf:f081:0:b0:236:5e7c:4ec2 with SMTP id n1-20020adff081000000b002365e7c4ec2mr8566334wro.641.1666630647908; Mon, 24 Oct 2022 09:57:27 -0700 (PDT) Received: from localhost.localdomain (cpc76482-cwma10-2-0-cust629.7-3.cable.virginm.net. [86.14.22.118]) by smtp.gmail.com with ESMTPSA id r20-20020a05600c35d400b003b47e75b401sm9116426wmq.37.2022.10.24.09.57.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 09:57:27 -0700 (PDT) From: Caleb Connolly To: Alex Elder , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Caleb Connolly , Alex Elder , Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, Konrad Dybcio , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Rob Herring Subject: [PATCH] net: ipa: fix some resource limit max values Date: Mon, 24 Oct 2022 17:56:34 +0100 Message-Id: <20221024165636.3979249-1-caleb.connolly@linaro.org> X-Mailer: git-send-email 2.38.1 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=unavailable 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?1747598595013967103?= X-GMAIL-MSGID: =?utf-8?q?1747598595013967103?= Some resource limits on IPA v3.1 and v3.5.1 have their max values set to 255, this causes a few splats in ipa_reg_encode and prevents it from booting. The limits are all 6 bits wide so adjust the max values to 63. Fixes: 1c418c4a929c ("net: ipa: define resource group/type IPA register fields") Signed-off-by: Caleb Connolly --- drivers/net/ipa/data/ipa_data-v3.1.c | 62 +++++++++++++------------- drivers/net/ipa/data/ipa_data-v3.5.1.c | 4 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/drivers/net/ipa/data/ipa_data-v3.1.c b/drivers/net/ipa/data/ipa_data-v3.1.c index e0d71f609272..7ff093f982ad 100644 --- a/drivers/net/ipa/data/ipa_data-v3.1.c +++ b/drivers/net/ipa/data/ipa_data-v3.1.c @@ -187,53 +187,53 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { static const struct ipa_resource ipa_resource_src[] = { [IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = { .limits[IPA_RSRC_GROUP_SRC_UL] = { - .min = 3, .max = 255, + .min = 3, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DL] = { - .min = 3, .max = 255, + .min = 3, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DIAG] = { - .min = 1, .max = 255, + .min = 1, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DMA] = { - .min = 1, .max = 255, + .min = 1, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { - .min = 2, .max = 255, + .min = 2, .max = 63, }, }, [IPA_RESOURCE_TYPE_SRC_HDR_SECTORS] = { .limits[IPA_RSRC_GROUP_SRC_UL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DIAG] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DMA] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, }, [IPA_RESOURCE_TYPE_SRC_HDRI1_BUFFER] = { .limits[IPA_RSRC_GROUP_SRC_UL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DIAG] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DMA] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, }, [IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS] = { @@ -272,36 +272,36 @@ static const struct ipa_resource ipa_resource_src[] = { }, [IPA_RESOURCE_TYPE_SRC_HDRI2_BUFFERS] = { .limits[IPA_RSRC_GROUP_SRC_UL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DIAG] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DMA] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, }, [IPA_RESOURCE_TYPE_SRC_HPS_DMARS] = { .limits[IPA_RSRC_GROUP_SRC_UL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DIAG] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_DMA] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, }, [IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES] = { @@ -345,22 +345,22 @@ static const struct ipa_resource ipa_resource_dst[] = { }, [IPA_RESOURCE_TYPE_DST_DATA_SECTOR_LISTS] = { .limits[IPA_RSRC_GROUP_DST_UL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_DST_DL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_DST_DIAG_DPL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_DST_DMA] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_DST_Q6ZIP_GENERAL] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, .limits[IPA_RSRC_GROUP_DST_Q6ZIP_ENGINE] = { - .min = 0, .max = 255, + .min = 0, .max = 63, }, }, [IPA_RESOURCE_TYPE_DST_DPS_DMARS] = { diff --git a/drivers/net/ipa/data/ipa_data-v3.5.1.c b/drivers/net/ipa/data/ipa_data-v3.5.1.c index 383ef1890065..42f2c88a92d4 100644 --- a/drivers/net/ipa/data/ipa_data-v3.5.1.c +++ b/drivers/net/ipa/data/ipa_data-v3.5.1.c @@ -179,10 +179,10 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { static const struct ipa_resource ipa_resource_src[] = { [IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = { .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = { - .min = 1, .max = 255, + .min = 1, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_UL_DL] = { - .min = 1, .max = 255, + .min = 1, .max = 63, }, .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { .min = 1, .max = 63,