netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] stmmac: pci: Adjust IOT2000 matching
@ 2019-04-18  9:14 Jan Kiszka
  2019-04-18 17:43 ` David Miller
  2019-04-26 14:34 ` Andy Shevchenko
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Kiszka @ 2019-04-18  9:14 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, David Miller
  Cc: Linux Netdev List, Linux Kernel Mailing List, Su Bao Cheng,
	Andy Shevchenko

From: Su Bao Cheng <baocheng.su@siemens.com>

Since there are more IOT2040 variants with identical hardware but
different asset tags, the asset tag matching should be adjusted to
support them.

For the board name "SIMATIC IOT2000", currently there are 2 types of
hardware, IOT2020 and IOT2040. The IOT2020 is identified by its unique
asset tag. Match on it first. If we then match on the board name only,
we will catch all IOT2040 variants. In the future there will be no other
devices with the "SIMATIC IOT2000" DMI board name but different
hardware.

Signed-off-by: Su Bao Cheng <baocheng.su@siemens.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index d819e8eaba12..cc1e887e47b5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -159,6 +159,12 @@ static const struct dmi_system_id quark_pci_dmi[] = {
 		},
 		.driver_data = (void *)&galileo_stmmac_dmi_data,
 	},
+	/*
+	 * There are 2 types of SIMATIC IOT2000: IOT20202 and IOT2040.
+	 * The asset tag "6ES7647-0AA00-0YA2" is only for IOT2020 which
+	 * has only one pci network device while other asset tags are
+	 * for IOT2040 which has two.
+	 */
 	{
 		.matches = {
 			DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
@@ -170,8 +176,6 @@ static const struct dmi_system_id quark_pci_dmi[] = {
 	{
 		.matches = {
 			DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
-			DMI_EXACT_MATCH(DMI_BOARD_ASSET_TAG,
-					"6ES7647-0AA00-1YA2"),
 		},
 		.driver_data = (void *)&iot2040_stmmac_dmi_data,
 	},
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] stmmac: pci: Adjust IOT2000 matching
  2019-04-18  9:14 [PATCH] stmmac: pci: Adjust IOT2000 matching Jan Kiszka
@ 2019-04-18 17:43 ` David Miller
  2019-04-18 18:24   ` Jan Kiszka
  2019-04-26 14:34 ` Andy Shevchenko
  1 sibling, 1 reply; 8+ messages in thread
From: David Miller @ 2019-04-18 17:43 UTC (permalink / raw)
  To: jan.kiszka
  Cc: peppe.cavallaro, alexandre.torgue, netdev, linux-kernel,
	baocheng.su, andy.shevchenko

From: Jan Kiszka <jan.kiszka@siemens.com>
Date: Thu, 18 Apr 2019 11:14:56 +0200

> @@ -170,8 +176,6 @@ static const struct dmi_system_id quark_pci_dmi[] = {
>  	{
>  		.matches = {
>  			DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
> -			DMI_EXACT_MATCH(DMI_BOARD_ASSET_TAG,
> -					"6ES7647-0AA00-1YA2"),
>  		},
>  		.driver_data = (void *)&iot2040_stmmac_dmi_data,

So really, every IOT2000 that doesn't have the IOT2020 asset tag will be
a 2040?  Forever?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stmmac: pci: Adjust IOT2000 matching
  2019-04-18 17:43 ` David Miller
@ 2019-04-18 18:24   ` Jan Kiszka
  2019-04-18 18:48     ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2019-04-18 18:24 UTC (permalink / raw)
  To: David Miller
  Cc: peppe.cavallaro, alexandre.torgue, netdev, linux-kernel,
	baocheng.su, andy.shevchenko

On 18.04.19 19:43, David Miller wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> Date: Thu, 18 Apr 2019 11:14:56 +0200
> 
>> @@ -170,8 +176,6 @@ static const struct dmi_system_id quark_pci_dmi[] = {
>>   	{
>>   		.matches = {
>>   			DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
>> -			DMI_EXACT_MATCH(DMI_BOARD_ASSET_TAG,
>> -					"6ES7647-0AA00-1YA2"),
>>   		},
>>   		.driver_data = (void *)&iot2040_stmmac_dmi_data,
> 
> So really, every IOT2000 that doesn't have the IOT2020 asset tag will be
> a 2040?  Forever?
> 

Yes, seriously. The next version won't have all that DMI and ACPI stuff. And if 
there will ever be a version with that again, it will not be labeled "IOT2000" 
via the board name entry. And it will have more robust hardware discovery as 
well. Lesson(s) learned, in fact not only for this product series.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stmmac: pci: Adjust IOT2000 matching
  2019-04-18 18:24   ` Jan Kiszka
@ 2019-04-18 18:48     ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2019-04-18 18:48 UTC (permalink / raw)
  To: jan.kiszka
  Cc: peppe.cavallaro, alexandre.torgue, netdev, linux-kernel,
	baocheng.su, andy.shevchenko

From: Jan Kiszka <jan.kiszka@siemens.com>
Date: Thu, 18 Apr 2019 20:24:28 +0200

> On 18.04.19 19:43, David Miller wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>> Date: Thu, 18 Apr 2019 11:14:56 +0200
>> 
>>> @@ -170,8 +176,6 @@ static const struct dmi_system_id quark_pci_dmi[]
>>> = {
>>>   	{
>>>   		.matches = {
>>>   			DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
>>> -			DMI_EXACT_MATCH(DMI_BOARD_ASSET_TAG,
>>> -					"6ES7647-0AA00-1YA2"),
>>>   		},
>>>   		.driver_data = (void *)&iot2040_stmmac_dmi_data,
>> So really, every IOT2000 that doesn't have the IOT2020 asset tag will
>> be
>> a 2040?  Forever?
>> 
> 
> Yes, seriously. The next version won't have all that DMI and ACPI
> stuff. And if there will ever be a version with that again, it will
> not be labeled "IOT2000" via the board name entry. And it will have
> more robust hardware discovery as well. Lesson(s) learned, in fact not
> only for this product series.

Ok, applied, thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stmmac: pci: Adjust IOT2000 matching
  2019-04-18  9:14 [PATCH] stmmac: pci: Adjust IOT2000 matching Jan Kiszka
  2019-04-18 17:43 ` David Miller
@ 2019-04-26 14:34 ` Andy Shevchenko
  2019-04-26 15:36   ` Jan Kiszka
  1 sibling, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2019-04-26 14:34 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Giuseppe Cavallaro, Alexandre Torgue, David Miller,
	Linux Netdev List, Linux Kernel Mailing List, Su Bao Cheng,
	Andy Shevchenko

On Thu, Apr 18, 2019 at 12:15 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> From: Su Bao Cheng <baocheng.su@siemens.com>
>
> Since there are more IOT2040 variants with identical hardware but
> different asset tags, the asset tag matching should be adjusted to
> support them.
>
> For the board name "SIMATIC IOT2000", currently there are 2 types of
> hardware, IOT2020 and IOT2040. The IOT2020 is identified by its unique
> asset tag. Match on it first. If we then match on the board name only,
> we will catch all IOT2040 variants. In the future there will be no other
> devices with the "SIMATIC IOT2000" DMI board name but different
> hardware.
>
> Signed-off-by: Su Bao Cheng <baocheng.su@siemens.com>
> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>

> +       /*

> +        * There are 2 types of SIMATIC IOT2000: IOT20202 and IOT2040.

20202 ?

> +        * The asset tag "6ES7647-0AA00-0YA2" is only for IOT2020 which
> +        * has only one pci network device while other asset tags are
> +        * for IOT2040 which has two.
> +        */



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stmmac: pci: Adjust IOT2000 matching
  2019-04-26 14:34 ` Andy Shevchenko
@ 2019-04-26 15:36   ` Jan Kiszka
  2019-04-26 17:13     ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2019-04-26 15:36 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Giuseppe Cavallaro, Alexandre Torgue, David Miller,
	Linux Netdev List, Linux Kernel Mailing List, Su Bao Cheng

On 26.04.19 16:34, Andy Shevchenko wrote:
> On Thu, Apr 18, 2019 at 12:15 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> From: Su Bao Cheng <baocheng.su@siemens.com>
>>
>> Since there are more IOT2040 variants with identical hardware but
>> different asset tags, the asset tag matching should be adjusted to
>> support them.
>>
>> For the board name "SIMATIC IOT2000", currently there are 2 types of
>> hardware, IOT2020 and IOT2040. The IOT2020 is identified by its unique
>> asset tag. Match on it first. If we then match on the board name only,
>> we will catch all IOT2040 variants. In the future there will be no other
>> devices with the "SIMATIC IOT2000" DMI board name but different
>> hardware.
>>
>> Signed-off-by: Su Bao Cheng <baocheng.su@siemens.com>
>> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
> 
>> +       /*
> 
>> +        * There are 2 types of SIMATIC IOT2000: IOT20202 and IOT2040.
> 
> 20202 ?

2020...

I can send a fix-up or v2, whatever is preferred.

Thanks,
Jan

> 
>> +        * The asset tag "6ES7647-0AA00-0YA2" is only for IOT2020 which
>> +        * has only one pci network device while other asset tags are
>> +        * for IOT2040 which has two.
>> +        */
> 
> 
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stmmac: pci: Adjust IOT2000 matching
  2019-04-26 15:36   ` Jan Kiszka
@ 2019-04-26 17:13     ` Andy Shevchenko
  2019-04-26 17:14       ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2019-04-26 17:13 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Giuseppe Cavallaro, Alexandre Torgue, David Miller,
	Linux Netdev List, Linux Kernel Mailing List, Su Bao Cheng

On Fri, Apr 26, 2019 at 6:36 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 26.04.19 16:34, Andy Shevchenko wrote:
> > On Thu, Apr 18, 2019 at 12:15 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:

> >> +       /*
> >
> >> +        * There are 2 types of SIMATIC IOT2000: IOT20202 and IOT2040.
> >
> > 20202 ?
>
> 2020...
>
> I can send a fix-up or v2, whatever is preferred.

My understanding that if Dave applied, you need to send a fixup.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stmmac: pci: Adjust IOT2000 matching
  2019-04-26 17:13     ` Andy Shevchenko
@ 2019-04-26 17:14       ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2019-04-26 17:14 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Giuseppe Cavallaro, Alexandre Torgue, David Miller,
	Linux Netdev List, Linux Kernel Mailing List, Su Bao Cheng

On Fri, Apr 26, 2019 at 8:13 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Fri, Apr 26, 2019 at 6:36 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> > On 26.04.19 16:34, Andy Shevchenko wrote:
> > > On Thu, Apr 18, 2019 at 12:15 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> > >> +       /*
> > >
> > >> +        * There are 2 types of SIMATIC IOT2000: IOT20202 and IOT2040.
> > >
> > > 20202 ?
> >
> > 2020...
> >
> > I can send a fix-up or v2, whatever is preferred.
>
> My understanding that if Dave applied, you need to send a fixup.

s/Dave/David/
Sorry.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-26 17:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18  9:14 [PATCH] stmmac: pci: Adjust IOT2000 matching Jan Kiszka
2019-04-18 17:43 ` David Miller
2019-04-18 18:24   ` Jan Kiszka
2019-04-18 18:48     ` David Miller
2019-04-26 14:34 ` Andy Shevchenko
2019-04-26 15:36   ` Jan Kiszka
2019-04-26 17:13     ` Andy Shevchenko
2019-04-26 17:14       ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).