From: Bart Van Assche <bvanassche@acm.org>
To: Can Guo <cang@codeaurora.org>,
asutoshd@codeaurora.org, nguyenb@codeaurora.org,
hongwus@codeaurora.org, ziqichen@codeaurora.org,
rnayak@codeaurora.org, linux-scsi@vger.kernel.org,
kernel-team@android.com, saravanak@google.com,
salyzyn@google.com
Cc: Stanley Chu <stanley.chu@mediatek.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
open list <linux-kernel@vger.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@lists.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH RFC v1 1/1] scsi: pm: Leave runtime resume along if block layer PM is enabled
Date: Sat, 14 Nov 2020 12:57:21 -0800 [thread overview]
Message-ID: <97dea590-5f2e-b4e3-ac64-7c346761c523@acm.org> (raw)
In-Reply-To: <1605249009-13752-2-git-send-email-cang@codeaurora.org>
On 11/12/20 10:30 PM, Can Guo wrote:
> If block layer runtime PM is enabled for one SCSI device, then there is
> no need to forcibly change the SCSI device and its request queue's runtime
> PM status to active in scsi_dev_type_resume(), since block layer PM shall
> resume the SCSI device on the demand of bios.
Please change "along" into "alone" in the subject of this patch (if that
is what you meant).
> + if (scsi_is_sdev_device(dev)) {
> + struct scsi_device *sdev;
>
> + sdev = to_scsi_device(dev);
A minor comment: I think that "struct scsi_device *sdev =
to_scsi_device(dev);" fits on a single line.
> + * If block layer runtime PM is enabled for the SCSI device,
> + * let block layer PM handle its runtime PM routines.
Please change "its runtime PM routines" into "runtime resume" or
similar. I think that will make the comment more clear.
> + if (sdev->request_queue->dev)
> + return err;
> + }
The 'dev' member only exists in struct request_queue if CONFIG_PM=y so
the above won't compile if CONFIG_PM=n. How about adding a function in
include/linux/blk-pm.h to check whether or not runtime PM has been enabled?
Otherwise this patch looks good to me.
Thanks,
Bart.
next prev parent reply other threads:[~2020-11-14 20:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1605249009-13752-1-git-send-email-cang@codeaurora.org>
2020-11-13 6:30 ` Can Guo
2020-11-14 20:57 ` Bart Van Assche [this message]
2020-11-16 1:19 ` Can Guo
2020-11-16 1:42 ` Can Guo
2020-11-18 4:38 ` Bart Van Assche
2020-11-18 8:49 ` Can Guo
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=97dea590-5f2e-b4e3-ac64-7c346761c523@acm.org \
--to=bvanassche@acm.org \
--cc=asutoshd@codeaurora.org \
--cc=cang@codeaurora.org \
--cc=hongwus@codeaurora.org \
--cc=jejb@linux.ibm.com \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=nguyenb@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=salyzyn@google.com \
--cc=saravanak@google.com \
--cc=stanley.chu@mediatek.com \
--cc=ziqichen@codeaurora.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
all inboxes | Powered by JetHome®