[PATCH net-next 1/6] net: airoha: Introduce airoha_gdm_dev struct
Lorenzo Bianconi
lorenzo at kernel.org
Thu May 28 09:09:02 PDT 2026
On May 28, Alexander Lobakin wrote:
> From: Lorenzo Bianconi <lorenzo at kernel.org>
> Date: Wed, 27 May 2026 12:21:15 +0200
>
> > EN7581 and AN7583 SoCs support connecting multiple external SerDes to GDM3
> > or GDM4 ports via a hw arbiter that manages the traffic in a TDM manner.
> > As a result multiple net_devices can connect to the same GDM{3,4} port
> > and there is a theoretical "1:n" relation between GDM port and
> > net_devices.
> > Introduce airoha_gdm_dev struct to collect net_device related info (e.g.
> > net_device and external phy pointer). Please note this is just a
> > preliminary patch and we are still supporting a single net_device for
> > each GDM port. Subsequent patches will add support for multiple net_devices
> > connected to the same GDM port.
> >
> > Tested-by: Xuegang Lu <xuegang.lu at airoha.com>
> > Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
>
> [...]
>
> > diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
> > index d3781103abb5..c78cabbec753 100644
> > --- a/drivers/net/ethernet/airoha/airoha_eth.h
> > +++ b/drivers/net/ethernet/airoha/airoha_eth.h
> > @@ -535,10 +535,15 @@ struct airoha_qdma {
> > struct airoha_queue q_rx[AIROHA_NUM_RX_RING];
> > };
> >
> > +struct airoha_gdm_dev {
> > + struct airoha_gdm_port *port;
> > + struct net_device *dev;
>
> Nit: we now have priv_to_netdev() (I hope I remember its name
> correctly), so that we no longer need to store a netdev backpointer in
> netdev_priv structures.
> Just an option, up to you.
I think you mean netdev_from_priv(), right?
I guess I can fix if I need to repost, otherwise I will fix with with a
dedicated patch. Agree?
Regards,
Lorenzo
>
> > + struct airoha_eth *eth;
> > +};
> > +
> > struct airoha_gdm_port {
> > struct airoha_qdma *qdma;
> > - struct airoha_eth *eth;
> > - struct net_device *dev;
> > + struct airoha_gdm_dev *dev;
> > int id;
> > int nbq;
> >
> Thanks,
> Olek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260528/90ecf7e0/attachment.sig>
More information about the linux-arm-kernel
mailing list