Message ID | 20230725092417.43706-11-herve.codina@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2360651vqg; Tue, 25 Jul 2023 03:05:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlH3EGHDkHYV8/qbyJBEVOd/uK5l3eFt8wAt1pdw9X7vNbf1zz5EcIKn2ILbNWiEJZ5H0o+K X-Received: by 2002:a17:907:7858:b0:994:1844:caec with SMTP id lb24-20020a170907785800b009941844caecmr9353074ejc.77.1690279538290; Tue, 25 Jul 2023 03:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690279538; cv=none; d=google.com; s=arc-20160816; b=ip9ggua1bi6DV+5TvKXh7hTWee083wMIY0HXzJkUOuCUJ+lfbqEpz51Sl7E82QfPok +uUgVCcyYOlhwzIlWOuXOwbd5ojwH7LAjcpSQQGNYs8lfovGk8D1XA0Zn8PxNk4wVRuj itE1XCRkOi2El2ByjYcHNn2sLaABoaP1grN68owCxfbtDsLcXzrWWAmnNbjDqPeZ3Xk2 0XgaxXpkR6MChOdPCmvL1AnKBUamnJkAYN5+niF5lVvmgbR34+crz7ALUOXC3hdqdEws ojtkuFOf2PSGK5ajAKRH6BCabCGLpcpAqdRW5svJ134blGul5u4VYAnL83AsrYb6x6Jd BRYg== 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=KIkdPV6MaeHFZBx6skgpAKXFdwR5xmLQ46nUhLeqx30=; fh=j5z+1OhFuGBFoHpqsKfNW8PvbyYDiDyztgOSDrYZWKg=; b=ITMKgck0pqTOxtYGMAF+oJ35fDlJSLCSiZKnVX2a3Vfjunx8YiRKzuFuUDsSOEle3c UIAZoax7woAxwvU3kFoQ4rKnerbSWxNSVAl6HnNdFJI5pGwTqyrkusttb19TRyAZi5yB Z+edwWtOptoSgzZwYQGjDvWBWpmV7Njsi3lakHdOZi2KQ1a6+4arLWiDdV4YMifWMfHB ltXaf810G6EU9aixpOVR/wvUokydLeuX32DjMxT4zIu8oDQvBRXISF5oJi5q4vWy6ATu rm9yVfRoJQR2aUcyVEf5Wy5IATP5MAvT54f/kxzs0dUoNS2f4OdUlx1uGrJeH6DTR0e2 lPGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=T040aXlI; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h18-20020a1709062dd200b009936afb1e23si7587927eji.130.2023.07.25.03.05.13; Tue, 25 Jul 2023 03:05:38 -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=@bootlin.com header.s=gm1 header.b=T040aXlI; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232643AbjGYJ0r (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Tue, 25 Jul 2023 05:26:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232757AbjGYJ0T (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Jul 2023 05:26:19 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3F7F2682; Tue, 25 Jul 2023 02:25:24 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id EAE5940006; Tue, 25 Jul 2023 09:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1690277123; 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=KIkdPV6MaeHFZBx6skgpAKXFdwR5xmLQ46nUhLeqx30=; b=T040aXlIsFGq0q36Y0xzBlwIYf9tTZSodsJCutia2fhhHJPBeN8Z2yvzxPxpOCrCkJ4DFi e90ySUJ6umECLPK1XO5XWMQ3MFSYH+SezXCg5XrW01P1KhvMxnDzgnoJ3A31984ZdUSfHE BgiLPc9Qkbb9X3GtcaMYuqQpDCcIRp4X8WC0tHwxLZP/DtnudG3brVCRe/vlG8Teh4M3O7 qmo6FSr3Gns8Zz5UQ33cIv1KLYgbKCcEMG8XLqr1C46YM+88tRiqZGZRsx8CZzxEHn/R2b LZlLiZ+PyJBK6ujX2XLWPcyWeKQo+d9h0gUEb3XwKZdwPnvRH67u4j0DT1yt1g== 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> 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, Thomas Petazzoni <thomas.petazzoni@bootlin.com> Subject: [PATCH 10/26] soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans() Date: Tue, 25 Jul 2023 11:23:46 +0200 Message-ID: <20230725092417.43706-11-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230725092417.43706-1-herve.codina@bootlin.com> References: <20230725092417.43706-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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772386557551824651 X-GMAIL-MSGID: 1772386557551824651 |
Series |
Add support for QMC HDLC, framer infrastruture and PEF2256 framer
|
|
Commit Message
Herve Codina
July 25, 2023, 9:23 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>
---
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 658aef63505e..2753db0b914a 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; } }