diff mbox

acpi/ec: Use ec_no_wakeup on more Thinkpad X1 Carbon 6th systems

Message ID 20180713205047.21933-1-robbat2@gentoo.org (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Robin H. Johnson July 13, 2018, 8:50 p.m. UTC
The ec_no_wakeup matcher added for Thinkpad X1 Carbon 6th gen systems
beyond matched only a single DMI model (20KGS3JF01), that didn't cover
my laptop (20KH002JUS). Change to match based on DMI product family to
cover all X1 6th gen systems.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
---
 drivers/acpi/ec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki July 19, 2018, 10:54 a.m. UTC | #1
On Friday, July 13, 2018 10:50:47 PM CEST Robin H. Johnson wrote:
> The ec_no_wakeup matcher added for Thinkpad X1 Carbon 6th gen systems
> beyond matched only a single DMI model (20KGS3JF01), that didn't cover
> my laptop (20KH002JUS). Change to match based on DMI product family to
> cover all X1 6th gen systems.
> 
> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
> ---
>  drivers/acpi/ec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index 442a9e24f439..917f77f4cb55 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -2042,7 +2042,7 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
>  		.ident = "Thinkpad X1 Carbon 6th",
>  		.matches = {
>  			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> -			DMI_MATCH(DMI_PRODUCT_NAME, "20KGS3JF01"),
> +			DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
>  		},
>  	},
>  	{ },
> 

Applied, thanks!


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mika Westerberg Aug. 7, 2018, 1:16 p.m. UTC | #2
On Fri, Jul 13, 2018 at 08:50:47PM +0000, Robin H. Johnson wrote:
> The ec_no_wakeup matcher added for Thinkpad X1 Carbon 6th gen systems
> beyond matched only a single DMI model (20KGS3JF01), that didn't cover
> my laptop (20KH002JUS). Change to match based on DMI product family to
> cover all X1 6th gen systems.
> 
> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
> ---
>  drivers/acpi/ec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index 442a9e24f439..917f77f4cb55 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -2042,7 +2042,7 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
>  		.ident = "Thinkpad X1 Carbon 6th",
>  		.matches = {
>  			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> -			DMI_MATCH(DMI_PRODUCT_NAME, "20KGS3JF01"),
> +			DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),

This causes problem on my laptop because DMI_PRODUCT_FAMILY on that
system returns "ThinkPad X1 Carbon 6th" (Pad vs. pad). Can you share
output of dmidecode from your system? Maybe we can find some common
identifier there that works for both.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Aug. 7, 2018, 2:23 p.m. UTC | #3
On Tue, Aug 7, 2018 at 3:16 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Fri, Jul 13, 2018 at 08:50:47PM +0000, Robin H. Johnson wrote:
>> The ec_no_wakeup matcher added for Thinkpad X1 Carbon 6th gen systems
>> beyond matched only a single DMI model (20KGS3JF01), that didn't cover
>> my laptop (20KH002JUS). Change to match based on DMI product family to
>> cover all X1 6th gen systems.
>>
>> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
>> ---
>>  drivers/acpi/ec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
>> index 442a9e24f439..917f77f4cb55 100644
>> --- a/drivers/acpi/ec.c
>> +++ b/drivers/acpi/ec.c
>> @@ -2042,7 +2042,7 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
>>               .ident = "Thinkpad X1 Carbon 6th",
>>               .matches = {
>>                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
>> -                     DMI_MATCH(DMI_PRODUCT_NAME, "20KGS3JF01"),
>> +                     DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
>
> This causes problem on my laptop because DMI_PRODUCT_FAMILY on that
> system returns "ThinkPad X1 Carbon 6th" (Pad vs. pad). Can you share
> output of dmidecode from your system? Maybe we can find some common
> identifier there that works for both.

Or we can add one more entry to the table I guess. :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Robin H. Johnson Aug. 7, 2018, 6:36 p.m. UTC | #4
On Tue, Aug 07, 2018 at 04:23:44PM +0200, Rafael J. Wysocki wrote:
> > This causes problem on my laptop because DMI_PRODUCT_FAMILY on that
> > system returns "ThinkPad X1 Carbon 6th" (Pad vs. pad). Can you share
> > output of dmidecode from your system? Maybe we can find some common
> > identifier there that works for both.
> 
> Or we can add one more entry to the table I guess. :-)
Hmm, I recently did the LVFS update of my firmware, and now it's
'ThinkPad X1 Carbon 6th'.

So maybe Lenovo changed it?
Mika Westerberg Aug. 7, 2018, 7:06 p.m. UTC | #5
On Tue, Aug 07, 2018 at 06:36:16PM +0000, Robin H. Johnson wrote:
> On Tue, Aug 07, 2018 at 04:23:44PM +0200, Rafael J. Wysocki wrote:
> > > This causes problem on my laptop because DMI_PRODUCT_FAMILY on that
> > > system returns "ThinkPad X1 Carbon 6th" (Pad vs. pad). Can you share
> > > output of dmidecode from your system? Maybe we can find some common
> > > identifier there that works for both.
> > 
> > Or we can add one more entry to the table I guess. :-)
> Hmm, I recently did the LVFS update of my firmware, and now it's
> 'ThinkPad X1 Carbon 6th'.
> 
> So maybe Lenovo changed it?

In that case we should add another entry so that both strings are
covered as Rafael suggested. I can do that tomorrow unless you want to
handle that.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Robin H. Johnson Aug. 7, 2018, 7:17 p.m. UTC | #6
On Tue, Aug 07, 2018 at 10:06:58PM +0300, Mika Westerberg wrote:
> On Tue, Aug 07, 2018 at 06:36:16PM +0000, Robin H. Johnson wrote:
> > On Tue, Aug 07, 2018 at 04:23:44PM +0200, Rafael J. Wysocki wrote:
> > > > This causes problem on my laptop because DMI_PRODUCT_FAMILY on that
> > > > system returns "ThinkPad X1 Carbon 6th" (Pad vs. pad). Can you share
> > > > output of dmidecode from your system? Maybe we can find some common
> > > > identifier there that works for both.
> > > 
> > > Or we can add one more entry to the table I guess. :-)
> > Hmm, I recently did the LVFS update of my firmware, and now it's
> > 'ThinkPad X1 Carbon 6th'.
> > 
> > So maybe Lenovo changed it?
> 
> In that case we should add another entry so that both strings are
> covered as Rafael suggested. I can do that tomorrow unless you want to
> handle that.
You'll probably beat me to it.

Related to this, did you see the sleep patch that DJB posted on the
Qubes list?

https://marc.info/?l=qubes-users&m=153308905514481&q=p5
Mika Westerberg Aug. 8, 2018, 9:33 a.m. UTC | #7
On Tue, Aug 07, 2018 at 07:17:35PM +0000, Robin H. Johnson wrote:
> Related to this, did you see the sleep patch that DJB posted on the
> Qubes list?
> 
> https://marc.info/?l=qubes-users&m=153308905514481&q=p5

Not seen that but I think it is bad idea. You end up executing code
paths which are little or not at all tested by the vendors.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 442a9e24f439..917f77f4cb55 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -2042,7 +2042,7 @@  static const struct dmi_system_id acpi_ec_no_wakeup[] = {
 		.ident = "Thinkpad X1 Carbon 6th",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-			DMI_MATCH(DMI_PRODUCT_NAME, "20KGS3JF01"),
+			DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
 		},
 	},
 	{ },