From: Baochen Qiang <quic_bqiang@quicinc.com>
To: <rafael@kernel.org>, <pavel@ucw.cz>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
"Kalle Valo (QUIC)" <quic_kvalo@quicinc.com>,
Jeff Johnson <quic_jjohnson@quicinc.com>,
<linux-pm@vger.kernel.org>,
"kernel@quicinc.com" <kernel@quicinc.com>,
<linux-wireless@vger.kernel.org>, <ath11k@lists.infradead.org>
Subject: ath11k resume fails due to kernel blocks probing MHI virtual devices
Date: Mon, 29 Jan 2024 18:10:32 +0800 [thread overview]
Message-ID: <21cd2098-97e1-4947-a5bb-a97582902ead@quicinc.com> (raw)
Hi Rafael and Pavel,
Currently I am facing an ath11k (a kernel WLAN driver) resume issue
related with kernel PM framework and MHI module.
Before introducing the issue details, I'd like to summarize how ath11k
interacts with MHI stack to download WLAN firmware to hardware target:
1. when booting/restarting, ath11k powers on MHI module and waits for
MHI channels to be ready.
2. When power on, MHI stack creates some virtual MHI devices, which
represents MHI hardware channels, and adds them to MHI bus. This
triggers MHI client driver, named QRTR, to get matched and probe those
MHI devices. In probe, QRTR initializes MHI channels and finally move
them to ready state.
3. Once MHI channels ready, ath11k downloads WLAN firmware to hardware
target, then WLAN is working.
Such an flow works well in general, but introduces issues in hibernation
cycle: when preparing for hibernation, ath11k powers down MHI, this
results in MHI devices being destroyed thus QRTR resets MHI channels.
When resuming back from hibernation, ath11k powers on MHI and waits for
MHI channels to be ready in its resume callback. As said above, MHI
creates and adds MHI devices to MHI bus, but they can't be probed at
that time because device probe is prohibited in device_block_probing(),
finally this results in ath11k resume timeout.
Now there is an potential fix to this issue which would needs changes in
MHI stack, i.e., don't destroy MHI devices while hibernating. And we
have had a plenty talk with MHI community regarding this change, see [1]
and [2].
However Mani (the MHI maintainer) doesn't think it's right to fix it in
MHI stack. Instead, he thought we might need to add a new PM callback
which will be called after device probe is unblocked. By registering
such a callback ath11k can wait the dependency driver, i.e., QRTR, to
probe and initialize those MHI devices.
Your thoughts?
[1] https://lists.infradead.org/pipermail/ath11k/2023-December/005098.html
[2] https://lists.infradead.org/pipermail/ath11k/2024-January/005205.html
next reply other threads:[~2024-01-29 10:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 10:10 Baochen Qiang [this message]
2024-01-29 12:22 ` ath11k resume fails due to kernel blocks probing MHI virtual devices Rafael J. Wysocki
2024-01-29 12:31 ` Manivannan Sadhasivam
2024-01-29 12:37 ` Rafael J. Wysocki
2024-01-29 12:47 ` Manivannan Sadhasivam
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=21cd2098-97e1-4947-a5bb-a97582902ead@quicinc.com \
--to=quic_bqiang@quicinc.com \
--cc=ath11k@lists.infradead.org \
--cc=kernel@quicinc.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mani@kernel.org \
--cc=pavel@ucw.cz \
--cc=quic_jjohnson@quicinc.com \
--cc=quic_kvalo@quicinc.com \
--cc=rafael@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).