platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/x86: pmc_atom: Add DMI quirk for Lex 3I380A/CW boards
@ 2022-07-27 15:32 Matwey V. Kornilov
  2022-07-28 18:33 ` Hans de Goede
  0 siblings, 1 reply; 4+ messages in thread
From: Matwey V. Kornilov @ 2022-07-27 15:32 UTC (permalink / raw)
  To: hdegoede
  Cc: andriy.shevchenko, carlo, davem, hkallweit1, js, linux-clk,
	linux-wireless, matwey.kornilov, mturquette, netdev,
	pierre-louis.bossart, sboyd, markgross, platform-driver-x86,
	linux-kernel, paul.gortmaker, Matwey V. Kornilov, stable

Lex 3I380A/CW (Atom E3845) motherboards are equipped with dual Intel I211
based 1Gbps copper ethernet:

     http://www.lex.com.tw/products/pdf/3I380A&3I380CW.pdf

This patch is to fix the issue with broken "LAN2" port. Before the
patch, only one ethernet port is initialized:

     igb 0000:01:00.0: added PHC on eth0
     igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
     igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e4
     igb 0000:01:00.0: eth0: PBA No: FFFFFF-0FF
     igb 0000:01:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
     igb: probe of 0000:02:00.0 failed with error -2

With this patch, both ethernet ports are available:

     igb 0000:01:00.0: added PHC on eth0
     igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
     igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e4
     igb 0000:01:00.0: eth0: PBA No: FFFFFF-0FF
     igb 0000:01:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
     igb 0000:02:00.0: added PHC on eth1
     igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
     igb 0000:02:00.0: eth1: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e5
     igb 0000:02:00.0: eth1: PBA No: FFFFFF-0FF
     igb 0000:02:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)

The issue was observed at 3I380A board with BIOS version "A4 01/15/2016"
and 3I380CW board with BIOS version "A3 09/29/2014".

Reference: https://lore.kernel.org/netdev/08c744e6-385b-8fcf-ecdf-1292b5869f94@redhat.com/
Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Cc: <stable@vger.kernel.org> # v4.19+
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
---
 drivers/platform/x86/pmc_atom.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
index b8b1ed1406de..5dc82667907b 100644
--- a/drivers/platform/x86/pmc_atom.c
+++ b/drivers/platform/x86/pmc_atom.c
@@ -388,6 +388,24 @@ static const struct dmi_system_id critclk_systems[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "CEC10 Family"),
 		},
 	},
+	{
+		/* pmc_plt_clk* - are used for ethernet controllers */
+		.ident = "Lex 3I380A",
+		.callback = dmi_callback,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "3I380A"),
+		},
+	},
+	{
+		/* pmc_plt_clk* - are used for ethernet controllers */
+		.ident = "Lex 3I380CW",
+		.callback = dmi_callback,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "3I380CW"),
+		},
+	},
 	{
 		/* pmc_plt_clk0 - 3 are used for the 4 ethernet controllers */
 		.ident = "Lex 3I380D",
-- 
2.35.3


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

* Re: [PATCH] platform/x86: pmc_atom: Add DMI quirk for Lex 3I380A/CW boards
  2022-07-27 15:32 [PATCH] platform/x86: pmc_atom: Add DMI quirk for Lex 3I380A/CW boards Matwey V. Kornilov
@ 2022-07-28 18:33 ` Hans de Goede
  2022-07-28 18:39   ` Matwey V. Kornilov
  0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2022-07-28 18:33 UTC (permalink / raw)
  To: Matwey V. Kornilov
  Cc: andriy.shevchenko, carlo, davem, hkallweit1, js, linux-clk,
	linux-wireless, matwey.kornilov, mturquette, netdev,
	pierre-louis.bossart, sboyd, markgross, platform-driver-x86,
	linux-kernel, paul.gortmaker, stable

Hi,

On 7/27/22 17:32, Matwey V. Kornilov wrote:
> Lex 3I380A/CW (Atom E3845) motherboards are equipped with dual Intel I211
> based 1Gbps copper ethernet:
> 
>      http://www.lex.com.tw/products/pdf/3I380A&3I380CW.pdf
> 
> This patch is to fix the issue with broken "LAN2" port. Before the
> patch, only one ethernet port is initialized:
> 
>      igb 0000:01:00.0: added PHC on eth0
>      igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
>      igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e4
>      igb 0000:01:00.0: eth0: PBA No: FFFFFF-0FF
>      igb 0000:01:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
>      igb: probe of 0000:02:00.0 failed with error -2
> 
> With this patch, both ethernet ports are available:
> 
>      igb 0000:01:00.0: added PHC on eth0
>      igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
>      igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e4
>      igb 0000:01:00.0: eth0: PBA No: FFFFFF-0FF
>      igb 0000:01:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
>      igb 0000:02:00.0: added PHC on eth1
>      igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
>      igb 0000:02:00.0: eth1: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e5
>      igb 0000:02:00.0: eth1: PBA No: FFFFFF-0FF
>      igb 0000:02:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
> 
> The issue was observed at 3I380A board with BIOS version "A4 01/15/2016"
> and 3I380CW board with BIOS version "A3 09/29/2014".
> 
> Reference: https://lore.kernel.org/netdev/08c744e6-385b-8fcf-ecdf-1292b5869f94@redhat.com/
> Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
> Cc: <stable@vger.kernel.org> # v4.19+
> Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>


Thank you for the patch.

The last week I have received 2 different patches adding
a total of 3 new "Lex BayTrail" entries to critclk_systems[]
on top of the existing 2.

Looking at: https://www.lex.com.tw/products/embedded-ipc-board/
we can see that Lex BayTrail makes many embedded boards with
multiple ethernet boards and none of their products are battery
powered so we don't need to worry (too much) about power consumption
when suspended.

So instead of adding 3 new entries I've written a patch to
simply disable the turning off of the clocks on all
systems which have "Lex BayTrail" as their DMI sys_vendor:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=review-hans&id=c9d959fc32a5f9312282817052d8986614f2dc08

I've added a Reported-by tag to give you credit for the work
you have done on this.

I will send this alternative fix to Linus as part of
the other pdx86 patches for 5.21.

Regards,

Hans




> ---
>  drivers/platform/x86/pmc_atom.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
> index b8b1ed1406de..5dc82667907b 100644
> --- a/drivers/platform/x86/pmc_atom.c
> +++ b/drivers/platform/x86/pmc_atom.c
> @@ -388,6 +388,24 @@ static const struct dmi_system_id critclk_systems[] = {
>  			DMI_MATCH(DMI_PRODUCT_NAME, "CEC10 Family"),
>  		},
>  	},
> +	{
> +		/* pmc_plt_clk* - are used for ethernet controllers */
> +		.ident = "Lex 3I380A",
> +		.callback = dmi_callback,
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "3I380A"),
> +		},
> +	},
> +	{
> +		/* pmc_plt_clk* - are used for ethernet controllers */
> +		.ident = "Lex 3I380CW",
> +		.callback = dmi_callback,
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "3I380CW"),
> +		},
> +	},
>  	{
>  		/* pmc_plt_clk0 - 3 are used for the 4 ethernet controllers */
>  		.ident = "Lex 3I380D",


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

* Re: [PATCH] platform/x86: pmc_atom: Add DMI quirk for Lex 3I380A/CW boards
  2022-07-28 18:33 ` Hans de Goede
