All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: Biju Das <biju.das.jz@bp.renesas.com>,
	Sergey Shtylyov <s.shtylyov@omp.ru>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Adam Ford <aford173@gmail.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>
Subject: Re: [PATCH net-next 04/13] ravb: Add ptp_cfg_active to struct ravb_hw_info
Date: Thu, 26 Aug 2021 21:06:44 +0300	[thread overview]
Message-ID: <93dab08c-4b0b-091d-bd47-6e55bce96f8a@gmail.com> (raw)
In-Reply-To: <OS0PR01MB5922F8114A505A33F7A47EB586C79@OS0PR01MB5922.jpnprd01.prod.outlook.com>

On 8/26/21 1:52 PM, 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 <biju.das.jz@bp.renesas.com>
>>>>>>> Reviewed-by: Lad Prabhakar
>>>>>>> <prabhakar.mahadev-lad.rj@bp.renesas.com>
>>>>>>> ---
>>>>>>>    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...
>>>>
>>>>      Separate. :-)
>>>>
>>>>>>>    	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... :-(
>>>>>
>>>>> Please refer the original patch[1] which introduced gPTP support
>>>>> active
>>>> in config mode.
>>>>> I am sure this will clear all your doubts.
>>>>
>>>>      It hasn't. Why do we need 2 bit fields (1 "positive" and 1
>>>> "negative") for the same feature is beyond me.
>>>
>>> The reason is mentioned in commit description, Do you agree 1, 2 and 3
>> mutually exclusive?
>>>
>>> 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.
>>
>>     No, (1) includes (2).
> 
> patch[1] is for supporting gPTP support active in config mode.

   Yes.

> Do you agree GAC register(gPTP active in Config) bit in AVB-DMAC mode register(CCC) present only in R-Car Gen3?

   Yes.
   But you feature naming is totally misguiding, nevertheless...

> [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/renesas/ravb_main.c?h=next-20210825&id=f5d7837f96e53a8c9b6c49e1bc95cf0ae88b99e8
> 
> Regards,
> Biju

[...]

MBR, Sergey

  reply	other threads:[~2021-08-26 18:06 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  7:01 [PATCH net-next 00/13] Add Factorisation code to support Gigabit Ethernet driver Biju Das
2021-08-25  7:01 ` [PATCH net-next 01/13] ravb: Remove the macros NUM_TX_DESC_GEN[23] Biju Das
2021-08-25 14:30   ` Sergey Shtylyov
2021-08-25  7:01 ` [PATCH net-next 02/13] ravb: Add multi_irq to struct ravb_hw_info Biju Das
2021-08-25 18:49   ` Sergey Shtylyov
2021-08-25 19:10     ` Sergey Shtylyov
2021-08-25  7:01 ` [PATCH net-next 03/13] ravb: Add no_ptp_cfg_active " Biju Das
2021-08-25 20:17   ` Sergey Shtylyov
2021-08-25  7:01 ` [PATCH net-next 04/13] ravb: Add ptp_cfg_active " Biju Das
2021-08-25 20:38   ` Sergey Shtylyov
2021-08-26  6:20     ` Biju Das
2021-08-26 10:29       ` Sergey Shtylyov
2021-08-26 10:34         ` Biju Das
2021-08-26 10:42           ` Sergey Shtylyov
2021-08-26 10:52             ` Biju Das
2021-08-26 18:06               ` Sergei Shtylyov [this message]
2021-08-26 18:57                 ` Andrew Lunn
2021-08-26 19:02                   ` Sergey Shtylyov
2021-08-26 19:09                     ` Andrew Lunn
2021-08-26 19:37                       ` Biju Das
2021-08-26 20:03                         ` Sergey Shtylyov
2021-08-27  6:36                           ` Biju Das
2021-08-27 15:48                             ` Sergey Shtylyov
2021-08-27 15:55                               ` Biju Das
2021-08-25  7:01 ` [PATCH net-next 05/13] ravb: Factorise ravb_ring_free function Biju Das
2021-08-25 20:53   ` Sergey Shtylyov
2021-08-25  7:01 ` [PATCH net-next 06/13] ravb: Factorise ravb_ring_format function Biju Das
2021-08-26 18:54   ` Sergey Shtylyov
2021-08-26 19:34     ` Biju Das
2021-08-25  7:01 ` [PATCH net-next 07/13] ravb: Factorise ravb_ring_init function Biju Das
2021-08-26 20:27   ` Sergey Shtylyov
2021-08-25  7:01 ` [PATCH net-next 08/13] ravb: Factorise ravb_rx function Biju Das
2021-08-26 20:41   ` Sergey Shtylyov
2021-08-27  6:28     ` Biju Das
2021-08-25  7:01 ` [PATCH net-next 09/13] ravb: Factorise ravb_adjust_link function Biju Das
2021-08-25  7:01 ` [PATCH net-next 10/13] ravb: Factorise ravb_set_features Biju Das
2021-08-27 19:16   ` Sergey Shtylyov
2021-08-28  9:20     ` Biju Das
2021-08-28 11:35       ` Sergey Shtylyov
2021-08-28 12:45         ` Biju Das
2021-08-25  7:01 ` [PATCH net-next 11/13] ravb: Factorise ravb_dmac_init function Biju Das
2021-08-27 19:36   ` Sergey Shtylyov
2021-08-28  9:28     ` Biju Das
2021-08-25  7:01 ` [PATCH net-next 12/13] ravb: Factorise ravb_emac_init function Biju Das
2021-08-27 19:52   ` Sergey Shtylyov
2021-08-28  9:34     ` Biju Das
2021-08-25  7:01 ` [PATCH net-next 13/13] ravb: Add reset support Biju Das
2021-08-27 20:17   ` Sergey Shtylyov
2021-08-28  9:41     ` Biju Das
2021-08-25 10:30 ` [PATCH net-next 00/13] Add Factorisation code to support Gigabit Ethernet driver patchwork-bot+netdevbpf
2021-08-25 10:57   ` Sergey Shtylyov
2021-08-25 13:46     ` Andrew Lunn
2021-08-25 14:06       ` Sergey Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93dab08c-4b0b-091d-bd47-6e55bce96f8a@gmail.com \
    --to=sergei.shtylyov@gmail.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=aford173@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=biju.das@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=geert+renesas@glider.be \
    --cc=kuba@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=s.shtylyov@omp.ru \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.