From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: luyuantao01 <luyuantao01@163.com>
Cc: linux-input@vger.kernel.org, luyuantao <luyuantao@kylinos.cn>
Subject: Re: [PATCH v2] Input: i8042 - Fix keyboard failure caused by S3 mouse wakeup
Date: Thu, 14 Nov 2024 18:00:35 -0800 [thread overview]
Message-ID: <ZzarQ8uhbqU0Vk1q@google.com> (raw)
In-Reply-To: <20241114021310.9-1-luyuantao01@163.com>
Hi luyuantao,
On Thu, Nov 14, 2024 at 10:13:10AM +0800, luyuantao01 wrote:
> From: luyuantao <luyuantao@kylinos.cn>
>
> Hi Dmitry
> I'm sorry for the inconvenience caused to you. After reproducing the
> problem and conducting a thorough analysis, I found that the previous
> patch description was incorrect. Therefore, resubmit the patch
>
> There is an i8402 keyboard and mouse device on the
> ThinkPad P15 laptop.When conducting a wakeup
> test on S3, it was found that:
>
> 1. Using the keyboard directly can wake up S3.
> 2. The system failed to wake up using the mouse button first,
> and when using the keyboard to wake up again, the system
> cannot be woken up and can only be shut down by pressing
> the power button.
>
> This issue is that i8042_start() only enables wakeup for the
> keyboard. During the i8042_pm_suspend() phase, the aux device
> will not enable irq wakeup. However, when suspend_device_irqs()
> traversing irq without wakeup capability, __disable_irq() did
> not truly disable aux interrupts, only setting the IRQS_SUSPEND
> flag, resulting in aux interrupts still being generated.
>
> When an interrupt is triggered, irqd_irq_isabled returns the
> true execution mask irq. The mask_iopic_irq callback function
> of the IR-IO-APIC chip will disable all IRQ pins, resulting
> in keyboard interrupts being disabled and no longer responding
So this sounds like a bug in the irqchip implementation that is does not
properly handle interrupts that are wakeup capable but not enabled for
the interrupt because of policy.
The i8042 driver correctly marks both KBD and AUX interrupts as capable
of waking up the system but only enables KBD as a wakeup source for
suspend-to-idle case. If a different policy is desired on a system it
can be adjusted form userspace vis sysfs.
Thanks.
--
Dmitry
prev parent reply other threads:[~2024-11-15 2:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-09 9:48 [PATCH] Input: i8042 - Fix keyboard failure caused by S4 mouse wakeup luyuantao01
2024-11-14 2:13 ` [PATCH v2] Input: i8042 - Fix keyboard failure caused by S3 " luyuantao01
2024-11-15 2:00 ` Dmitry Torokhov [this message]
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=ZzarQ8uhbqU0Vk1q@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=luyuantao01@163.com \
--cc=luyuantao@kylinos.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.