RE: [RFC/PATCH 09/18] ravb: Add half_duplex to struct ravb_hw_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sergei,

Thanks for the feedback.

> Subject: Re: [RFC/PATCH 09/18] ravb: Add half_duplex to struct
> ravb_hw_info
> 
> On 9/23/21 5:08 PM, Biju Das wrote:
> 
> > RZ/G2L supports half duplex mode.
> > Add a half_duplex hw feature bit to struct ravb_hw_info for supporting
> > half duplex mode for RZ/G2L.
> >
> > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> [...]
> 
> Reviewed-by: Sergey Shtylyov <s.shtylyov@xxxxxx>
> 
>    Just a little bit of change needed...
> 
> [...]
> > diff --git a/drivers/net/ethernet/renesas/ravb_main.c
> > b/drivers/net/ethernet/renesas/ravb_main.c
> > index 5d18681582b9..04bff44b7660 100644
> > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> > @@ -1076,6 +1076,18 @@ static int ravb_poll(struct napi_struct *napi,
> int budget)
> >  	return budget - quota;
> >  }
> >
> > +static void ravb_set_duplex_rgeth(struct net_device *ndev) {
> > +	struct ravb_private *priv = netdev_priv(ndev);
> > +	u32 ecmr = ravb_read(ndev, ECMR);
> > +
> > +	if (priv->duplex > 0)	/* Full */
> > +		ecmr |=  ECMR_DM;
> > +	else			/* Half */
> > +		ecmr &= ~ECMR_DM;
> > +	ravb_write(ndev, ecmr, ECMR);
> 
>    I think we should do that like sh_eth.c:
> 
> 	ravb_modify(ndev, ECMR, ECMR_DM, priv->duplex > 0 ? ECMR_DM : 0);
OK. Will do

Regards,
Biju

> 
> [...]
> 
> MBR, Sergey




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux