public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Lin Ming <ming.m.lin@intel.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	James Bottomley <JBottomley@parallels.com>,
	Tejun Heo <tj@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH 1/3] [SCSI] sd: fix runtime status check in sd_shutdown
Date: Thu, 15 Dec 2011 02:34:24 +0800	[thread overview]
Message-ID: <1323887664.7655.5.camel@hp6530s> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1112141146230.1707-100000@iolanthe.rowland.org>

On Thu, 2011-12-15 at 00:49 +0800, Alan Stern wrote:
> On Wed, 14 Dec 2011, Lin Ming wrote:
> 
> > Commit af8db15 disabled device's runtime PM during shutdown.
> > So sd's runtime status can't be checked with pm_runtime_suspended(dev)
> > any more.
> > 
> > Fix it by checking runtime status with pm_runtime_status_suspended(dev).
> > 
> > Signed-off-by: Lin Ming <ming.m.lin@intel.com>
> > ---
> >  drivers/scsi/sd.c |    7 ++++++-
> >  1 files changed, 6 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> > index 7b3f807..284b087 100644
> > --- a/drivers/scsi/sd.c
> > +++ b/drivers/scsi/sd.c
> > @@ -2742,7 +2742,12 @@ static void sd_shutdown(struct device *dev)
> >  	if (!sdkp)
> >  		return;         /* this can happen */
> >  
> > -	if (pm_runtime_suspended(dev))
> > +	/*
> > +	 * Check runtime status with pm_runtime_status_suspended(dev)
> > +	 * instead of pm_runtime_suspended(dev),
> > +	 * because device_shutdown() has disabled the device's runtime PM.
> > +	 */
> > +	if (pm_runtime_status_suspended(dev))
> >  		goto exit;
> >  
> >  	if (sdkp->WCE) {
> 
> This is no longer needed.  See commit
> fe6b91f47080eb17d21cbf2a39311877d57f6938 (PM / Driver core: leave
> runtime PM enabled during system shutdown).

I'll remove this patch.

Thanks.

> 
> Alan Stern
> 

  reply	other threads:[~2011-12-14 18:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14  3:17 [PATCH 0/3] fixes for ata port runtime pm support Lin Ming
2011-12-14  3:17 ` [PATCH 1/3] [SCSI] sd: fix runtime status check in sd_shutdown Lin Ming
2011-12-14 10:58   ` Sergei Shtylyov
2011-12-14 13:24     ` Lin Ming
2011-12-14 16:49   ` Alan Stern
2011-12-14 18:34     ` Lin Ming [this message]
2011-12-14  3:18 ` [PATCH 2/3] [SCSI]: runtime resume parent for child's system-resume Lin Ming
2011-12-14  3:20   ` Lin Ming
2011-12-14 16:51     ` Alan Stern
2011-12-14 18:31       ` Lin Ming
2011-12-14  3:18 ` [PATCH 3/3] ata: update ata port's runtime status during system resume Lin Ming
2011-12-14 18:45   ` Lin Ming

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=1323887664.7655.5.camel@hp6530s \
    --to=ming.m.lin@intel.com \
    --cc=JBottomley@parallels.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tj@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