public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: <dmitry.torokhov@gmail.com>, <linux-input@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Input: i8042: Quiet down probe failure messages
Date: Wed, 06 Dec 2023 10:46:27 -0800	[thread overview]
Message-ID: <87zfyngoe4.fsf@nvidia.com> (raw)
In-Reply-To: <20231206175818.2568-1-mario.limonciello@amd.com> (Mario Limonciello's message of "Wed, 6 Dec 2023 11:58:18 -0600")

On Wed, 06 Dec, 2023 11:58:18 -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
>
> The last two messages are ERR and WARN respectively.  These messages
> might be useful for one boot while diagnosing a problem for someone
> but as there is no PS/2 controller in PNP or on the machine they're
> needlessly noisy to emit every boot.
>
> Downgrade the CTR message to debug and change the error code for the
> failure so that the base device code doesn't emit a warning.
>
> If someone has problems with i8042 and they need this information,
> they can turn on dynamic debugging to get these messages.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---

For the Framework 16, I think the following should be done.

Use SERIO_QUIRK_NOPNP for the device to avoid the PS/2 controller
probing. You can find examples in drivers/input/serio/i8042-acpipnpio.h
under the i8042_dmi_quirk_table. This will prevent emitting the first
two messages in the shared snippet.


>  drivers/input/serio/i8042.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
> index 9fbb8d31575a..95dd585fdc1a 100644
> --- a/drivers/input/serio/i8042.c
> +++ b/drivers/input/serio/i8042.c
> @@ -1008,8 +1008,8 @@ static int i8042_controller_init(void)
>  			udelay(50);
>  
>  		if (i8042_command(&ctr[n++ % 2], I8042_CMD_CTL_RCTR)) {
> -			pr_err("Can't read CTR while initializing i8042\n");
> -			return i8042_probe_defer ? -EPROBE_DEFER : -EIO;
> +			pr_debug("Can't read CTR while initializing\n");

I also think this error message should be pr_err in the situation that
the SERIO_QUIRK_PROBE_DEFER quirk is not used. I think what you are
likely looking for is avoiding emitting this message when the
SERIO_QUIRK_PROBE_DEFER quirk is used for noise reduction purposes.

> +			return i8042_probe_defer ? -EPROBE_DEFER : -ENXIO;

I do not think this change makes sense to me personally. It is indeed an
I/O issue with the i8042 controller on the Framework motherboard, so the
error should be -EIO when i8042_probe_defer is not set.

>  		}
>  
>  	} while (n < 2 || ctr[0] != ctr[1]);

--
Thanks,

Rahul Rameshbabu

  reply	other threads:[~2023-12-06 18:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06 17:58 [PATCH] Input: i8042: Quiet down probe failure messages Mario Limonciello
2023-12-06 18:46 ` Rahul Rameshbabu [this message]
2023-12-06 19:22   ` Mario Limonciello
2023-12-06 19:55     ` Rahul Rameshbabu
2023-12-06 20:06       ` Mario Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zfyngoe4.fsf@nvidia.com \
    --to=rrameshbabu@nvidia.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox