* [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks
@ 2023-12-06 21:21 Mario Limonciello
2023-12-06 21:21 ` [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop Mario Limonciello
2023-12-06 21:55 ` [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks Rahul Rameshbabu
0 siblings, 2 replies; 8+ messages in thread
From: Mario Limonciello @ 2023-12-06 21:21 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, rrameshbabu, Mario Limonciello
Some laptops have an i8042 controller in the SOC, nothing mentioned in
ACPI PNP and nothing connected to the controller. Add the ability to
skip probing in this case.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/input/serio/i8042-acpipnpio.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h
index 9c39553d30fa..0fd88bbfaee1 100644
--- a/drivers/input/serio/i8042-acpipnpio.h
+++ b/drivers/input/serio/i8042-acpipnpio.h
@@ -1707,6 +1707,9 @@ static int __init i8042_platform_init(void)
"");
#endif
+ if (i8042_nokbd && i8042_noaux)
+ return -ENODEV;
+
retval = i8042_pnp_init();
if (retval)
return retval;
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop
2023-12-06 21:21 [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks Mario Limonciello
@ 2023-12-06 21:21 ` Mario Limonciello
2023-12-06 21:54 ` Rahul Rameshbabu
2023-12-08 17:57 ` Dmitry Torokhov
2023-12-06 21:55 ` [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks Rahul Rameshbabu
1 sibling, 2 replies; 8+ messages in thread
From: Mario Limonciello @ 2023-12-06 21:21 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, rrameshbabu, Mario Limonciello
The Framework 16" laptop doesn't have a PS/2 keyboard. At bootup the
following messages are emitted:
i8042: PNP: No PS/2 controller found.
i8042: PNP: Probing ports directly.
i8042: Can't read CTR while initializing i8042
i8042: probe of i8042 failed with error -5
There are no PNP devices as those listed in `pnp_kbd_devids` but
i8042_pnp_init() ignores this and still runs and will continue to
try to probe.
As there is no PS/2 keyboard or mouse in this laptop, set a quirk
to avoid this behavior.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/input/serio/i8042-acpipnpio.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h
index 0fd88bbfaee1..6a71416057a3 100644
--- a/drivers/input/serio/i8042-acpipnpio.h
+++ b/drivers/input/serio/i8042-acpipnpio.h
@@ -1310,6 +1310,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
},
+ /* Framework 16" laptop uses an internal USB keyboard */
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Framework"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Laptop 16"),
+ },
+ .driver_data = (void *)(SERIO_QUIRK_NOKBD | SERIO_QUIRK_NOAUX)
+ },
{ }
};
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop
2023-12-06 21:21 ` [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop Mario Limonciello
@ 2023-12-06 21:54 ` Rahul Rameshbabu
2023-12-08 17:57 ` Dmitry Torokhov
1 sibling, 0 replies; 8+ messages in thread
From: Rahul Rameshbabu @ 2023-12-06 21:54 UTC (permalink / raw)
To: Mario Limonciello; +Cc: dmitry.torokhov, linux-input, linux-kernel
On Wed, 06 Dec, 2023 15:21:40 -0600 Mario Limonciello <mario.limonciello@amd.com> wrote:
> The Framework 16" laptop doesn't have a PS/2 keyboard. At bootup the
> following messages are emitted:
>
> i8042: PNP: No PS/2 controller found.
> i8042: PNP: Probing ports directly.
> i8042: Can't read CTR while initializing i8042
> i8042: probe of i8042 failed with error -5
>
> There are no PNP devices as those listed in `pnp_kbd_devids` but
> i8042_pnp_init() ignores this and still runs and will continue to
> try to probe.
>
> As there is no PS/2 keyboard or mouse in this laptop, set a quirk
> to avoid this behavior.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks
2023-12-06 21:21 [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks Mario Limonciello
2023-12-06 21:21 ` [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop Mario Limonciello
@ 2023-12-06 21:55 ` Rahul Rameshbabu
2023-12-07 20:39 ` Mario Limonciello
1 sibling, 1 reply; 8+ messages in thread
From: Rahul Rameshbabu @ 2023-12-06 21:55 UTC (permalink / raw)
To: Mario Limonciello; +Cc: dmitry.torokhov, linux-input, linux-kernel
On Wed, 06 Dec, 2023 15:21:39 -0600 Mario Limonciello <mario.limonciello@amd.com> wrote:
> Some laptops have an i8042 controller in the SOC, nothing mentioned in
> ACPI PNP and nothing connected to the controller. Add the ability to
> skip probing in this case.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
Thanks. I think this is a good choice for handling the issue you
presented with the Framework 16.
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks
2023-12-06 21:55 ` [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks Rahul Rameshbabu
@ 2023-12-07 20:39 ` Mario Limonciello
0 siblings, 0 replies; 8+ messages in thread
From: Mario Limonciello @ 2023-12-07 20:39 UTC (permalink / raw)
To: Rahul Rameshbabu; +Cc: dmitry.torokhov, linux-input, linux-kernel
On 12/6/2023 15:55, Rahul Rameshbabu wrote:
> On Wed, 06 Dec, 2023 15:21:39 -0600 Mario Limonciello <mario.limonciello@amd.com> wrote:
>> Some laptops have an i8042 controller in the SOC, nothing mentioned in
>> ACPI PNP and nothing connected to the controller. Add the ability to
>> skip probing in this case.
>>
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>> ---
>
> Thanks. I think this is a good choice for handling the issue you
> presented with the Framework 16.
>
> Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Thanks!
Dmitry,
Are you OK with this? The other direction I considered was to add a DMI
BIOS year check and "only continue to probe" non PNP devices on systems
older than 2023.
That could let you cut and run without needing to continue to add quirks
like this but it could be riskier.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop
2023-12-06 21:21 ` [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop Mario Limonciello
2023-12-06 21:54 ` Rahul Rameshbabu
@ 2023-12-08 17:57 ` Dmitry Torokhov
2023-12-08 18:08 ` Rahul Rameshbabu
1 sibling, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2023-12-08 17:57 UTC (permalink / raw)
To: Mario Limonciello; +Cc: linux-input, linux-kernel, rrameshbabu
On Wed, Dec 06, 2023 at 03:21:40PM -0600, Mario Limonciello wrote:
> The Framework 16" laptop doesn't have a PS/2 keyboard. At bootup the
> following messages are emitted:
>
> i8042: PNP: No PS/2 controller found.
> i8042: PNP: Probing ports directly.
> i8042: Can't read CTR while initializing i8042
> i8042: probe of i8042 failed with error -5
>
> There are no PNP devices as those listed in `pnp_kbd_devids` but
> i8042_pnp_init() ignores this and still runs and will continue to
> try to probe.
>
> As there is no PS/2 keyboard or mouse in this laptop, set a quirk
> to avoid this behavior.
I believe the proper fix for this is for the firmware not report i8042
as present by properly setting up FADT. Please take a look at
arch/x86/kernel/acpi/boot.c::acpi_parse_fadt() and how it sets flag
X86_LEGACY_I8042_FIRMWARE_ABSENT.
It will still say "PNP: No PS/2 controller found" which is an
"informational" message, but should not try to probe ports directly and
report errors.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop
2023-12-08 17:57 ` Dmitry Torokhov
@ 2023-12-08 18:08 ` Rahul Rameshbabu
2023-12-08 18:22 ` Mario Limonciello
0 siblings, 1 reply; 8+ messages in thread
From: Rahul Rameshbabu @ 2023-12-08 18:08 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Mario Limonciello, linux-input, linux-kernel
On Fri, 08 Dec, 2023 17:57:05 +0000 Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Wed, Dec 06, 2023 at 03:21:40PM -0600, Mario Limonciello wrote:
>> The Framework 16" laptop doesn't have a PS/2 keyboard. At bootup the
>> following messages are emitted:
>>
>> i8042: PNP: No PS/2 controller found.
>> i8042: PNP: Probing ports directly.
>> i8042: Can't read CTR while initializing i8042
>> i8042: probe of i8042 failed with error -5
>>
>> There are no PNP devices as those listed in `pnp_kbd_devids` but
>> i8042_pnp_init() ignores this and still runs and will continue to
>> try to probe.
>>
>> As there is no PS/2 keyboard or mouse in this laptop, set a quirk
>> to avoid this behavior.
>
> I believe the proper fix for this is for the firmware not report i8042
> as present by properly setting up FADT. Please take a look at
> arch/x86/kernel/acpi/boot.c::acpi_parse_fadt() and how it sets flag
> X86_LEGACY_I8042_FIRMWARE_ABSENT.
This is along the lines of a point I brought up in the v1 of this patch.
https://lore.kernel.org/linux-input/87v89bgl7a.fsf@nvidia.com/
This means that Framework as a manufacturer will need to provide the
appropriate fix for what's advertised over ACPI by the device. I think
that makes sense instead of creating quirk combinations to avoid
resolving the issue at the ACPI level. I guess the only de-merit is that
means folks need to depend on vendors with no way to suppress this if a
vendor does not correct set up FADT.
>
> It will still say "PNP: No PS/2 controller found" which is an
> "informational" message, but should not try to probe ports directly and
> report errors.
--
Thanks,
Rahul Rameshbabu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop
2023-12-08 18:08 ` Rahul Rameshbabu
@ 2023-12-08 18:22 ` Mario Limonciello
0 siblings, 0 replies; 8+ messages in thread
From: Mario Limonciello @ 2023-12-08 18:22 UTC (permalink / raw)
To: Rahul Rameshbabu, Dmitry Torokhov; +Cc: linux-input, linux-kernel
On 12/8/2023 12:08, Rahul Rameshbabu wrote:
> On Fri, 08 Dec, 2023 17:57:05 +0000 Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
>> On Wed, Dec 06, 2023 at 03:21:40PM -0600, Mario Limonciello wrote:
>>> The Framework 16" laptop doesn't have a PS/2 keyboard. At bootup the
>>> following messages are emitted:
>>>
>>> i8042: PNP: No PS/2 controller found.
>>> i8042: PNP: Probing ports directly.
>>> i8042: Can't read CTR while initializing i8042
>>> i8042: probe of i8042 failed with error -5
>>>
>>> There are no PNP devices as those listed in `pnp_kbd_devids` but
>>> i8042_pnp_init() ignores this and still runs and will continue to
>>> try to probe.
>>>
>>> As there is no PS/2 keyboard or mouse in this laptop, set a quirk
>>> to avoid this behavior.
>>
>> I believe the proper fix for this is for the firmware not report i8042
>> as present by properly setting up FADT. Please take a look at
>> arch/x86/kernel/acpi/boot.c::acpi_parse_fadt() and how it sets flag
>> X86_LEGACY_I8042_FIRMWARE_ABSENT.
>
> This is along the lines of a point I brought up in the v1 of this patch.
>
> https://lore.kernel.org/linux-input/87v89bgl7a.fsf@nvidia.com/
>
> This means that Framework as a manufacturer will need to provide the
> appropriate fix for what's advertised over ACPI by the device. I think
> that makes sense instead of creating quirk combinations to avoid
> resolving the issue at the ACPI level. I guess the only de-merit is that
> means folks need to depend on vendors with no way to suppress this if a
> vendor does not correct set up FADT.
Got it, thanks guys. I'll raise this with them.
>
>>
>> It will still say "PNP: No PS/2 controller found" which is an
>> "informational" message, but should not try to probe ports directly and
>> report errors.
>
> --
> Thanks,
>
> Rahul Rameshbabu
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-12-08 18:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06 21:21 [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks Mario Limonciello
2023-12-06 21:21 ` [PATCH v2 2/2] Input: i8042: Add a quirk for Framework 16" laptop Mario Limonciello
2023-12-06 21:54 ` Rahul Rameshbabu
2023-12-08 17:57 ` Dmitry Torokhov
2023-12-08 18:08 ` Rahul Rameshbabu
2023-12-08 18:22 ` Mario Limonciello
2023-12-06 21:55 ` [PATCH v2 1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks Rahul Rameshbabu
2023-12-07 20:39 ` Mario Limonciello
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).