Subject: Re: [PATCH net-next 3/5] net: txgbe: Support to setup link

From: Andrew Lunn <[email-masked]>
Date: Mon, 14 Nov 2022 21:20:36 +0100

On Mon, Nov 14, 2022 at 04:48:24PM +0100, Alexander Lobakin wrote:
> From: Mengyuan Lou <[email-masked]>
> Date: Tue,  8 Nov 2022 19:19:05 +0800
> 
> > From: Jiawen Wu <[email-masked]>
> > 
> > Get link capabilities, setup MAC and PHY link, and support to enable
> > or disable Tx laser.
> > 
> > Signed-off-by: Jiawen Wu <[email-masked]>
> > ---
> > 
> > [...]
> > 
> > @@ -46,6 +55,13 @@ struct txgbe_adapter {
> >  	struct timer_list service_timer;
> >  	struct work_struct service_task;
> >  
> > +	u32 flags;
> > +
> > +	bool link_up;
> 
> Use can reuse the previous field flags to store link status.
> 
> Also pls try to avoid placing bools in structures, there are lots of
> discussions around it and how compilers place/declare them, but
> better to know for sure it would work the same way on each setup,
> right?

It is likely a lot of this code goes away one phylink it used.

   Andrew