Message ID | 20230928070652.330429-17-herve.codina@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3210492vqu; Thu, 28 Sep 2023 03:34:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErRQef+L06h2JZRKlnnWe7yshYJVBZVdw3jEVWK/EToHKtn3WK8qDyzqb5UnoARqrXY+Zr X-Received: by 2002:a17:902:c18d:b0:1c5:ce3c:c391 with SMTP id d13-20020a170902c18d00b001c5ce3cc391mr605825pld.12.1695897273436; Thu, 28 Sep 2023 03:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695897273; cv=none; d=google.com; s=arc-20160816; b=vdlXUBw7IIKlR7p0MMd5pDayXcQiUERViAJtYMKYX9mlOVIfJR+VjIADvpOtrZsi5t zKCP2MJcNwd7DVnHbTK2n7FWrZhYykMjklQE8shgk/IN1AgvoBhGUwQcmZ/bqE7mMTxG G4trSgTXJPCwldFmhzicJQzDTqFsoG21/mo/YEqhaoWwomX6P8qQ5/VuzkRVz7+a258O w0nxVnHGSp50vhSSZhWIwHLPHvKAHwvTMYQUFOojAr36R7JeR+EgyqkT3bl7bRbMunNs 7knb0LF0HqQIvP2bRl5dOWMXTn8bP2mmCo0GzqqMZidybC9rVFqjKxEHsAtv0p4ROfQb d86g== 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=o/xbDf8eMD5E6WB0NjH/5DUWVpmxRzR+EOenyt8frKM=; fh=8Kc64rxAF0/ep7JtUzveSO6N9QMBWtHyiJ9nqNn2Uww=; b=0r9eHteHsup6Kn46/SYJMTCaBCXLfx60wHXz1n6f9Ikq8Bt2NRhLQSnsM/9/7Kiw6K fWd7PUWOtpFVkHk+f2lnic4/6wQgqWbha84NWxHJjEn4IrR+vc6aFzsWOQsY4hCa8kab HRW+0bqMjkEvnJ4wgZGhvyA7SqtLn/1ruQO3ivZPvckfq7eqXKqJXKezoZyy8hXK9M27 ldwcadtryYOojuRpddCT+YJs+GzxX9ZmR9dYYC599017MDaQnBC+gGpZYSR6JyNDIdNQ PMVu43Im9OvW1hefslVEtRwNkP1wuOVUx66pUyWkdJdsYpYlHX4ME1AwBTo7T3snPKwe XbMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=dGICtuvR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k5-20020a170902c40500b001b80ecdcb88si20046160plk.473.2023.09.28.03.34.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 03:34:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=dGICtuvR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6D9AA80C876F; Thu, 28 Sep 2023 00:10:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230490AbjI1HJ5 (ORCPT <rfc822;ruipengqi7@gmail.com> + 20 others); Thu, 28 Sep 2023 03:09:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231612AbjI1HJh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 28 Sep 2023 03:09:37 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9982A1FFB; Thu, 28 Sep 2023 00:08:03 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id 95BC620009; Thu, 28 Sep 2023 07:07:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695884882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o/xbDf8eMD5E6WB0NjH/5DUWVpmxRzR+EOenyt8frKM=; b=dGICtuvRjk7Hddbz3PCOogHz/QjfDd/lv87e3QspmRSY6kGl5kuGhwwt689rRtqI31dnXA t969wO06bCjVjzB2NI8Y6uj6lrbPoKKdpEnoZ4wWsUlbM+XGzrbB52F/VqQfLDc9qj+2ug lbA98bHjc6Tp1Y5UuA5L33ew+c2LbVLHeORaeUMNgtYAR5+RvMpF8bn0FXbtUw4RET2SSK Kus+UYWyxeZpLQU/wnFR8JkirfJU9TFXNMVe1Oe11nUK4JQnFhE+w7qFNivmWs8tzcjr/h bk8JDXSJU56nwBEpuRsm1EbfTKlZkG0ekZ0dyc8GCYQLf5BW85X8RF2qR4/5bw== From: Herve Codina <herve.codina@bootlin.com> To: Herve Codina <herve.codina@bootlin.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Qiang Zhao <qiang.zhao@nxp.com>, Li Yang <leoyang.li@nxp.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Shengjiu Wang <shengjiu.wang@gmail.com>, Xiubo Li <Xiubo.Lee@gmail.com>, Fabio Estevam <festevam@gmail.com>, Nicolin Chen <nicoleotsuka@gmail.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, Randy Dunlap <rdunlap@infradead.org> Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Simon Horman <horms@kernel.org>, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, Thomas Petazzoni <thomas.petazzoni@bootlin.com> Subject: [PATCH v7 16/30] soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans() Date: Thu, 28 Sep 2023 09:06:34 +0200 Message-ID: <20230928070652.330429-17-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230928070652.330429-1-herve.codina@bootlin.com> References: <20230928070652.330429-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 28 Sep 2023 00:10:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778277179745972883 X-GMAIL-MSGID: 1778277179745972883 |
Series |
Add support for QMC HDLC, framer infrastructure and PEF2256 framer
|
|
Commit Message
Herve Codina
Sept. 28, 2023, 7:06 a.m. UTC
The timeslots checked in qmc_check_chans() are the timeslots used. With the introduction of the available timeslots, the used timeslots are a subset of the available timeslots. The timeslots checked during the qmc_check_chans() call should be the available ones. Simply update and check the available timeslots instead of the used timeslots in qmc_check_chans(). Signed-off-by: Herve Codina <herve.codina@bootlin.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- drivers/soc/fsl/qe/qmc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c index 1189e6076e37..269d10cd3c7a 100644 --- a/drivers/soc/fsl/qe/qmc.c +++ b/drivers/soc/fsl/qe/qmc.c @@ -914,13 +914,13 @@ static int qmc_check_chans(struct qmc *qmc) rx_ts_assigned_mask = info.nb_rx_ts == 64 ? U64_MAX : (((u64)1) << info.nb_rx_ts) - 1; list_for_each_entry(chan, &qmc->chan_head, list) { - if (chan->tx_ts_mask > tx_ts_assigned_mask) { - dev_err(qmc->dev, "chan %u uses TSA unassigned Tx TS\n", chan->id); + if (chan->tx_ts_mask_avail > tx_ts_assigned_mask) { + dev_err(qmc->dev, "chan %u can use TSA unassigned Tx TS\n", chan->id); return -EINVAL; } - if (chan->rx_ts_mask > rx_ts_assigned_mask) { - dev_err(qmc->dev, "chan %u uses TSA unassigned Rx TS\n", chan->id); + if (chan->rx_ts_mask_avail > rx_ts_assigned_mask) { + dev_err(qmc->dev, "chan %u can use TSA unassigned Rx TS\n", chan->id); return -EINVAL; } }