From: Bart Van Assche <bvanassche@acm.org>
To: Can Guo <cang@codeaurora.org>
Cc: "Bean Huo (beanhuo)" <beanhuo@micron.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
Avri Altman <avri.altman@wdc.com>,
Asutosh Das <asutoshd@codeaurora.org>,
stummala@codeaurora.org, Vignesh Raghavendra <vigneshr@ti.com>,
linux-scsi@vger.kernel.org,
Stanley Chu <stanley.chu@mediatek.com>,
Tomas Winkler <tomas.winkler@intel.com>
Subject: Re: [EXT] Re: [PATCH v5 4/4] ufs: Simplify the clock scaling mechanism implementation
Date: Mon, 18 Nov 2019 10:13:38 -0800 [thread overview]
Message-ID: <5659ab82-a087-4cfb-088e-e25d7f5515a3@acm.org> (raw)
In-Reply-To: <e0ab904e1413ae6a89cebbced22a6cf8@codeaurora.org>
On 11/14/19 10:01 PM, Can Guo wrote:
> On 2019-11-15 00:11, Bart Van Assche wrote:
>> On 11/13/19 8:03 AM, Bean Huo (beanhuo) wrote:
>>> I think, you are asking for comment from Can. As for me, attached
>>> patch is better.
>>> Removing ufshcd_wait_for_doorbell_clr(), instead of reading doorbell
>>> register, Now
>>> using block layer blk_mq_{un,}freeze_queue(), looks good. I tested
>>> your V5 patches,
>>> didn't find problem yet.
>>>
>>> Since my available platform doesn't support dynamic clk scaling, I
>>> think, now seems only
>>> Qcom UFS controllers support this feature. So we need Can Guo to
>>> finally confirm it.
>>
>> Do you agree with this patch series if patch 4 is replaced by the
>> patch attached to my previous e-mail? The entire (revised) series is
>> available at https://github.com/bvanassche/linux/tree/ufs-for-next.
>
> After ufshcd_clock_scaling_prepare() returns(no error), all request
> queues are frozen. If failure
> happens(say power mode change command fails) after this point and error
> handler kicks off,
> we need to send dev commands(in ufshcd_probe_hba()) to bring UFS back to
> functionality.
> However, as the hba->cmd_queue is frozen, dev commands cannot be sent,
> the error handler shall fail.
Hi Can,
My understanding of the current UFS driver code is that
ufshcd_clock_scaling_prepare() waits for ongoing commands to finish but
not for SCSI error handling to finish. Would you agree with changing
that behavior such that ufshcd_clock_scaling_prepare() returns an error
code if SCSI error handling is in progress? Do you agree that once that
change has been made that it is fine to invoke blk_freeze_queue_start()
for all three types of block layer request queues (SCSI commands, device
management commands and TMFs)? Do you agree that this would fix the
issue that it is possible today to submit TMFs from user space using
through the BSG queue while clock scaling is in progress?
Thanks,
Bart.
next prev parent reply other threads:[~2019-11-18 18:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 17:37 [PATCH v5 0/4] Simplify and optimize the UFS driver Bart Van Assche
2019-11-12 17:37 ` [PATCH v5 1/4] ufs: Serialize error handling and command submission Bart Van Assche
2019-11-12 17:37 ` [PATCH v5 2/4] ufs: Avoid busy-waiting by eliminating tag conflicts Bart Van Assche
2019-11-12 17:37 ` [PATCH v5 3/4] ufs: Use blk_{get,put}_request() to allocate and free TMFs Bart Van Assche
2019-11-12 17:37 ` [PATCH v5 4/4] ufs: Simplify the clock scaling mechanism implementation Bart Van Assche
2019-11-13 0:11 ` cang
2019-11-13 0:55 ` Bart Van Assche
2019-11-13 16:03 ` [EXT] " Bean Huo (beanhuo)
2019-11-14 16:11 ` Bart Van Assche
2019-11-15 6:01 ` Can Guo
2019-11-15 16:23 ` Bart Van Assche
2019-11-18 3:49 ` cang
[not found] ` <0101016e7ca0e791-30050d63-c260-4cc3-a12b-658b7aa70031-000000@us-west-2.amazonses.com>
2019-11-18 17:49 ` Bart Van Assche
2019-11-18 18:13 ` Bart Van Assche [this message]
2019-11-19 5:33 ` cang
[not found] ` <0101016e822696b5-d1c358be-a0a2-4ef6-b04d-627c1fb361f8-000000@us-west-2.amazonses.com>
2019-11-19 23:16 ` Bart Van Assche
2019-11-20 3:38 ` cang
[not found] ` <0101016e86e3a961-1840fd1c-d71b-434a-8392-f62d7ece8b0f-000000@us-west-2.amazonses.com>
2019-11-20 17:58 ` Bart Van Assche
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=5659ab82-a087-4cfb-088e-e25d7f5515a3@acm.org \
--to=bvanassche@acm.org \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=cang@codeaurora.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.com \
--cc=stummala@codeaurora.org \
--cc=tomas.winkler@intel.com \
--cc=vigneshr@ti.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