[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef5073e2-ceb6-6b6b-c36d-d13dc7856a4e@omp.ru>
Date: Fri, 24 Sep 2021 23:07:33 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Biju Das <biju.das.jz@...renesas.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
CC: Lad Prabhakar <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>, <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
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);
[...]
MBR, Sergey
Powered by blists - more mailing lists