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 X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60F7AC4320E for ; Wed, 25 Aug 2021 20:38:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4695B610E9 for ; Wed, 25 Aug 2021 20:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241038AbhHYUjX (ORCPT ); Wed, 25 Aug 2021 16:39:23 -0400 Received: from mxout03.lancloud.ru ([45.84.86.113]:37336 "EHLO mxout03.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231745AbhHYUjV (ORCPT ); Wed, 25 Aug 2021 16:39:21 -0400 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout03.lancloud.ru 86C8520E0F1E Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: Re: [PATCH net-next 04/13] ravb: Add ptp_cfg_active 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: <20210825070154.14336-1-biju.das.jz@bp.renesas.com> <20210825070154.14336-5-biju.das.jz@bp.renesas.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: <777c30b1-e94e-e241-b10c-ecd4d557bc06@omp.ru> Date: Wed, 25 Aug 2021 23:38:30 +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: <20210825070154.14336-5-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: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 8/25/21 10:01 AM, Biju Das wrote: > There are some H/W differences for the gPTP feature between > R-Car Gen3, R-Car Gen2, and RZ/G2L as below. > > 1) On R-Car Gen3, gPTP support is active in config mode. > 2) On R-Car Gen2, gPTP support is not active in config mode. > 3) RZ/G2L does not support the gPTP feature. > > Add a ptp_cfg_active hw feature bit to struct ravb_hw_info for > supporting gPTP active in config mode for R-Car Gen3. Wait, we've just done this ion the previous patch! > This patch also removes enum ravb_chip_id, chip_id from both > struct ravb_hw_info and struct ravb_private, as it is unused. > > Signed-off-by: Biju Das > Reviewed-by: Lad Prabhakar > --- > drivers/net/ethernet/renesas/ravb.h | 8 +------- > drivers/net/ethernet/renesas/ravb_main.c | 12 +++++------- > 2 files changed, 6 insertions(+), 14 deletions(-) > > diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h > index 9ecf1a8c3ca8..209e030935aa 100644 > --- a/drivers/net/ethernet/renesas/ravb.h > +++ b/drivers/net/ethernet/renesas/ravb.h > @@ -979,17 +979,11 @@ struct ravb_ptp { > struct ravb_ptp_perout perout[N_PER_OUT]; > }; > > -enum ravb_chip_id { > - RCAR_GEN2, > - RCAR_GEN3, > -}; > - > struct ravb_hw_info { > const char (*gstrings_stats)[ETH_GSTRING_LEN]; > size_t gstrings_size; > netdev_features_t net_hw_features; > netdev_features_t net_features; > - enum ravb_chip_id chip_id; > int stats_len; > size_t max_rx_len; I would put the above in a spearte patch... > unsigned aligned_tx: 1; > @@ -999,6 +993,7 @@ struct ravb_hw_info { > unsigned tx_counters:1; /* E-MAC has TX counters */ > unsigned multi_irqs:1; /* AVB-DMAC and E-MAC has multiple irqs */ > unsigned no_ptp_cfg_active:1; /* AVB-DMAC does not support gPTP active in config mode */ > + unsigned ptp_cfg_active:1; /* AVB-DMAC has gPTP support active in config mode */ Huh? > }; > > struct ravb_private { [...] > @@ -2216,7 +2213,7 @@ static int ravb_probe(struct platform_device *pdev) > INIT_LIST_HEAD(&priv->ts_skb_list); > > /* Initialise PTP Clock driver */ > - if (info->chip_id != RCAR_GEN2) > + if (info->ptp_cfg_active) > ravb_ptp_init(ndev, pdev); What's that? Didn't you touch this lie in patch #3? This seems lie a NAK bait... :-( MBR, Sergey