From: Conor Dooley <conor@kernel.org>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] dt-bindings: net: dwmac: Validate PBL for all IP-cores
Date: Mon, 1 Jul 2024 16:37:31 +0100 [thread overview]
Message-ID: <20240701-concierge-goofy-dbed136abe4b@spud> (raw)
In-Reply-To: <20240628154515.8783-1-fancer.lancer@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5530 bytes --]
On Fri, Jun 28, 2024 at 06:45:12PM +0300, Serge Semin wrote:
> Indeed the maximum DMA burst length can be programmed not only for DW
> xGMACs, Allwinner EMACs and Spear SoC GMAC, but in accordance with
> [1, 2, 3] for Generic DW *MAC IP-cores. Moreover the STMMAC driver parses
> the property and then apply the configuration for all supported DW MAC
> devices. All of that makes the property being available for all IP-cores
> the bindings supports. Let's make sure the PBL-related properties are
> validated for all of them by the common DW *MAC DT schema.
I'd been leaving this one for Rob, given the earlier discussion - but I
had one (minor) comment about the commit message here. I think it is fine
for the kernel to unconditionally read a property if present, with no
regard for the compatible in question, and to rely on the binding
ensuring that the properties are not used where invalid. IOW, I don't
think that that is a relevant justification for making the properties
available on all hardware.
However, as you say, it seems like all versions of the core actually do
support the features the properties control and therefore the patch is
perfectly fine. I just wanted to ~comment on~nitpick that portion of the
commit message.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor.
>
> [1] DesignWare Cores Ethernet MAC Universal Databook, Revision 3.73a,
> October 2013, p.378.
>
> [2] DesignWare Cores Ethernet Quality-of-Service Databook, Revision 5.10a,
> December 2017, p.1223.
>
> [3] DesignWare Cores XGMAC - 10G Ethernet MAC Databook, Revision 2.11a,
> September 2015, p.469-473.
>
> Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
>
> ---
>
> The discussion where we agreed to submit this change:
> Link: https://lore.kernel.org/netdev/20240625215442.190557-2-robh@kernel.org
>
> ---
> .../devicetree/bindings/net/snps,dwmac.yaml | 80 ++++++-------------
> 1 file changed, 26 insertions(+), 54 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index 5a39d931e429..509086b76211 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -447,6 +447,32 @@ properties:
> description:
> Use Address-Aligned Beats
>
> + snps,pbl:
> + description:
> + Programmable Burst Length (tx and rx)
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [1, 2, 4, 8, 16, 32]
> +
> + snps,txpbl:
> + description:
> + Tx Programmable Burst Length. If set, DMA tx will use this
> + value rather than snps,pbl.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [1, 2, 4, 8, 16, 32]
> +
> + snps,rxpbl:
> + description:
> + Rx Programmable Burst Length. If set, DMA rx will use this
> + value rather than snps,pbl.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [1, 2, 4, 8, 16, 32]
> +
> + snps,no-pbl-x8:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description:
> + Don\'t multiply the pbl/txpbl/rxpbl values by 8. For core
> + rev < 3.50, don\'t multiply the values by 4.
> +
> snps,fixed-burst:
> $ref: /schemas/types.yaml#/definitions/flag
> description:
> @@ -577,60 +603,6 @@ dependencies:
>
> allOf:
> - $ref: ethernet-controller.yaml#
> - - if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - allwinner,sun7i-a20-gmac
> - - allwinner,sun8i-a83t-emac
> - - allwinner,sun8i-h3-emac
> - - allwinner,sun8i-r40-gmac
> - - allwinner,sun8i-v3s-emac
> - - allwinner,sun50i-a64-emac
> - - ingenic,jz4775-mac
> - - ingenic,x1000-mac
> - - ingenic,x1600-mac
> - - ingenic,x1830-mac
> - - ingenic,x2000-mac
> - - qcom,sa8775p-ethqos
> - - qcom,sc8280xp-ethqos
> - - snps,dwmac-3.50a
> - - snps,dwmac-4.10a
> - - snps,dwmac-4.20a
> - - snps,dwmac-5.20
> - - snps,dwxgmac
> - - snps,dwxgmac-2.10
> - - st,spear600-gmac
> -
> - then:
> - properties:
> - snps,pbl:
> - description:
> - Programmable Burst Length (tx and rx)
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [1, 2, 4, 8, 16, 32]
> -
> - snps,txpbl:
> - description:
> - Tx Programmable Burst Length. If set, DMA tx will use this
> - value rather than snps,pbl.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [1, 2, 4, 8, 16, 32]
> -
> - snps,rxpbl:
> - description:
> - Rx Programmable Burst Length. If set, DMA rx will use this
> - value rather than snps,pbl.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [1, 2, 4, 8, 16, 32]
> -
> - snps,no-pbl-x8:
> - $ref: /schemas/types.yaml#/definitions/flag
> - description:
> - Don\'t multiply the pbl/txpbl/rxpbl values by 8. For core
> - rev < 3.50, don\'t multiply the values by 4.
> -
> - if:
> properties:
> compatible:
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-07-01 15:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 15:45 [PATCH net-next] dt-bindings: net: dwmac: Validate PBL for all IP-cores Serge Semin
2024-07-01 15:37 ` Conor Dooley [this message]
2024-07-01 17:23 ` Rob Herring (Arm)
2024-07-02 13:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240701-concierge-goofy-dbed136abe4b@spud \
--to=conor@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=fancer.lancer@gmail.com \
--cc=joabreu@synopsys.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox