Message ID | 20230922075913.422435-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:172:b0:3f2:4152:657d with SMTP id h50csp5714162vqi; Fri, 22 Sep 2023 09:33:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxhUYzhJJOKO59QQTnoXFsfLqXOib6JvODHGfjsFF9gYhvEE0fN6aW1Ynviu6pUsOYUAl9 X-Received: by 2002:aca:2b0d:0:b0:3a7:cccd:33e9 with SMTP id i13-20020aca2b0d000000b003a7cccd33e9mr172514oik.41.1695400393651; Fri, 22 Sep 2023 09:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695400393; cv=none; d=google.com; s=arc-20160816; b=hjq+h0s5IIrk4HNTxWpr1aBvQMq2peBrvfjNveSTKflDXJ/Uc88U4DqpACmxDDA5JN Lwmz4jYrerZ5xY7S4VCqjBPGLn0yVwp/rentWGYYkl6SaqNrX0nQ9DVkrN5RXgMswijX f4WWmDWzunUdbpvu0gmiZF4vUYv66IcIv+sm0RRFX/msj5gILgDp9002KnZUkADSiwW5 8cKAn/u4keGWQRkIVNt05Jkkq8wdH4m+gOo+m59OUe0aDj4Qr/G6mwPV/evD7DuwjZ92 JdpTcGu4ZtOOeaOrd9jViCeEO72jLdaM5uyuppwag8IWFes/qWDVYo+xupMtsEc/GdTy CseQ== 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=J5/X+z5L4FOq50RlVSuWeSgSGom3u292bVfz3mLowiOvDTn2B8hTb73fXaBxhiLWkI VKoAR9NUGRSukACd2do21CpJ3BPZW6OlCiYiDpQEeMGdzhBceKibOQuhLl9D+Sm4Vl4t vzi47q+84L5l7YHqjh+IdvtkplgxnlgGRBp3MHFYic+rj0TmaNllxdzJylYiS64ZSp4D 3w0jnikCRLjq8lD4B2PFMaUd4TyGy2WQ/Za56TTM/Krn4kpHIOI3n8Y81ob1kdllYonD OFZ67YKSpro1W5op7ZIJsWbaPd2lDAOUSslAh7Xi1SM+0cS1DmgTQ+vt5bxuKRZgQoit rEMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=m4PUcdB2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id k5-20020a632405000000b00573fdbc93c0si4251297pgk.892.2023.09.22.09.33.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 09:33:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=m4PUcdB2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id B6C9F8220D67; Fri, 22 Sep 2023 01:02:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232229AbjIVIBr (ORCPT <rfc822;chrisfriedt@gmail.com> + 30 others); Fri, 22 Sep 2023 04:01:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232169AbjIVIBJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 22 Sep 2023 04:01:09 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96723CDB; Fri, 22 Sep 2023 01:00:29 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id 92ECE1BF21C; Fri, 22 Sep 2023 08:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695369628; 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=m4PUcdB2hwlwOLHtO08bRzFGFp4Ckfi5VE/iCrhfsY1LbRe3Fkc88jks0GvifP+FCDLwUv TfRmyGm9TgPN1N5CKTAPebWaGZUrUjHrg3ZZJ7aP4hJbhd93FqvKAEkx0VhQKoxOZWSGDy KW2jXf+H+t8r7fk58QR8DnaZk9iYM0pSljKMWQlD4d0uKM/dMQOihUdTGUk7xAtdKmleUu 6DlH2ksnnDhUFzHbHDaCmON2/30InZS5+yRWdV3wubB0RXdb2mBJYgMmAsO2lQjVxFewLa PNIhFqHLvP0RCZh8rSsTvZ4EjmC271jmOc0ySj4gtg/zytqZZ9oD1oCycUJRrA== 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 v6 16/30] soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans() Date: Fri, 22 Sep 2023 09:58:51 +0200 Message-ID: <20230922075913.422435-17-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230922075913.422435-1-herve.codina@bootlin.com> References: <20230922075913.422435-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.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 22 Sep 2023 01:02:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777756163076656474 X-GMAIL-MSGID: 1777756163076656474 |
Series |
Add support for QMC HDLC, framer infrastructure and PEF2256 framer
|
|
Commit Message
Herve Codina
Sept. 22, 2023, 7:58 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; } }