diff mbox series

[U-Boot,v2,05/11] net: macb: Fix GEM hardware detection

Message ID 20190118111820.71349-6-anup.patel@wdc.com
State Superseded
Delegated to: Andes
Headers show
Series SiFive FU540 Support | expand

Commit Message

Anup Patel Jan. 18, 2019, 11:19 a.m. UTC
From: Atish Patra <atish.patra@wdc.com>

Fix MID bit field check to correctly identify all GEM hardwares.

The check is updated as per macb driver in Linux location:
<linux_sources>/drivers/net/ethernet/cadence/macb_main.c:259

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
---
 drivers/net/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Graf Jan. 18, 2019, 11:51 a.m. UTC | #1
On 18.01.19 12:19, Anup Patel wrote:
> From: Atish Patra <atish.patra@wdc.com>
> 
> Fix MID bit field check to correctly identify all GEM hardwares.
> 
> The check is updated as per macb driver in Linux location:
> <linux_sources>/drivers/net/ethernet/cadence/macb_main.c:259
> 
> Signed-off-by: Atish Patra <atish.patra@wdc.com>

This is missing your SoB.


Alex

> Reviewed-by: Alexander Graf <agraf@suse.de>
> ---
>  drivers/net/macb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 9a06b523cc..e04ec9a0a3 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -145,7 +145,7 @@ struct macb_device {
>  
>  static int macb_is_gem(struct macb_device *macb)
>  {
> -	return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) == 0x2;
> +	return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) >= 0x2;
>  }
>  
>  #ifndef cpu_is_sama5d2
>
Anup Patel Jan. 18, 2019, 1:03 p.m. UTC | #2
> -----Original Message-----
> From: Alexander Graf [mailto:agraf@suse.de]
> Sent: Friday, January 18, 2019 5:22 PM
> To: Anup Patel <Anup.Patel@wdc.com>; Rick Chen <rick@andestech.com>;
> Bin Meng <bmeng.cn@gmail.com>; Joe Hershberger
> <joe.hershberger@ni.com>; Lukas Auer <lukas.auer@aisec.fraunhofer.de>;
> Masahiro Yamada <yamada.masahiro@socionext.com>; Simon Glass
> <sjg@chromium.org>
> Cc: Palmer Dabbelt <palmer@sifive.com>; Paul Walmsley
> <paul.walmsley@sifive.com>; Atish Patra <Atish.Patra@wdc.com>;
> Christoph Hellwig <hch@infradead.org>; U-Boot Mailing List <u-
> boot@lists.denx.de>
> Subject: Re: [PATCH v2 05/11] net: macb: Fix GEM hardware detection
> 
> 
> 
> On 18.01.19 12:19, Anup Patel wrote:
> > From: Atish Patra <atish.patra@wdc.com>
> >
> > Fix MID bit field check to correctly identify all GEM hardwares.
> >
> > The check is updated as per macb driver in Linux location:
> > <linux_sources>/drivers/net/ethernet/cadence/macb_main.c:259
> >
> > Signed-off-by: Atish Patra <atish.patra@wdc.com>
> 
> This is missing your SoB.

Sure, I will add my SoB.

Since the work was done by Atish independently, I thought my
SoB is not required.

Regards,
Anup
Alexander Graf Jan. 18, 2019, 1:11 p.m. UTC | #3
On 18.01.19 14:03, Anup Patel wrote:
> 
> 
>> -----Original Message-----
>> From: Alexander Graf [mailto:agraf@suse.de]
>> Sent: Friday, January 18, 2019 5:22 PM
>> To: Anup Patel <Anup.Patel@wdc.com>; Rick Chen <rick@andestech.com>;
>> Bin Meng <bmeng.cn@gmail.com>; Joe Hershberger
>> <joe.hershberger@ni.com>; Lukas Auer <lukas.auer@aisec.fraunhofer.de>;
>> Masahiro Yamada <yamada.masahiro@socionext.com>; Simon Glass
>> <sjg@chromium.org>
>> Cc: Palmer Dabbelt <palmer@sifive.com>; Paul Walmsley
>> <paul.walmsley@sifive.com>; Atish Patra <Atish.Patra@wdc.com>;
>> Christoph Hellwig <hch@infradead.org>; U-Boot Mailing List <u-
>> boot@lists.denx.de>
>> Subject: Re: [PATCH v2 05/11] net: macb: Fix GEM hardware detection
>>
>>
>>
>> On 18.01.19 12:19, Anup Patel wrote:
>>> From: Atish Patra <atish.patra@wdc.com>
>>>
>>> Fix MID bit field check to correctly identify all GEM hardwares.
>>>
>>> The check is updated as per macb driver in Linux location:
>>> <linux_sources>/drivers/net/ethernet/cadence/macb_main.c:259
>>>
>>> Signed-off-by: Atish Patra <atish.patra@wdc.com>
>>
>> This is missing your SoB.
> 
> Sure, I will add my SoB.
> 
> Since the work was done by Atish independently, I thought my
> SoB is not required.

Imagine the SoB as a marker for "this went through my hands". If you
send a patch from someone else - even though you did modify a single
line - it still went through your hands and thus your SoB should occur
at the end.

