diff mbox series

[RFC,12/12] ravb: Update/Add comments

Message ID 20211005110642.3744-13-biju.das.jz@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series Add functional support for Gigabit Ethernet driver | expand

Checks

Context Check Description
netdev/cover_letter success Series has a cover letter
netdev/fixes_present success Fixes tag not required for -next series
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 1 maintainers not CCed: s.shtylyov@omp.ru
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success No Fixes tag
netdev/checkpatch warning WARNING: line length of 82 exceeds 80 columns
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success No static functions without inline keyword in header files

Commit Message

Biju Das Oct. 5, 2021, 11:06 a.m. UTC
This patch update/add the following comments

1) Fix the typo AVB->DMAC in comment, as the code following the comment
   is for GbEthernet DMAC in ravb_dmac_init_gbeth()

2) Update the comment "PAUSE prohibition"-> "EMAC Mode: PAUSE
   prohibition; Duplex; TX; RX;" in ravb_emac_init_gbeth()

3) Document PFRI register bit, as it is only supported for
   R-Car Gen3 and RZ/G2L.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
RFC changes:
 * New patch.
---
 drivers/net/ethernet/renesas/ravb.h      | 2 +-
 drivers/net/ethernet/renesas/ravb_main.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Sergey Shtylyov Oct. 5, 2021, 7:26 p.m. UTC | #1
On 10/5/21 2:06 PM, Biju Das wrote:

> This patch update/add the following comments
> 
> 1) Fix the typo AVB->DMAC in comment, as the code following the comment
>    is for GbEthernet DMAC in ravb_dmac_init_gbeth()

   ; not needed at the end of the comment. :-)

> 
> 2) Update the comment "PAUSE prohibition"-> "EMAC Mode: PAUSE
>    prohibition; Duplex; TX; RX;" in ravb_emac_init_gbeth()
> 
> 3) Document PFRI register bit, as it is only supported for
>    R-Car Gen3 and RZ/G2L.

   Not a good idea to do 3 different things in 1 patch... I know I said that (2) isn't worth
a separate patch but I meant that it shouldbe done as a part of a lrger ravb_emac_init_gbeth()
change. Sorry for not being clear enough...

> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> RFC changes:
>  * New patch.
> ---
>  drivers/net/ethernet/renesas/ravb.h      | 2 +-
>  drivers/net/ethernet/renesas/ravb_main.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index dfbbda3681f8..4a057005a470 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -519,7 +519,7 @@ static void ravb_emac_init_gbeth(struct net_device *ndev)
>  	/* Receive frame limit set register */
>  	ravb_write(ndev, GBETH_RX_BUFF_MAX + ETH_FCS_LEN, RFLR);
>  
> -	/* PAUSE prohibition */
> +	/* EMAC Mode: PAUSE prohibition; Duplex; TX; RX; */

   No need for ; after RX.

[...]

MBR, Sergey
Biju Das Oct. 6, 2021, 6:53 a.m. UTC | #2
Hi Sergei,

> Subject: Re: [RFC 12/12] ravb: Update/Add comments
> 
> On 10/5/21 2:06 PM, Biju Das wrote:
> 
> > This patch update/add the following comments
> >
> > 1) Fix the typo AVB->DMAC in comment, as the code following the comment
> >    is for GbEthernet DMAC in ravb_dmac_init_gbeth()
> 
>    ; not needed at the end of the comment. :-)
> 
> >
> > 2) Update the comment "PAUSE prohibition"-> "EMAC Mode: PAUSE
> >    prohibition; Duplex; TX; RX;" in ravb_emac_init_gbeth()
> >
> > 3) Document PFRI register bit, as it is only supported for
> >    R-Car Gen3 and RZ/G2L.
> 
>    Not a good idea to do 3 different things in 1 patch... I know I said
> that (2) isn't worth a separate patch but I meant that it shouldbe done as
> a part of a lrger ravb_emac_init_gbeth() change. Sorry for not being clear
> enough...

We are improving comments on Gbethernet driver, so I thought 1 patch will address
All the comments, since there is no functional change.

OK will create 3 separate patches for fixing these comments.

> 
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > RFC changes:
> >  * New patch.
> > ---
> >  drivers/net/ethernet/renesas/ravb.h      | 2 +-
> >  drivers/net/ethernet/renesas/ravb_main.c | 4 ++--
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> [...]
> > diff --git a/drivers/net/ethernet/renesas/ravb_main.c
> > b/drivers/net/ethernet/renesas/ravb_main.c
> > index dfbbda3681f8..4a057005a470 100644
> > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> > @@ -519,7 +519,7 @@ static void ravb_emac_init_gbeth(struct net_device
> *ndev)
> >  	/* Receive frame limit set register */
> >  	ravb_write(ndev, GBETH_RX_BUFF_MAX + ETH_FCS_LEN, RFLR);
> >
> > -	/* PAUSE prohibition */
> > +	/* EMAC Mode: PAUSE prohibition; Duplex; TX; RX; */
> 
>    No need for ; after RX.

OK.

Regards,
Biju
diff mbox series

Patch

diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
index 010dad82091c..472254612d6a 100644
--- a/drivers/net/ethernet/renesas/ravb.h
+++ b/drivers/net/ethernet/renesas/ravb.h
@@ -833,7 +833,7 @@  enum ECSR_BIT {
 	ECSR_MPD	= 0x00000002,
 	ECSR_LCHNG	= 0x00000004,
 	ECSR_PHYI	= 0x00000008,
-	ECSR_PFRI	= 0x00000010,
+	ECSR_PFRI	= 0x00000010,	/* Documented for R-Car Gen3 and RZ/G2L */
 };
 
 /* ECSIPR */
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index dfbbda3681f8..4a057005a470 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -519,7 +519,7 @@  static void ravb_emac_init_gbeth(struct net_device *ndev)
 	/* Receive frame limit set register */
 	ravb_write(ndev, GBETH_RX_BUFF_MAX + ETH_FCS_LEN, RFLR);
 
-	/* PAUSE prohibition */
+	/* EMAC Mode: PAUSE prohibition; Duplex; TX; RX; */
 	ravb_write(ndev, ECMR_ZPF | ((priv->duplex > 0) ? ECMR_DM : 0) |
 			 ECMR_TE | ECMR_RE | ECMR_RCPT |
 			 ECMR_TXF | ECMR_RXF | ECMR_PRM, ECMR);
@@ -588,7 +588,7 @@  static int ravb_dmac_init_gbeth(struct net_device *ndev)
 	/* Descriptor format */
 	ravb_ring_format(ndev, RAVB_BE);
 
-	/* Set AVB RX */
+	/* Set DMAC RX */
 	ravb_write(ndev, 0x60000000, RCR);
 
 	/* Set Max Frame Length (RTC) */