From: Simon Horman <horms@kernel.org>
To: Daniel Golle <daniel@makrotopia.org>
Cc: Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Frank Wunderlich <frankwu@gmx.de>,
Chad Monroe <chad@monroe.io>,
Cezary Wilmanski <cezary.wilmanski@adtran.com>,
Avinash Jayaraman <ajayaraman@maxlinear.com>,
Bing tao Xu <bxu@maxlinear.com>, Liang Xu <lxu@maxlinear.com>,
Juraj Povazanec <jpovazanec@maxlinear.com>,
"Fanni (Fang-Yi) Chan" <fchan@maxlinear.com>,
"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
"Livia M. Rosu" <lrosu@maxlinear.com>,
John Crispin <john@phrozen.org>
Subject: Re: [PATCH v7 net-next 4/4] net: dsa: add basic initial driver for MxL862xx switches
Date: Wed, 21 Jan 2026 16:59:29 +0000 [thread overview]
Message-ID: <aXEF8elDd4GmyziX@horms.kernel.org> (raw)
In-Reply-To: <15b0adf5074c601e033fd2338fb27fb666b5d16b.1768707226.git.daniel@makrotopia.org>
On Sun, Jan 18, 2026 at 03:46:07AM +0000, Daniel Golle wrote:
...
> +static int mxl862xx_isolate_port(struct dsa_switch *ds, int port)
> +{
> + struct mxl862xx_bridge_port_config br_port_cfg = {};
> + struct mxl862xx_bridge_alloc br_alloc = {};
> + int ret;
> +
> + ret = MXL862XX_API_READ(ds->priv, MXL862XX_BRIDGE_ALLOC, br_alloc);
> + if (ret) {
> + dev_err(ds->dev, "failed to allocate a bridge for port %d\n", port);
> + return ret;
> + }
> +
> + br_port_cfg.bridge_id = br_alloc.bridge_id;
> + br_port_cfg.bridge_port_id = DSA_MXL_PORT(port);
> + br_port_cfg.mask = MXL862XX_BRIDGE_PORT_CONFIG_MASK_BRIDGE_ID |
> + MXL862XX_BRIDGE_PORT_CONFIG_MASK_BRIDGE_PORT_MAP |
> + MXL862XX_BRIDGE_PORT_CONFIG_MASK_MC_SRC_MAC_LEARNING |
> + MXL862XX_BRIDGE_PORT_CONFIG_MASK_VLAN_BASED_MAC_LEARNING;
> + br_port_cfg.src_mac_learning_disable = true;
> + br_port_cfg.vlan_src_mac_vid_enable = false;
> + br_port_cfg.vlan_dst_mac_vid_enable = false;
> + br_port_cfg.bridge_port_map[0] = DSA_MXL_CPU_PORTS(ds);
Hi Daniel,
.bridge_port_id, .mask, and elements of .bridge_port_map[]
are little-endian integers. But are being assigned host byte-order
values here and elsewhere.
Flagged by Sparse [1].
[1] This particular commit, from Al Viro's tree:
https://git.kernel.org/pub/scm/linux/kernel/git/viro/sparse.git/commit/?id=2634e39bf02697a18fece057208150362c985992
To address this mess:
https://lore.kernel.org/all/bf5b9a62-a120-421e-908d-1404c42e0b60@kernel.org/
> +
> + return MXL862XX_API_WRITE(ds->priv, MXL862XX_BRIDGEPORT_CONFIGSET, br_port_cfg);
> +}
...
--
pw-bot: cr
prev parent reply other threads:[~2026-01-21 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 3:44 [PATCH v7 net-next 0/4] net: dsa: initial support for MaxLinear MxL862xx switches Daniel Golle
2026-01-18 3:45 ` [PATCH v7 net-next 1/4] dt-bindings: net: dsa: add MaxLinear MxL862xx Daniel Golle
2026-01-18 3:45 ` [PATCH v7 net-next 2/4] net: dsa: add tag format for MxL862xx switches Daniel Golle
2026-01-18 3:45 ` [PATCH v7 net-next 3/4] net: mdio: add unlocked mdiodev C45 bus accessors Daniel Golle
2026-01-18 3:46 ` [PATCH v7 net-next 4/4] net: dsa: add basic initial driver for MxL862xx switches Daniel Golle
2026-01-21 16:59 ` Simon Horman [this message]
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=aXEF8elDd4GmyziX@horms.kernel.org \
--to=horms@kernel.org \
--cc=ajayaraman@maxlinear.com \
--cc=andrew@lunn.ch \
--cc=bxu@maxlinear.com \
--cc=cezary.wilmanski@adtran.com \
--cc=chad@monroe.io \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=fchan@maxlinear.com \
--cc=frankwu@gmx.de \
--cc=hkallweit1@gmail.com \
--cc=john@phrozen.org \
--cc=jpovazanec@maxlinear.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lrosu@maxlinear.com \
--cc=lxu@maxlinear.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=yweng@maxlinear.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