Re: [PATCH net-next v2 1/2] net: lan743x: add RMII strap status detection for PCI11x1x
From: Andrew Lunn
Date: Tue May 26 2026 - 12:40:31 EST
> + if (!adapter->is_sgmii_en && strap & STRAP_READ_USE_RMII_EN_) {
> + if (strap & STRAP_READ_RMII_EN_)
> + adapter->is_rmii_en = true;
> + }
What does it mean when both SGMII and RMII is strapped? What if
neither is strapped?
> +
> netif_dbg(adapter, drv, adapter->netdev,
> "SGMII I/F %sable\n", adapter->is_sgmii_en ? "En" : "Dis");
Since there is a netif_dbg() for sgmii, maybe add one for rmii, so the
code is somewhat symmetrical?
> struct lan743x_rx rx[LAN743X_USED_RX_CHANNELS];
> bool is_pci11x1x;
> bool is_sgmii_en;
> + bool is_rmii_en;
Are there other strapping bits? Are we going to get is_gmii_en, and
is_rgmii_en?
Does a collection of bools make sense, when the interface modes are
typically mutually exclusive at the hardware level? Would an enum be
better? Or why not phy_interface_t ?
Andrew