Message ID | 20230817165749.672-1-jszhang@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp1315613vqi; Fri, 18 Aug 2023 04:04:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2o/BWCzoNR36knFj0LhyYi2p6+RMtnFh+a1oGOrWh4jRQ2WYxBUZSJT0Aj3solqpv7/T/ X-Received: by 2002:a05:6402:60f:b0:525:7cd4:34da with SMTP id n15-20020a056402060f00b005257cd434damr1863718edv.40.1692356697701; Fri, 18 Aug 2023 04:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692356697; cv=none; d=google.com; s=arc-20160816; b=oIsVo7o07KcPi8EVjrdOf451YQyrUQtChEHTCgWiD7acS+kYxE7M4900hpZGlJFCSK ciba6tF7TGuzE02uxSi/xYMI7b3fGy1EabWz1EzvEy6Q4uZPXyp9W5hDAaNUEGWT8BeR Z4Kx1uQi9wagvW2J0q9KUZVIIekmmGisGabztz2XsQI84eWizVISBa2AvaMpcIyCl274 jNWNLKJdCFAdIc4VzjIsEvIQz9GzxilmRfCOlWQshJnhXEXVTJgYGCI94S2piRAv9Lp1 vzeuhLuHWW7RSt0Bhfg/acKZhYtHJuUwj5YtstUzLBgFbe4xoGVaZs4x5/e7NjKQucWy 0ZrQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=kWkLwmkveaeDUJ4Fr1VYXQRQ8gUrs57TRkHoNPBFHhc=; fh=UEVvRAFK6gmZxZNnJDUC7AmNk/iU78fiWA23OmiDi44=; b=kyKLhv0kAYDnzljzUB28V4hkSMyQ9aGx9V1+3gNg4LnQXvMxBUkJxKL4cEm+CxhdAO 6IpzXl0P/UwN6Q5Nm695xd869ZLEWi72ugnFftT1eh3Z90gfjw40B/Ff8sU0TwUzz8zV yPG9r9AuvcPSt3HJL8EfVO9vdcoR4z2+9XjtCVrULE8nO/6I/XFsfiZEJYQ2fkiV7Rlr h3R7yal9jHzZ0/tCdwnEVrckz7+alHLhGFVxe37bfRhVF5e2xCh2EhoVNs6YpBBSR9GU oXsn0CZvqMy4Lv0a10n5CS7421NCyVpQQcVWx1Qppy/q71GMOcbiM39JwCyMiB89evJv iq3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jGCwjPth; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020aa7d94f000000b005231e7c1105si1203864eds.382.2023.08.18.04.04.32; Fri, 18 Aug 2023 04:04:57 -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=@kernel.org header.s=k20201202 header.b=jGCwjPth; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353855AbjHQRKB (ORCPT <rfc822;274620705z@gmail.com> + 99 others); Thu, 17 Aug 2023 13:10:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353872AbjHQRJn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Aug 2023 13:09:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D31930D4; Thu, 17 Aug 2023 10:09:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A9BF8675A7; Thu, 17 Aug 2023 17:09:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59D18C433C8; Thu, 17 Aug 2023 17:09:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692292174; bh=/IF04sHkLLuYwZg5UDGG+9COl2K4c5dV5hCvL3rgYGo=; h=From:To:Cc:Subject:Date:From; b=jGCwjPthnd6uH4tJfKVWBnQmxaCK2g/kXtyb2msrBxtoW25nEs7w1Ajj/BW+fpY6p ItcloqGHp1tbzAHwf4QfunNDFPfY7UB2kiKfKvAkHdYjt+pHMEWCAnaS9nmhH+m+UE AvW4HFjtvK0lKfL35Mniy6hFbixtI9oMmTXRTqaUQsroGbbvE5Vhk2KHNcvv9WZ3Jt Zat6t4/CaGZykYor1fD6Jm7h7kGHsLKEVbAKRIQ7xc53TTEnl0O1eJmmcwZG3T2Jkn zbIErRgMecOnIu7Y45iR/vX7Ke8LrJy7n9fHjsa9uoqKp6DBsRnKQG69QAWu9GDFOl nPipyytJQzJJQ== From: Jisheng Zhang <jszhang@kernel.org> To: "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next v5 0/9] net: stmmac: add new features to xgmac Date: Fri, 18 Aug 2023 00:57:40 +0800 Message-Id: <20230817165749.672-1-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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: 1774564616827579788 X-GMAIL-MSGID: 1774564616827579788 |
Series |
net: stmmac: add new features to xgmac
|
|
Message
Jisheng Zhang
Aug. 17, 2023, 4:57 p.m. UTC
This series add below new features to xgmac: correct RX COE parsing add more feature parsing from hw cap enlarge C22 ADDR and rx/tx channels support parse safety ce/ue irq from DT support per channel irq Since v4: - move "additionalItems" and "maxItems" a bit earlier to patch5 to fix "interrupt-names... is too long" Since v3: - collect Acked-by tag - remove patch which enlarges the max XGMAC C22 ADDR to 31 since it's merged - s/stmmac_request_irq_multi/stmmac_request_irq_multi_channel - update the dt-binding to refelct the optional per-channel irq: - use enum - add additionalItems and maxItems to fix the "interrupt-names .. is too long" Since v2: - check per channel irq by (res->rx_irq[0] > 0 && res->tx_irq[0] > 0) rather than (res->rx_irq[0] && res->tx_irq[0]) - bypass if (irq <= 0) when request rx/tx irq Since v1: - remove "_irq" suffix from safety irqs dt binding - remove "snps,per-channel-interrupt" dt binding, check the channel irq instead. - more renaming about "msi" to reflect per channel irq isn't MSI specific Jisheng Zhang (9): net: stmmac: correct RX COE parsing for xgmac net: stmmac: xgmac: add more feature parsing from hw cap net: stmmac: enlarge max rx/tx queues and channels to 16 net: stmmac: reflect multi irqs for tx/rx channels and mac and safety net: stmmac: xgmac: support per-channel irq dt-bindings: net: snps,dwmac: add safety irq support net: stmmac: platform: support parsing safety irqs from DT dt-bindings: net: snps,dwmac: add per channel irq support net: stmmac: platform: support parsing per channel irq from DT .../devicetree/bindings/net/snps,dwmac.yaml | 77 ++++++++++++++++++- .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +- .../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 2 +- .../net/ethernet/stmicro/stmmac/dwxgmac2.h | 2 + .../ethernet/stmicro/stmmac/dwxgmac2_core.c | 5 +- .../ethernet/stmicro/stmmac/dwxgmac2_dma.c | 34 ++++---- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 56 +++++++------- .../ethernet/stmicro/stmmac/stmmac_platform.c | 35 +++++++++ include/linux/stmmac.h | 10 +-- 9 files changed, 172 insertions(+), 53 deletions(-)
Comments
On Fri, Aug 18, 2023 at 08:39:56PM +0300, Serge Semin wrote: > On Fri, Aug 18, 2023 at 12:57:46AM +0800, Jisheng Zhang wrote: > > The snps dwmac IP support safety features, and those Safety Feature > > Correctible Error and Uncorrectible Error irqs may be separate irqs. > > > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > > --- > > .../devicetree/bindings/net/snps,dwmac.yaml | 13 +++++++++++-- > > 1 file changed, 11 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > index ddf9522a5dc2..ee9174f77d97 100644 > > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > @@ -103,17 +103,26 @@ properties: > > > > interrupts: > > minItems: 1 > > + maxItems: 5 > > + additionalItems: true > > items: > > - description: Combined signal for various interrupt events > > - description: The interrupt to manage the remote wake-up packet detection > > - description: The interrupt that occurs when Rx exits the LPI state > > + - description: The interrupt that occurs when Safety Feature Correctible Errors happen > > + - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen > > > > interrupt-names: > > minItems: 1 > > + maxItems: 5 > > + additionalItems: true > > items: > > - const: macirq > > - - enum: [eth_wake_irq, eth_lpi] > > - - const: eth_lpi > > + - enum: > > + - eth_wake_irq > > + - eth_lpi > > + - sfty_ce > > + - sfty_ue > > IIUC this would mean the next constraints: > Item 0: must be macirq, > Item 1: any of eth_wake_irq, eth_lpi, sfty_ce, sfty_ue > Items 2:4: any bla-bla-bla. Indeed. > > After adding the per-DMA-channel IRQs in the next patches the array > will be extended to up to 37 any names. It doesn't look correct. What > about converting it to the position independent arrays constraint: > > interrupts: > minItems: 1 > maxItems: 34 > > > interrupt-names: > minItems: 1 > maxItems: 34 > items: > oneOf: > - description: Combined signal for various interrupt events > const: macirq > - description: The interrupt to manage the remote wake-up packet detection > const: eth_wake_irq > - description: The interrupt that occurs when Rx exits the LPI state > const: eth_lpi > - description: Safety Feature Correctible Errors interrupt > const: sfty_ce > - description: Safety Feature Uncorrectible Errors interrupt > const: sfty_ue > - description: DMA Tx per-channel interrupt > pattern: '^dma_tx([0-9]|1[0-5])?$' > - description: DMA Rx per-channel interrupt > pattern: '^dma_rx([0-9]|1[0-1])?$' > > allOf: > - contains: > const: macirq This would keep macirq being first: allOf: - maxItems: 34 items: - const: macirq In newer json-schema the schema and list versions were split into "prefixItems" and "items", so we could avoid the "allOf" with that. Unfortunately, the former is the list version which we use everywhere. I don't really want to do a treewide change of that and also I find the 'prefixItems' name kind of awkward. > Hope neither Krzysztof nor Rob will be against such modification > especially seeing it's the only way to resolve the very much possible > case of a device having macirq and per-DMA-channel IRQs but lacking > the LPI, PMT or Safety IRQs. Don't love it, but I give up on these licensed IPs. :( Rob