Re: [RFC PATCH net-next v2] net: pcs: airoha: add support for Airoha AN7583 SoC

From: Andrew Lunn

Date: Fri Sep 25 2026 - 08:44:13 EST


On Fri, Sep 25, 2026 at 02:18:34PM +0200, Christian Marangi wrote:
> On Fri, Sep 25, 2026 at 02:07:52PM +0200, Andrew Lunn wrote:
> > > +static void an7583_pcs_setup_scu_pcie(struct airoha_pcs_priv *priv,
> > > + int index, phy_interface_t interface)
> > > +{
> > > + u32 xsi_sel;
> > > +
> > > + if (priv->phy)
> > > + return;
> > > +
> > > + switch (interface) {
> > > + case PHY_INTERFACE_MODE_USXGMII:
> > > + case PHY_INTERFACE_MODE_10GBASER:
> > > + default:
> > > + xsi_sel = AIROHA_SCU_PCIE_XSI1_USXGMII;
> > > + }
> > > +
> > > + regmap_update_bits(priv->scu, AIROHA_SCU_SSTR,
> > > + AIROHA_SCU_PCIE_XSI1_SEL,
> > > + xsi_sel);
> >
> > I suspect the AI will be here soon. xsi_sel is initially a random
> > stack value. IF interface is something else, you use that random value
> > with regmap_update_bits().
> >
>
> Doesn't default address that case?

Yes, maybe. But why have a switch statement at all?

Andrew