Message ID | 20230809132757.2470544-14-herve.codina@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2957608vqr; Wed, 9 Aug 2023 10:23:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjtdgtROKM9TG2uwXJKwsVk3CHSDCk3Ni0CSr+oU1ZkqPJtsYdIQQxLVt9L5/qnUuU2epc X-Received: by 2002:a05:6808:2182:b0:3a7:3100:f8b9 with SMTP id be2-20020a056808218200b003a73100f8b9mr4121241oib.31.1691601826628; Wed, 09 Aug 2023 10:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691601826; cv=none; d=google.com; s=arc-20160816; b=N4B6DIwLgkkduGbLKezeL3uQSJN8HPpdUlpxsKFQqgcnLuL8+TPPVpvWOLFzTg7Tvr 1jxMgSkclCh2rxXHDThH89ZYaFH+6zOAL0MjZ9Qr9IDXFSrkZHKFZH4GUhXwDvE35O0Y //K3RP6lEO6bL4kJSonVNfx1K6yjM0FHZVsD7nqZX4MGlbKLWhvCDvmG9FzAr4FxSut4 WEn75CU9Pn+xLLOjDdzEt0jsYHCQBZwiOytqkXKEFAnHgZ4t+2nWYoLcWe18qT3ZDdZv lWZvaxtxUvRuyyrT1DqH1dfDiX9AN0Q9WgSkwlUZnNYUIVVTcyUqU4gOf47q0qadZLgm xH+g== 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=k4qFOLU4UFf4hZAGFpk0zvbrs2Ky7B8pqeERMOjBUl0=; fh=OtJVFpZ5Y8/ND7g8QcUIbRSFhG4LznwcYYtG4zWKevM=; b=kkTibfsMh5gux6H3T2vFUYdkqCamTqg21yGEWLPIy8fMLtWvfi9LEukm/Ttr7YgM3l wxfEQCriNremSqlB7v+sxSYAxpYHz81V/iy9uO5IfEgrHyeBI5FS+1PGFAgRuaGKZm/j NrfMn4oIOIGXk/X6p7Hk2TJy8M+EkGGm2Abwpl2QoJYyZWwPKfFCwrCeYKC+KEkq9qAv gcIGLBbqxQynS5KD8vVo+gFioVOJvttFUICaEHM4uhB1SM8WQugNDuLQz0s7SuJBuTIN qqbFw8UGy5vfq/fHDC59ZIvAbZQKrAjHLAKiMgKeAoutrRrDT8WfdsZ5ZT4mswW6LfGE y9Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=NeRg8d0i; 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 h19-20020a63c013000000b005639473079csi9162549pgg.379.2023.08.09.10.23.32; Wed, 09 Aug 2023 10:23:46 -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=NeRg8d0i; 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 S233105AbjHIN32 (ORCPT <rfc822;craechal@gmail.com> + 99 others); Wed, 9 Aug 2023 09:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233027AbjHIN24 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 9 Aug 2023 09:28:56 -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 75371273E; Wed, 9 Aug 2023 06:28:35 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id C2C3A40009; Wed, 9 Aug 2023 13:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691587714; 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=k4qFOLU4UFf4hZAGFpk0zvbrs2Ky7B8pqeERMOjBUl0=; b=NeRg8d0iVl8Pgu17x6G79m9Q8ecK5pQLbn+I26x5s/Vzi8w0z7A7/dI5nFhEe4jH1HoH2F ByZpWy1gsnga6uVgtHFb12ouOPuuIKj0aiLJnS9uZEJdU+lqvxEgSw4KwJv8QCPBVFj49c Eotsk2U0JqA7q88dX0L85+V3N1Vwy+gvAmTiDigwEvtyrOdu9UXNO+ta9g+HhfrmOfiwXP t4ymUwiocC8h1sGeo3Kk658ppEEKXsdth+KNQPlCRiCPuJg3Pqb6eRPJXrcJwB9aFCUzIa 1Rw5cmXqGvdUq7XzzygqjhFa0ZH0LSi+I4qz+GU/+p0vdUreYdpeK0K/xOeqyw== 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, Thomas Petazzoni <thomas.petazzoni@bootlin.com> Subject: [PATCH v3 13/28] soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans() Date: Wed, 9 Aug 2023 15:27:40 +0200 Message-ID: <20230809132757.2470544-14-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809132757.2470544-1-herve.codina@bootlin.com> References: <20230809132757.2470544-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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, 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: 1773773076622737438 X-GMAIL-MSGID: 1773773076622737438 |
Series |
Add support for QMC HDLC, framer infrastruture and PEF2256 framer
|
|
Commit Message
Herve Codina
Aug. 9, 2023, 1:27 p.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 2416408bb7e7..07fa3c265858 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; } }