From: Bart Van Assche <bvanassche@acm.org>
To: Kiwoong Kim <kwmad.kim@samsung.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, beanhuo@micron.com,
adrian.hunter@intel.com, sc.suh@samsung.com,
hy50.seo@samsung.com, sh425.lee@samsung.com,
kwangwon.min@samsung.com, junwoo80.lee@samsung.com
Subject: Re: [PATCH v3] ufs: poll pmc until another pa request is completed
Date: Fri, 19 May 2023 15:20:39 -0700 [thread overview]
Message-ID: <d6f2d05f-5dc2-3239-e4e6-299397a61ca0@acm.org> (raw)
In-Reply-To: <1684209152-115304-1-git-send-email-kwmad.kim@samsung.com>
On 5/15/23 20:52, Kiwoong Kim wrote:
> + spin_lock_irqsave(hba->host->host_lock, flags);
> + hba->active_uic_cmd = NULL;
> + if (ufshcd_is_link_broken(hba)) {
> + spin_unlock_irqrestore(hba->host->host_lock, flags);
> + ret = -ENOLINK;
> + goto out;
> + }
> + hba->uic_async_done = cnf;
> + cmd->argument2 = 0;
> + cmd->argument3 = mode;
> + ret = __ufshcd_send_uic_cmd(hba, cmd, true);
> + spin_unlock_irqrestore(hba->host->host_lock, flags);
Please consider adding lockdep_assert_held(&hba->uic_cmd_mutex) near
the start of __ufshcd_poll_uic_pwr() to document that this function is
serialized against other contexts that submit an UIC.
Additionally, I don't think that it is necessary to hold the host lock
around the ufshcd_is_link_broken() or __ufshcd_send_uic_cmd() calls.
Thanks,
Bart.
next prev parent reply other threads:[~2023-05-19 22:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230516040117epcas2p4477bbc8aedf05a8c3bc0bd755eeadba0@epcas2p4.samsung.com>
2023-05-16 3:52 ` [PATCH v3] ufs: poll pmc until another pa request is completed Kiwoong Kim
2023-05-19 22:20 ` Bart Van Assche [this message]
2023-05-22 1:58 ` Kiwoong Kim
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=d6f2d05f-5dc2-3239-e4e6-299397a61ca0@acm.org \
--to=bvanassche@acm.org \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=hy50.seo@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=junwoo80.lee@samsung.com \
--cc=kwangwon.min@samsung.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sc.suh@samsung.com \
--cc=sh425.lee@samsung.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