From: bugzilla-daemon@bugzilla.kernel.org
To: linux-usb@vger.kernel.org
Subject: [Bug 210425] Plugging in or unplugging power cord while system is suspended does not trigger updates
Date: Sun, 24 Oct 2021 12:09:59 +0000 [thread overview]
Message-ID: <bug-210425-208809-ikw1fHywIP@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-210425-208809@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=210425
Méven Car (meven29@gmail.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |meven29@gmail.com
--- Comment #5 from Méven Car (meven29@gmail.com) ---
It seems to me `ucsi_resume()` should take into account that connectors can be
plugged-in/out while the system is suspended.
Upon wake-up it should someway scan its connectors and notify userspace then.
Instead resume only hook the notification after the fact and does not check
current state.
> int ucsi_resume(struct ucsi *ucsi)
> {
> u64 command;
>
> /* Restore UCSI notification enable mask after system resume */
> command = UCSI_SET_NOTIFICATION_ENABLE | ucsi->ntfy;
>
> return ucsi_send_command(ucsi, command, NULL, 0);
> }
Consequently after suspending, unplugging AC and resuming
> cat /sys/class/power_supply/ucsi-source-psy-USBC000\:001/online
> 1
Regardless of the connector state (re-plugging is not signaled either).
We don't get any `udevadm monitor` notification from the usci subsystem.
AFAICT We should have a call to
"power_supply_changed(usci->connector[i]->psy);" somewhere for the usci
connector concerned resulting from `ucsi_resume` after the connector state has
been updated with `ucsi_handle_connector_change()` for instance. But I don't
know about the work_struct API.
Either this or a bug in `ucsi_handle_connector_change()` not taking into
account the unplugged-during-suspend usecase.
I would welcome any code hint to come up with a proper patch or a patch that I
would be happy to test.
My hardware is a DELL XPS 9370.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2021-10-24 12:10 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-210425-208809@https.bugzilla.kernel.org/>
2021-07-12 7:23 ` [Bug 210425] Plugging in or unplugging power cord while system is suspended does not trigger updates bugzilla-daemon
2021-10-24 12:09 ` bugzilla-daemon [this message]
2021-10-29 18:00 ` bugzilla-daemon
2021-10-29 19:27 ` bugzilla-daemon
2022-02-05 1:16 ` bugzilla-daemon
2022-02-06 5:25 ` bugzilla-daemon
2022-02-15 5:32 ` bugzilla-daemon
2022-04-01 14:10 ` bugzilla-daemon
2022-04-11 20:51 ` bugzilla-daemon
2022-05-16 10:02 ` bugzilla-daemon
2022-06-08 4:52 ` bugzilla-daemon
2022-06-11 10:16 ` bugzilla-daemon
2022-06-11 16:07 ` bugzilla-daemon
2022-06-17 23:56 ` bugzilla-daemon
2022-06-18 16:41 ` bugzilla-daemon
2022-06-29 19:50 ` bugzilla-daemon
2022-07-27 13:45 ` bugzilla-daemon
2022-08-17 21:34 ` bugzilla-daemon
2022-08-31 20:07 ` bugzilla-daemon
2022-09-02 11:10 ` bugzilla-daemon
2022-09-02 11:31 ` bugzilla-daemon
2022-09-03 6:24 ` bugzilla-daemon
2022-09-03 6:38 ` bugzilla-daemon
2022-09-05 8:02 ` bugzilla-daemon
2022-09-05 8:22 ` bugzilla-daemon
2022-09-05 14:33 ` bugzilla-daemon
2022-09-06 10:29 ` bugzilla-daemon
2022-09-07 11:26 ` bugzilla-daemon
2022-09-23 8:51 ` bugzilla-daemon
2022-09-27 11:33 ` bugzilla-daemon
2022-09-27 13:09 ` bugzilla-daemon
2022-09-27 13:18 ` bugzilla-daemon
2022-09-30 17:17 ` bugzilla-daemon
2022-09-30 17:32 ` bugzilla-daemon
2022-10-03 7:56 ` bugzilla-daemon
2022-10-26 8:04 ` bugzilla-daemon
2022-10-26 9:58 ` bugzilla-daemon
2022-10-26 10:13 ` bugzilla-daemon
2022-10-31 19:06 ` bugzilla-daemon
2022-11-17 7:31 ` bugzilla-daemon
2022-11-17 7:56 ` bugzilla-daemon
2022-11-17 8:04 ` bugzilla-daemon
2022-12-06 23:43 ` bugzilla-daemon
2023-01-16 9:52 ` bugzilla-daemon
2023-03-04 0:10 ` bugzilla-daemon
2023-03-06 1:56 ` bugzilla-daemon
2023-03-06 11:00 ` bugzilla-daemon
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=bug-210425-208809-ikw1fHywIP@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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