All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Sergey Shtylyov <s.shtylyov@omp.ru>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: 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" <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>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: RE: [RFC 03/12] ravb: Fillup ravb_set_features_gbeth() stub
Date: Wed, 6 Oct 2021 07:43:55 +0000	[thread overview]
Message-ID: <OS0PR01MB59223E020F4AEE30CD13F9E786B09@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <17eb621c-05f8-155b-24ed-5445f445c6ce@omp.ru>

Hi Sergei,

Thanks for the feedback.

> Subject: Re: [RFC 03/12] ravb: Fillup ravb_set_features_gbeth() stub
> 
> On 10/5/21 2:06 PM, Biju Das wrote:
> 
> > Fillup ravb_set_features_gbeth() function to support RZ/G2L.
> > Also set the net_hw_features bits supported by GbEthernet
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> [...]
> 
> > diff --git a/drivers/net/ethernet/renesas/ravb_main.c
> > b/drivers/net/ethernet/renesas/ravb_main.c
> > index ed0328a90200..37f50c041114 100644
> > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> [...]
> > @@ -2086,7 +2087,37 @@ static void ravb_set_rx_csum(struct net_device
> > *ndev, bool enable)  static int ravb_set_features_gbeth(struct
> net_device *ndev,
> >  				   netdev_features_t features)
> >  {
> > -	/* Place holder */
> > +	netdev_features_t changed = features ^ ndev->features;
> > +	int error;
> > +	u32 csr0;
> > +
> > +	csr0 = ravb_read(ndev, CSR0);
> > +	ravb_write(ndev, csr0 & ~(CSR0_RPE | CSR0_TPE), CSR0);
> > +	error = ravb_wait(ndev, CSR0, CSR0_RPE | CSR0_TPE, 0);
> > +	if (error) {
> > +		ravb_write(ndev, csr0, CSR0);
> > +		return error;
> > +	}
> > +
> > +	if (changed & NETIF_F_RXCSUM) {
> > +		if (features & NETIF_F_RXCSUM)
> > +			ravb_write(ndev, CSR2_ALL, CSR2);
> > +		else
> > +			ravb_write(ndev, 0, CSR2);
> > +	}
> > +
> > +	if (changed & NETIF_F_HW_CSUM) {
> > +		if (features & NETIF_F_HW_CSUM) {
> > +			ravb_write(ndev, CSR1_ALL, CSR1);
> > +			ndev->features |= NETIF_F_CSUM_MASK;
> 
>    Hm, the >linux/netdev_features.h> says those are contradictory to have
> both NETIF_F_HW_CSUM and NETIF_F_CSUM_MASK set...

It is a mistake from my side, I am taking out this setting. Any way below code overrides it.
This will answer all your comments below.

Regards,
Biju

> 
> > +		} else {
> > +			ravb_write(ndev, 0, CSR1);
> 
>    No need to mask off the 'features' field?
> 
> > +		}
> > +	}
> > +	ravb_write(ndev, csr0, CSR0);
> > +
> > +	ndev->features = features;
> 
>    Mhm, doesn't that clear NETIF_F_CSUM_MASK?
> 
> [...]
> 
> MBR, Sergey

  reply	other threads:[~2021-10-06  7:44 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 11:06 [RFC 00/12] Add functional support for Gigabit Ethernet driver Biju Das
2021-10-05 11:06 ` [RFC 01/12] ravb: Use ALIGN macro for max_rx_len Biju Das
2021-10-05 12:14   ` Sergey Shtylyov
2021-10-05 11:06 ` [RFC 02/12] ravb: Add rx_max_buf_size to struct ravb_hw_info Biju Das
2021-10-05 12:21   ` Sergey Shtylyov
2021-10-05 11:06 ` [RFC 03/12] ravb: Fillup ravb_set_features_gbeth() stub Biju Das
2021-10-05 18:59   ` Sergey Shtylyov
2021-10-06  7:43     ` Biju Das [this message]
2021-10-09 17:53       ` Biju Das
2021-10-05 11:06 ` [RFC 04/12] ravb: Fillup ravb_alloc_rx_desc_gbeth() stub Biju Das
2021-10-05 19:14   ` Sergey Shtylyov
2021-10-06  6:50     ` Biju Das
2021-10-05 11:06 ` [RFC 05/12] ravb: Fillup ravb_rx_ring_free_gbeth() stub Biju Das
2021-10-05 19:41   ` Sergei Shtylyov
2021-10-05 11:06 ` [RFC 06/12] ravb: Fillup ravb_rx_ring_format_gbeth() stub Biju Das
2021-10-05 20:34   ` Sergey Shtylyov
2021-10-05 11:06 ` [RFC 07/12] ravb: Fillup ravb_rx_gbeth() stub Biju Das
2021-10-06 19:38   ` Sergey Shtylyov
2021-10-06 20:22     ` Biju Das
2021-10-06 20:32       ` Sergey Shtylyov
2021-10-07  5:49         ` Biju Das
2021-10-07 19:04           ` Sergey Shtylyov
2021-10-07 20:09             ` Biju Das
2021-10-08  6:46               ` Biju Das
2021-10-08 17:59                 ` Sergey Shtylyov
2021-10-08 20:13                   ` Sergey Shtylyov
2021-10-09  8:27                     ` Biju Das
2021-10-09  8:34                       ` Sergei Shtylyov
2021-10-09  9:41                         ` Biju Das
2021-10-05 11:06 ` [RFC 08/12] ravb: Add carrier_counters to struct ravb_hw_info Biju Das
2021-10-06 16:41   ` Sergey Shtylyov
2021-10-06 17:00     ` Sergey Shtylyov
2021-10-06 17:22       ` Biju Das
2021-10-06 17:21     ` Biju Das
2021-10-05 11:06 ` [RFC 09/12] ravb: Add support to retrieve stats for GbEthernet Biju Das
2021-10-06 17:27   ` Sergey Shtylyov
2021-10-05 11:06 ` [RFC 10/12] ravb: Rename "tsrq" variable Biju Das
2021-10-05 19:19   ` Sergey Shtylyov
2021-10-05 11:06 ` [RFC 11/12] ravb: Optimize ravb_emac_init_gbeth function Biju Das
2021-10-05 19:19   ` Sergey Shtylyov
2021-10-05 11:06 ` [RFC 12/12] ravb: Update/Add comments Biju Das
2021-10-05 19:26   ` Sergey Shtylyov
2021-10-06  6:53     ` Biju Das
2021-10-05 11:54 ` [RFC 00/12] Add functional support for Gigabit Ethernet driver Sergey Shtylyov
2021-10-05 12:04   ` Biju Das

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=OS0PR01MB59223E020F4AEE30CD13F9E786B09@OS0PR01MB5922.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=aford173@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ashiduka@fujitsu.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=s.shtylyov@omprussia.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.