[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OS0PR01MB5922DBD660FB1B79048DA7D686A59@OS0PR01MB5922.jpnprd01.prod.outlook.com>
Date: Sat, 25 Sep 2021 06:37:00 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Sergey Shtylyov <s.shtylyov@....ru>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
CC: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>,
Andrew Lunn <andrew@...n.ch>,
Sergei Shtylyov <sergei.shtylyov@...il.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Adam Ford <aford173@...il.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>,
Chris Paterson <Chris.Paterson2@...esas.com>,
Biju Das <biju.das@...renesas.com>
Subject: RE: [RFC/PATCH 09/18] ravb: Add half_duplex to struct ravb_hw_info
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@...renesas.com>
> [...]
>
> Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
>
> 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
Powered by blists - more mailing lists