Message ID | 20231011061437.64213-17-herve.codina@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp335588vqb; Tue, 10 Oct 2023 23:17:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqDBehF5f91TW8EjCwPF9xpDU85pHE9mm9JrXjfBMaY6X6TNQ60zsuM72s1a5e6LIRyCCo X-Received: by 2002:a17:90a:3da1:b0:274:60c7:e15a with SMTP id i30-20020a17090a3da100b0027460c7e15amr17894012pjc.4.1697005069967; Tue, 10 Oct 2023 23:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697005069; cv=none; d=google.com; s=arc-20160816; b=jHhXw+XxLv1zKBEbh00NoqMt2HeSYqVY32orvyad0mBTYLHBDvLih6bTSdSUFnu1yN zy6Tr+2Joa0XIn9jjfPUFOMdqsfPWUqUAKuGQvm8N8txGq5PPZd6x1djWTI1lOOBxOt3 r/NeDxrjesTpcPSHO6hTXYOg8LoGeQYATpCA9m4JYB+Rji4WELJ5KqtCMtJwPyYkqqrG tVe6ewwWF0WWqPoF8Hw3ppz1cnlmJQJqK/BPIhnGDgeZzUY5dTnbqOvqbgc3zfNXHe2z OH9SOS53Ud2M2GdcRpPpTHsQAtQhVJKS32JzjskvF9Myq7MfLySg9t4+IoVe2iSrjs4U LXqQ== 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=5rCQDomVZxLXb7yR2oN4iSS3zxUnzGJP2HoQaRzhQu0=; b=nMaKhE9YxxEcyorByeAbnXrQ1cc04iPpQ88VMXQzY26pCKj0MdyHdlKYSlrk71bPtQ wth8EYeWUApMNcWT+vjQfs5fJWYvEWYngVTS7JpK+4W1vi/MEbNokXhbefPJdyo71+el 9dyR1RPMSD9EKMCZD9R8FakddNVv7X3LTONN3bl0W5YeH9YI6fARfMDBYnKav18l35+B 7qwpKdfXDngDQXiD6aFoBrMq27SWGdZmexkqAtix4g0g1gXG0y0OhdBPjXcPv1CyKHnn 8qA7kLBKJYEP3Hgiv+kCMwsLdWdcyAbYzkWxmc4KKfodAkie7s0dGfWwbDjCaPha/sec W59A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d6utmxaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id d18-20020a17090ab31200b002790e9120ccsi15821836pjr.61.2023.10.10.23.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 23:17:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d6utmxaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id AC3368022C51; Tue, 10 Oct 2023 23:16:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345418AbjJKGQo (ORCPT <rfc822;rua109.linux@gmail.com> + 19 others); Wed, 11 Oct 2023 02:16:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345404AbjJKGQH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Oct 2023 02:16:07 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F5AFF1; Tue, 10 Oct 2023 23:15:46 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id 05CBFE0008; Wed, 11 Oct 2023 06:15:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697004945; 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=d6utmxaYZ/UokS2v4tX4PyoKpGnG55n32mEnVFgFUIiwNij5Ia/XlH7RGe8ugQvm2QFakR +JJPw+bPMtuiWCxhkz1CpQahFJEsWvHg4La026iIS6DEqPSl2b9dtQDhDjOTJIpLkI/blP zaNgsMrv4YcTSRtqq+FC6G9tJR8TJGr29B+3Bn7e5Lv0j2CFo8aQfpsl9PwkP4AYr79xHw xQ+MJvZhh5FLjdr0eZCcTdO1UpfiBZomzoGjajwisY/j8/5FMwJcQbVRx98G78befP0prv kJvbQTjX6lY8y5c9e62eBM+nPqufngWzdKnCKWMJORpn4uHAoI3g2eTZ0AvUTA== 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>, Lee Jones <lee@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 v8 16/30] soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans() Date: Wed, 11 Oct 2023 08:14:20 +0200 Message-ID: <20231011061437.64213-17-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231011061437.64213-1-herve.codina@bootlin.com> References: <20231011061437.64213-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=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Tue, 10 Oct 2023 23:16:58 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779438788463092829 X-GMAIL-MSGID: 1779438788463092829 |
Series |
Add support for QMC HDLC, framer infrastructure and PEF2256 framer
|
|
Commit Message
Herve Codina
Oct. 11, 2023, 6:14 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; } }