@ 2022-07-28 18:39   ` Matwey V. Kornilov
  2022-07-28 18:42     ` Hans de Goede
  0 siblings, 1 reply; 4+ messages in thread
From: Matwey V. Kornilov @ 2022-07-28 18:39 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Andy Shevchenko, carlo, davem, hkallweit1, js, linux-clk,
	linux-wireless, mturquette, netdev, Pierre-Louis Bossart, sboyd,
	markgross, platform-driver-x86, open list, paul.gortmaker,
	stable

чт, 28 июл. 2022 г. в 21:33, Hans de Goede <hdegoede@redhat.com>:
>
> Hi,
>
> On 7/27/22 17:32, Matwey V. Kornilov wrote:
> > Lex 3I380A/CW (Atom E3845) motherboards are equipped with dual Intel I211
> > based 1Gbps copper ethernet:
> >
> >      http://www.lex.com.tw/products/pdf/3I380A&3I380CW.pdf
> >
> > This patch is to fix the issue with broken "LAN2" port. Before the
> > patch, only one ethernet port is initialized:
> >
> >      igb 0000:01:00.0: added PHC on eth0
> >      igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
> >      igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e4
> >      igb 0000:01:00.0: eth0: PBA No: FFFFFF-0FF
> >      igb 0000:01:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
> >      igb: probe of 0000:02:00.0 failed with error -2
> >
> > With this patch, both ethernet ports are available:
> >
> >      igb 0000:01:00.0: added PHC on eth0
> >      igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
> >      igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e4
> >      igb 0000:01:00.0: eth0: PBA No: FFFFFF-0FF
> >      igb 0000:01:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
> >      igb 0000:02:00.0: added PHC on eth1
> >      igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
> >      igb 0000:02:00.0: eth1: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e5
> >      igb 0000:02:00.0: eth1: PBA No: FFFFFF-0FF
> >      igb 0000:02:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
> >
> > The issue was observed at 3I380A board with BIOS version "A4 01/15/2016"
> > and 3I380CW board with BIOS version "A3 09/29/2014".
> >
> > Reference: https://lore.kernel.org/netdev/08c744e6-385b-8fcf-ecdf-1292b5869f94@redhat.com/
> > Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
> > Cc: <stable@vger.kernel.org> # v4.19+
> > Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
>
>
> Thank you for the patch.
>
> The last week I have received 2 different patches adding
> a total of 3 new "Lex BayTrail" entries to critclk_systems[]
> on top of the existing 2.
>
> Looking at: https://www.lex.com.tw/products/embedded-ipc-board/
> we can see that Lex BayTrail makes many embedded boards with
> multiple ethernet boards and none of their products are battery
> powered so we don't need to worry (too much) about power consumption
> when suspended.
>
> So instead of adding 3 new entries I've written a patch to
> simply disable the turning off of the clocks on all
> systems which have "Lex BayTrail" as their DMI sys_vendor:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=review-hans&id=c9d959fc32a5f9312282817052d8986614f2dc08
>
> I've added a Reported-by tag to give you credit for the work
> you have done on this.
>
> I will send this alternative fix to Linus as part of
> the other pdx86 patches for 5.21.

