From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7AD0C433EF for ; Fri, 24 Sep 2021 20:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91C8661107 for ; Fri, 24 Sep 2021 20:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348358AbhIXUJO (ORCPT ); Fri, 24 Sep 2021 16:09:14 -0400 Received: from mxout02.lancloud.ru ([45.84.86.82]:37414 "EHLO mxout02.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346803AbhIXUJL (ORCPT ); Fri, 24 Sep 2021 16:09:11 -0400 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru 02007208404D Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: Re: [RFC/PATCH 09/18] ravb: Add half_duplex to struct ravb_hw_info To: Biju Das , "David S. Miller" , Jakub Kicinski CC: Lad Prabhakar , Andrew Lunn , Sergei Shtylyov , "Geert Uytterhoeven" , Adam Ford , Yoshihiro Shimoda , , , Chris Paterson , Biju Das References: <20210923140813.13541-1-biju.das.jz@bp.renesas.com> <20210923140813.13541-10-biju.das.jz@bp.renesas.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: Date: Fri, 24 Sep 2021 23:07:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210923140813.13541-10-biju.das.jz@bp.renesas.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 [...] Reviewed-by: Sergey Shtylyov 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