All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Biju Das <biju.das.jz@bp.renesas.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Sergei Shtylyov <sergei.shtylyov@gmail.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Sergey Shtylyov <s.shtylyov@omprussia.ru>,
	"Adam Ford" <aford173@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
	Yuusuke Ashizuka <ashiduka@fujitsu.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	<netdev@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>,
	"Prabhakar Mahadev Lad" <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH 07/10] ravb: Add tsrq to struct ravb_hw_info
Date: Mon, 4 Oct 2021 21:00:30 +0300	[thread overview]
Message-ID: <5193e153-2765-943b-4cf8-413d5957ec01@omp.ru> (raw)
In-Reply-To: <20211001150636.7500-8-biju.das.jz@bp.renesas.com>

On 10/1/21 6:06 PM, Biju Das wrote:

> R-Car AVB-DMAC has 4 Transmit start request queues, whereas
> RZ/G2L has only 1 Transmit start request queue.

   The TCCR bits are called transmit start request (queue 0/1), not transmit start request queue 0/1.
I think you've read too much value into them for what is just TX queue 0/1.

> Add a tsrq variable to struct ravb_hw_info to handle this
> difference.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> RFC->v1:
>  * Added tsrq variable instead of multi_tsrq feature bit.
> ---
>  drivers/net/ethernet/renesas/ravb.h      | 1 +
>  drivers/net/ethernet/renesas/ravb_main.c | 9 +++++++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
> index 9cd3a15743b4..c586070193ef 100644
> --- a/drivers/net/ethernet/renesas/ravb.h
> +++ b/drivers/net/ethernet/renesas/ravb.h
> @@ -997,6 +997,7 @@ struct ravb_hw_info {
>  	netdev_features_t net_features;
>  	int stats_len;
>  	size_t max_rx_len;
> +	u32 tsrq;

   I'd call it 'tccr_value' instead.

>  	unsigned aligned_tx: 1;
>  
>  	/* hardware features */
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index ac141a491ca2..4784832bd93c 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -790,11 +790,13 @@ static void ravb_rcv_snd_enable(struct net_device *ndev)
>  /* function for waiting dma process finished */
>  static int ravb_stop_dma(struct net_device *ndev)
>  {
> +	struct ravb_private *priv = netdev_priv(ndev);
> +	const struct ravb_hw_info *info = priv->info;
>  	int error;
>  
>  	/* Wait for stopping the hardware TX process */
> -	error = ravb_wait(ndev, TCCR,
> -			  TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3, 0);
> +	error = ravb_wait(ndev, TCCR, info->tsrq, 0);
> +
>  	if (error)
>  		return error;
>  
> @@ -2128,6 +2130,7 @@ static const struct ravb_hw_info ravb_gen3_hw_info = {
>  	.net_features = NETIF_F_RXCSUM,
>  	.stats_len = ARRAY_SIZE(ravb_gstrings_stats),
>  	.max_rx_len = RX_BUF_SZ + RAVB_ALIGN - 1,
> +	.tsrq = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
>  	.internal_delay = 1,
>  	.tx_counters = 1,
>  	.multi_irqs = 1,
> @@ -2150,6 +2153,7 @@ static const struct ravb_hw_info ravb_gen2_hw_info = {
>  	.net_features = NETIF_F_RXCSUM,
>  	.stats_len = ARRAY_SIZE(ravb_gstrings_stats),
>  	.max_rx_len = RX_BUF_SZ + RAVB_ALIGN - 1,
> +	.tsrq = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
>  	.aligned_tx = 1,
>  	.gptp = 1,
>  	.nc_queue = 1,
> @@ -2165,6 +2169,7 @@ static const struct ravb_hw_info gbeth_hw_info = {
>  	.dmac_init = ravb_dmac_init_gbeth,
>  	.emac_init = ravb_emac_init_gbeth,
>  	.max_rx_len = GBETH_RX_BUFF_MAX + RAVB_ALIGN - 1,
> +	.tsrq = TCCR_TSRQ0,
>  	.aligned_tx = 1,
>  	.tx_counters = 1,
>  };
> 

[...]

MBR, Sergey

  reply	other threads:[~2021-10-04 18:00 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 15:06 [PATCH 00/10] Add Gigabit Ethernet driver support Biju Das
2021-10-01 15:06 ` [PATCH 01/10] ravb: Rename "ravb_set_features_rx_csum" function to "ravb_set_features_rcar" Biju Das
2021-10-01 15:06 ` [PATCH 02/10] ravb: Rename "no_ptp_cfg_active" and "ptp_cfg_active" variables Biju Das
2021-10-01 20:43   ` Sergey Shtylyov
2021-10-02  7:53     ` Biju Das
2021-10-02 18:19       ` Sergey Shtylyov
2021-10-03  7:05         ` Biju Das
2021-10-01 15:06 ` [PATCH 03/10] ravb: Add nc_queue to struct ravb_hw_info Biju Das
2021-10-02 18:35   ` Sergey Shtylyov
2021-10-03  6:58     ` Biju Das
2021-10-06 19:45       ` Sergei Shtylyov
2021-10-06 20:12         ` Biju Das
2021-10-01 15:06 ` [PATCH 04/10] ravb: Add support for RZ/G2L SoC Biju Das
2021-10-02 19:43   ` Sergey Shtylyov
2021-10-03  6:51     ` Biju Das
2021-10-04  7:10       ` Geert Uytterhoeven
2021-10-04  7:49         ` Biju Das
2021-10-04 13:28       ` Biju Das
2021-10-01 15:06 ` [PATCH 05/10] ravb: Initialize GbEthernet DMAC Biju Das
2021-10-04 12:40   ` Sergey Shtylyov
2021-10-04 13:12     ` Biju Das
2021-10-04 15:50       ` Sergei Shtylyov
2021-10-04 18:42         ` Biju Das
2021-10-01 15:06 ` [PATCH 06/10] ravb: Exclude gPTP feature support for RZ/G2L Biju Das
2021-10-01 15:06 ` [PATCH 07/10] ravb: Add tsrq to struct ravb_hw_info Biju Das
2021-10-04 18:00   ` Sergey Shtylyov [this message]
2021-10-04 18:37     ` Sergei Shtylyov
2021-10-04 18:47       ` Biju Das
2021-10-04 18:54         ` Sergey Shtylyov
2021-10-04 19:28           ` Biju Das
2021-10-01 15:06 ` [PATCH 08/10] ravb: Add magic_pkt " Biju Das
2021-10-01 15:06 ` [PATCH 09/10] ravb: Add half_duplex " Biju Das
2021-10-01 15:06 ` [PATCH 10/10] ravb: Initialize GbEthernet E-MAC Biju Das
2021-10-04 18:55   ` Sergey Shtylyov
2021-10-04 19:23     ` Biju Das
2021-10-04 19:27       ` Sergey Shtylyov
2021-10-04 19:33         ` Biju Das
2021-10-02 13:00 ` [PATCH 00/10] Add Gigabit Ethernet driver support patchwork-bot+netdevbpf

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=5193e153-2765-943b-4cf8-413d5957ec01@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=Chris.Paterson2@renesas.com \
    --cc=aford173@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ashiduka@fujitsu.com \
    --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@omprussia.ru \
    --cc=sergei.shtylyov@gmail.com \
    --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.