Similarly the first SoB usually means "this was the original author".

So imagine you started to work on a patch, then Atish improved it and
eventually you send it out, the SoB chain would look like this:

  Signed-off-by: Anup Patel <Anup.Patel@wdc.com>
  Signed-off-by: Atish Patra <atish.patra@wdc.com>
  Signed-off-by: Anup Patel <Anup.Patel@wdc.com>

But you don't have to be too nit-picky about that part. The one thing
people will care about is that the original author is in the SoB list
and that your SoB is at the end of the list, because you are the one
sending the patch set.


Alex
Anup Patel Jan. 18, 2019, 1:25 p.m. UTC | #4
> -----Original Message-----
> From: Alexander Graf [mailto:agraf@suse.de]
> Sent: Friday, January 18, 2019 6:41 PM
> To: Anup Patel <Anup.Patel@wdc.com>; Rick Chen <rick@andestech.com>;
> Bin Meng <bmeng.cn@gmail.com>; Joe Hershberger
> <joe.hershberger@ni.com>; Lukas Auer <lukas.auer@aisec.fraunhofer.de>;
> Masahiro Yamada <yamada.masahiro@socionext.com>; Simon Glass
> <sjg@chromium.org>
> Cc: Palmer Dabbelt <palmer@sifive.com>; Paul Walmsley
> <paul.walmsley@sifive.com>; Atish Patra <Atish.Patra@wdc.com>;
> Christoph Hellwig <hch@infradead.org>; U-Boot Mailing List <u-
> boot@lists.denx.de>
> Subject: Re: [PATCH v2 05/11] net: macb: Fix GEM hardware detection
> 
> 
> 
> On 18.01.19 14:03, Anup Patel wrote:
> >
> >
> >> -----Original Message-----
> >> From: Alexander Graf [mailto:agraf@suse.de]
> >> Sent: Friday, January 18, 2019 5:22 PM
> >> To: Anup Patel <Anup.Patel@wdc.com>; Rick Chen
> <rick@andestech.com>;
> >> Bin Meng <bmeng.cn@gmail.com>; Joe Hershberger
> >> <joe.hershberger@ni.com>; Lukas Auer
> >> <lukas.auer@aisec.fraunhofer.de>; Masahiro Yamada
> >> <yamada.masahiro@socionext.com>; Simon Glass <sjg@chromium.org>
> >> Cc: Palmer Dabbelt <palmer@sifive.com>; Paul Walmsley
> >> <paul.walmsley@sifive.com>; Atish Patra <Atish.Patra@wdc.com>;
> >> Christoph Hellwig <hch@infradead.org>; U-Boot Mailing List <u-
> >> boot@lists.denx.de>
> >> Subject: Re: [PATCH v2 05/11] net: macb: Fix GEM hardware detection
> >>
> >>
> >>
> >> On 18.01.19 12:19, Anup Patel wrote:
> >>> From: Atish Patra <atish.patra@wdc.com>
> >>>
> >>> Fix MID bit field check to correctly identify all GEM hardwares.
> >>>
> >>> The check is updated as per macb driver in Linux location:
> >>> <linux_sources>/drivers/net/ethernet/cadence/macb_main.c:259
> >>>
> >>> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> >>
> >> This is missing your SoB.
> >
> > Sure, I will add my SoB.
> >
> > Since the work was done by Atish independently, I thought my SoB is
> > not required.
> 
> Imagine the SoB as a marker for "this went through my hands". If you send a
> patch from someone else - even though you did modify a single line - it still
> went through your hands and thus your SoB should occur at the end.
> 
> Similarly the first SoB usually means "this was the original author".
> 
> So imagine you started to work on a patch, then Atish improved it and
> eventually you send it out, the SoB chain would look like this:
> 
>   Signed-off-by: Anup Patel <Anup.Patel@wdc.com>
>   Signed-off-by: Atish Patra <atish.patra@wdc.com>
>   Signed-off-by: Anup Patel <Anup.Patel@wdc.com>
> 
> But you don't have to be too nit-picky about that part. The one thing people
> will care about is that the original author is in the SoB list and that your SoB is
> at the end of the list, because you are the one sending the patch set.

Thanks for the info.

I was not aware of this convention around SoB.

Regards,
Anup
Lukas Auer Jan. 20, 2019, 8:05 p.m. UTC | #5
On Fri, 2019-01-18 at 11:19 +0000, Anup Patel wrote:
> From: Atish Patra <atish.patra@wdc.com>
> 
> Fix MID bit field check to correctly identify all GEM hardwares.
> 
> The check is updated as per macb driver in Linux location:
> <linux_sources>/drivers/net/ethernet/cadence/macb_main.c:259
> 
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> Reviewed-by: Alexander Graf <agraf@suse.de>
> ---
>  drivers/net/macb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
diff mbox series

Patch

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 9a06b523cc..e04ec9a0a3 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -145,7 +145,7 @@  struct macb_device {
 
 static int macb_is_gem(struct macb_device *macb)
 {
-	return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) == 0x2;
+	return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) >= 0x2;
 }
 
 #ifndef cpu_is_sama5d2