Thank you. Will your fix also appear in stable/lts kernels?

>
> Regards,
>
> Hans
>
>
>
>
> > ---
> >  drivers/platform/x86/pmc_atom.c | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
> > index b8b1ed1406de..5dc82667907b 100644
> > --- a/drivers/platform/x86/pmc_atom.c
> > +++ b/drivers/platform/x86/pmc_atom.c
> > @@ -388,6 +388,24 @@ static const struct dmi_system_id critclk_systems[] = {
> >                       DMI_MATCH(DMI_PRODUCT_NAME, "CEC10 Family"),
> >               },
> >       },
> > +     {
> > +             /* pmc_plt_clk* - are used for ethernet controllers */
> > +             .ident = "Lex 3I380A",
> > +             .callback = dmi_callback,
> > +             .matches = {
> > +                     DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"),
> > +                     DMI_MATCH(DMI_PRODUCT_NAME, "3I380A"),
> > +             },
> > +     },
> > +     {
> > +             /* pmc_plt_clk* - are used for ethernet controllers */
> > +             .ident = "Lex 3I380CW",
> > +             .callback = dmi_callback,
> > +             .matches = {
> > +                     DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"),
> > +                     DMI_MATCH(DMI_PRODUCT_NAME, "3I380CW"),
> > +             },
> > +     },
> >       {
> >               /* pmc_plt_clk0 - 3 are used for the 4 ethernet controllers */
> >               .ident = "Lex 3I380D",
>


-- 
With best regards,
Matwey V. Kornilov

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

* Re: [PATCH] platform/x86: pmc_atom: Add DMI quirk for Lex 3I380A/CW boards
  2022-07-28 18:39   ` Matwey V. Kornilov
@ 2022-07-28 18:42     ` Hans de Goede
  0 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2022-07-28 18:42 UTC (permalink / raw)
  To: Matwey V. Kornilov
  Cc: Andy Shevchenko, carlo, davem, hkallweit1, js, linux-clk,
	linux-wireless, mturquette, netdev, Pierre-Louis Bossart, sboyd,
	markgross, platform-driver-x86, open list, paul.gortmaker,
	stable

Hi,

On 7/28/22 20:39, Matwey V. Kornilov wrote:
> чт, 28 июл. 2022 г. в 21:33, Hans de Goede <hdegoede@redhat.com>:
>>
>> Hi,
>>
>> On 7/27/22 17:32, Matwey V. Kornilov wrote:
>>> Lex 3I380A/CW (Atom E3845) motherboards are equipped with dual Intel I211
>>> based 1Gbps copper ethernet:
>>>
>>>      http://www.lex.com.tw/products/pdf/3I380A&3I380CW.pdf
>>>
>>> This patch is to fix the issue with broken "LAN2" port. Before the
>>> patch, only one ethernet port is initialized:
>>>
>>>      igb 0000:01:00.0: added PHC on eth0
>>>      igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
>>>      igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e4
>>>      igb 0000:01:00.0: eth0: PBA No: FFFFFF-0FF
>>>      igb 0000:01:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
>>>      igb: probe of 0000:02:00.0 failed with error -2
>>>
>>> With this patch, both ethernet ports are available:
>>>
>>>      igb 0000:01:00.0: added PHC on eth0
>>>      igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
>>>      igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e4
>>>      igb 0000:01:00.0: eth0: PBA No: FFFFFF-0FF
>>>      igb 0000:01:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
>>>      igb 0000:02:00.0: added PHC on eth1
>>>      igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
>>>      igb 0000:02:00.0: eth1: (PCIe:2.5Gb/s:Width x1) 4c:02:89:10:02:e5
>>>      igb 0000:02:00.0: eth1: PBA No: FFFFFF-0FF
>>>      igb 0000:02:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
>>>
>>> The issue was observed at 3I380A board with BIOS version "A4 01/15/2016"
>>> and 3I380CW board with BIOS version "A3 09/29/2014".
>>>
>>> Reference: https://lore.kernel.org/netdev/08c744e6-385b-8fcf-ecdf-1292b5869f94@redhat.com/
>>> Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
>>> Cc: <stable@vger.kernel.org> # v4.19+
>>> Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
>>
>>
>> Thank you for the patch.
>>
>> The last week I have received 2 different patches adding
>> a total of 3 new "Lex BayTrail" entries to critclk_systems[]
>> on top of the existing 2.
>>
>> Looking at: https://www.lex.com.tw/products/embedded-ipc-board/
>> we can see that Lex BayTrail makes many embedded boards with
>> multiple ethernet boards and none of their products are battery
>> powered so we don't need to worry (too much) about power consumption
>> when suspended.
>>
>> So instead of adding 3 new entries I've written a patch to
>> simply disable the turning off of the clocks on all
>> systems which have "Lex BayTrail" as their DMI sys_vendor:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=review-hans&id=c9d959fc32a5f9312282817052d8986614f2dc08
>>
>> I've added a Reported-by tag to give you credit for the work
>> you have done on this.
>>
>> I will send this alternative fix to Linus as part of
>> the other pdx86 patches for 5.21.
> 
> Thank you. Will your fix also appear in stable/lts kernels?

Yes it has the same Fixes tag as your patch did, this will
cause it to automatically get cherry-picked into kernels
which have the fixed commit hash.

Regards,

Hans


>>> ---
>>>  drivers/platform/x86/pmc_atom.c | 18 ++++++++++++++++++
>>>  1 file changed, 18 insertions(+)
>>>
>>> diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
>>> index b8b1ed1406de..5dc82667907b 100644
>>> --- a/drivers/platform/x86/pmc_atom.c
>>> +++ b/drivers/platform/x86/pmc_atom.c
>>> @@ -388,6 +388,24 @@ static const struct dmi_system_id critclk_systems[] = {
>>>                       DMI_MATCH(DMI_PRODUCT_NAME, "CEC10 Family"),
>>>               },
>>>       },
>>> +     {
>>> +             /* pmc_plt_clk* - are used for ethernet controllers */
>>> +             .ident = "Lex 3I380A",
>>> +             .callback = dmi_callback,
>>> +             .matches = {
>>> +                     DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"),
>>> +                     DMI_MATCH(DMI_PRODUCT_NAME, "3I380A"),
>>> +             },
>>> +     },
>>> +     {
>>> +             /* pmc_plt_clk* - are used for ethernet controllers */
>>> +             .ident = "Lex 3I380CW",
>>> +             .callback = dmi_callback,
>>> +             .matches = {
>>> +                     DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"),
>>> +                     DMI_MATCH(DMI_PRODUCT_NAME, "3I380CW"),
>>> +             },
>>> +     },
>>>       {
>>>               /* pmc_plt_clk0 - 3 are used for the 4 ethernet controllers */
>>>               .ident = "Lex 3I380D",
>>
> 
> 


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

end of thread, other threads:[~2022-07-28 18:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 15:32 [PATCH] platform/x86: pmc_atom: Add DMI quirk for Lex 3I380A/CW boards Matwey V. Kornilov
2022-07-28 18:33 ` Hans de Goede
2022-07-28 18:39   ` Matwey V. Kornilov
2022-07-28 18:42     ` Hans de Goede

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).