linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derek Basehore <dbasehore@chromium.org>
To: linux-pm@vger.kernel.org
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org,
	Derek Basehore <dbasehore@chromium.org>
Subject: [PATCH v2 3/3] scsi: allow scsi devices to use direct complete
Date: Wed, 24 Feb 2016 16:22:28 -0800	[thread overview]
Message-ID: <1456359748-22838-3-git-send-email-dbasehore@chromium.org> (raw)
In-Reply-To: <1456359748-22838-1-git-send-email-dbasehore@chromium.org>

This allows scsi devices to remain runtime suspended for system
suspend. Since runtime suspend is stricter than system suspend
callbacks, this is just returning a positive number for the prepare
callback.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
---
 drivers/scsi/scsi_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index b44c1bb..7af76ad 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -178,7 +178,7 @@ static int scsi_bus_prepare(struct device *dev)
 		/* Wait until async scanning is finished */
 		scsi_complete_async_scans();
 	}
-	return 0;
+	return 1;
 }
 
 static int scsi_bus_suspend(struct device *dev)
-- 
2.7.0.rc3.207.g0ac5344

  parent reply	other threads:[~2016-02-25  0:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25  0:22 [PATCH v2 1/3] PM / sleep: Check legacy pm callbacks for direct complete Derek Basehore
2016-02-25  0:22 ` [PATCH v2 2/3] PM / sleep: try to runtime suspend " Derek Basehore
2016-02-28  1:31   ` Rafael J. Wysocki
2016-03-01 21:48     ` dbasehore .
2016-02-25  0:22 ` Derek Basehore [this message]
2016-02-27  7:26   ` [PATCH v2 3/3] scsi: allow scsi devices to use " Mika Westerberg
2016-02-27  8:10     ` dbasehore .
2016-02-27  8:38       ` Mika Westerberg
2016-02-27  9:07         ` dbasehore .
2016-02-29 10:10           ` Mika Westerberg

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=1456359748-22838-3-git-send-email-dbasehore@chromium.org \
    --to=dbasehore@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    /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;
as well as URLs for NNTP newsgroup(s).