mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: netdev-bot+sashiko@kernel.org
Cc: cjd@cjdns.fr, netdev@vger.kernel.org, andrew@lunn.ch,
	olteanv@gmail.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, krzk+dt@kernel.org,
	conor+dt@kernel.org, matthias.bgg@gmail.com,
	angelogioacchino.delregno@collabora.com,
	chester.a.unal@arinc9.com, daniel@makrotopia.org,
	linux@armlinux.org.uk, arinc.unal@arinc9.com,
	Landen.Chao@mediatek.com, dqfext@gmail.com,
	sean.wang@mediatek.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, naseefkm@gmail.com,
	b.larsson@gmx.com
Subject: Re: [PATCH v2 net-next 2/7] dt-bindings: net: dsa: mediatek,mt7530: add passthrough mode
Date: Thu, 24 Sep 2026 10:45:11 -0500	[thread overview]
Message-ID: <20260924154511.GA231859-robh@kernel.org> (raw)
In-Reply-To: <178967819278.22033.11186084049097912254@kernel.org>

On Thu, Sep 17, 2026 at 08:49:52PM +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issue(s) to consider:
> 
> Critical: 0 · High: 0 · Medium: 0 · Low: 2
> 
> - [Low] The added `description` paragraph in
>   Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml (lines…
> - [Low] Concern (retained for policy combination, assessed as a false
>   positive): the binding advertises a passthrough mode that…
> 
> --
> 
> dt-bindings: net: dsa: mediatek,mt7530: add passthrough mode
> 
> This adds a paragraph to the mediatek,mt7530 binding description explaining
> that MT7530/MT7531 switches can be operated in a "passthrough" mode where
> traffic moves unconditionally between the CPU port and a DSA link port to a
> second switch. The paragraph also states that in this mode the upstream
> switch may have no other ports or switch configuration.
> 
> > diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > index 90b3582b76190..e29fb86934981 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > @@ -73,6 +73,13 @@ description: |
> >  
> >        Check out example 7.
> >  
> > +  The MT7530 and MT7531 switches are capable of being operated in "passthrough"
> > +  mode. In this mode, traffic is unconditionally passed between the CPU port
> > +  and the DSA port which links to a second switch. To use passthrough mode, the
> > +  upstream switch is configured with a DSA link to the downstream switch. In
> > +  passthrough mode the upstream switch is restricted, with no other ports or
> > +  switch configuration allowed.
> > +
> 
> [Severity: Low]
> The last sentence states a hard device tree constraint, but it only exists
> as prose.  Should this restriction also be expressed in the
> machine-checkable part of the schema?

I don't know if that is possible.

> As it stands there is no new property, no if/then under allOf, and no $defs
> entry that limits the port set when a port carries a link phandle.  The port
> container in this same file is permissive:
> 
>   patternProperties:
>     "^(ethernet-)?ports$":
>       type: object
>       additionalProperties: true
> 
>       patternProperties:
>         "^(ethernet-)?port@[0-6]$":
>           type: object
>           additionalProperties: true
> 
> so a device tree describing an upstream MT7530/MT7531 with a CPU port, a DSA
> link port and extra user ports, plus gpio-controller/interrupt-controller,
> still passes dt_binding_check.  The layout is instead rejected at probe time
> by mt753x_check_passthrough() in drivers/net/dsa/mt7530.c, added by the
> following patch in the series:
> 
> 	if (passthrough_ports > 2 ||
> 	    (passthrough_ports == 2 && enabled_ports != 2)
> 	) {
> 		dev_err(dev, "Only two ports allowed in passthrough mode\n");
> 		return -EINVAL;
> 
> Two smaller points on the same paragraph:
> 
> Every other topology description in this description block ends with a
> pointer to a validated example ("Check out example 7." just above).  Could
> this one gain an example too, so the passthrough layout is actually exercised
> by dt_binding_check?

We don't really want more examples if there are actual .dts files 
upstream.

Rob

  reply	other threads:[~2026-09-24 15:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 17:46 [PATCH v2 net-next 0/7] net: dsa: mt7530: support EcoNet EN751221 Caleb James DeLisle
2026-09-15 17:46 ` [PATCH v2 net-next 1/7] net: dsa: mt7530: get ctrl phy addr using a function Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-15 17:46 ` [PATCH v2 net-next 2/7] dt-bindings: net: dsa: mediatek,mt7530: add passthrough mode Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-24 15:45     ` Rob Herring [this message]
2026-09-24 15:45   ` Rob Herring (Arm)
2026-09-15 17:46 ` [PATCH v2 net-next 3/7] net: dsa: mediatek: add support for " Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-15 17:46 ` [PATCH v2 net-next 4/7] net: dsa: mediatek: support PLL setup on MMIO MT7530 Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-15 17:46 ` [PATCH v2 net-next 5/7] net: dsa: mediatek: support MDIO switch downstream of MMIO switch Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-15 17:46 ` [PATCH v2 net-next 6/7] dt-bindings: net: dsa: mediatek,mt7530: add econet,en751221 Caleb James DeLisle
2026-09-17 20:50   ` netdev-bot+sashiko
2026-09-24 15:49     ` Rob Herring
2026-09-15 17:46 ` [PATCH v2 net-next 7/7] net: dsa: mediatek: support EN751221 switch Caleb James DeLisle
2026-09-17 20:50   ` netdev-bot+sashiko
2026-09-20 10:33   ` Benjamin Larsson

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=20260924154511.GA231859-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Landen.Chao@mediatek.com \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arinc.unal@arinc9.com \
    --cc=b.larsson@gmx.com \
    --cc=chester.a.unal@arinc9.com \
    --cc=cjd@cjdns.fr \
    --cc=conor+dt@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=matthias.bgg@gmail.com \
    --cc=naseefkm@gmail.com \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    /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

all inboxes | Powered by JetHome®