From: Praveen Talari <praveen.talari@oss.qualcomm.com>
To: Mark Brown <broonie@kernel.org>
Cc: bjorn.andersson@oss.qualcomm.com,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>,
aniket.randive@oss.qualcomm.com,
chandana.chiluveru@oss.qualcomm.com
Subject: Re: [PATCH] spi: core: Abort active target transfer on controller suspend
Date: Thu, 25 Jun 2026 20:29:05 +0530 [thread overview]
Message-ID: <4ceb69dd-4c4f-46b4-93d2-4e4c7bf0146b@oss.qualcomm.com> (raw)
In-Reply-To: <730c2055-b29f-419d-99f2-bc4df3b6a2f7@sirena.org.uk>
Hi Mark
On 25-06-2026 18:57, Mark Brown wrote:
> On Thu, Jun 25, 2026 at 11:09:35AM +0530, Praveen Talari wrote:
>> When an SPI controller operating in target mode has a transfer in
>> progress at the time of system suspend, the suspend path proceeds
>> without aborting the ongoing transfer. This can leave the hardware in
>> an inconsistent state, potentially causing the system to hang or fail
>> to resume cleanly.
>>
>> Fix this by invoking the controller's target_abort callback from
>> spi_controller_suspend() when the controller is in target mode and the
>> callback is registered. This ensures any active target transfer is
>> cleanly terminated before the controller is suspended.
>>
>> + if (spi_controller_is_target(ctlr) && ctlr->target_abort)
>> + ctlr->target_abort(ctlr);
>> +
> We need to check for an active message here, drivers are going to
> assume there's an in progress operation to cancel - for example the
> pxa2xx driver unconditionally sets cur_msg->status during abort which is
> going to go badly without a cur_msg.
Yes, i got it. Our spi driver had that check in target_abort.
is it fine?
if (ctrl->cur_msg && spi_controller_is_target(ctlr) && ctlr->target_abort)
Thanks,
Praveen Talari
next prev parent reply other threads:[~2026-06-25 14:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 5:39 Praveen Talari
2026-06-25 13:27 ` Mark Brown
2026-06-25 14:59 ` Praveen Talari [this message]
2026-06-25 15:08 ` Mark Brown
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=4ceb69dd-4c4f-46b4-93d2-4e4c7bf0146b@oss.qualcomm.com \
--to=praveen.talari@oss.qualcomm.com \
--cc=aniket.randive@oss.qualcomm.com \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=broonie@kernel.org \
--cc=chandana.chiluveru@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mukesh.savaliya@oss.qualcomm.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
all inboxes | Powered by JetHome®