Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f41d6e26 authored by Blagovest Kolenichev's avatar Blagovest Kolenichev
Browse files

Revert "scsi: core: Synchronize request queue PM status only on successful resume"



This reverts commit caae28b3.

This is a preparation change for merging android-4.14-p.95 into
msm-4.14 branch. Tech team discarded this change as it conflicts
with the downstream solution:

3d758ed5 scsi: squash of multiple fixes for msm-4.4 kernel

Change-Id: I909e4d6f81331cfb23fff3d7068628965559d283
Signed-off-by: default avatarBlagovest Kolenichev <bkolenichev@codeaurora.org>
parent ce2fcb98
Loading
Loading
Loading
Loading
+11 −15
Original line number Diff line number Diff line
@@ -79,22 +79,8 @@ static int scsi_dev_type_resume(struct device *dev,

	if (err == 0) {
		pm_runtime_disable(dev);
		err = pm_runtime_set_active(dev);
		pm_runtime_set_active(dev);
		pm_runtime_enable(dev);

		/*
		 * Forcibly set runtime PM status of request queue to "active"
		 * to make sure we can again get requests from the queue
		 * (see also blk_pm_peek_request()).
		 *
		 * The resume hook will correct runtime PM status of the disk.
		 */
		if (!err && scsi_is_sdev_device(dev)) {
			struct scsi_device *sdev = to_scsi_device(dev);

			if (sdev->request_queue->dev)
				blk_set_runtime_active(sdev->request_queue);
		}
	}

	return err;
@@ -153,6 +139,16 @@ static int scsi_bus_resume_common(struct device *dev,
	else
		fn = NULL;

	/*
	 * Forcibly set runtime PM status of request queue to "active" to
	 * make sure we can again get requests from the queue (see also
	 * blk_pm_peek_request()).
	 *
	 * The resume hook will correct runtime PM status of the disk.
	 */
	if (scsi_is_sdev_device(dev) && pm_runtime_suspended(dev))
		blk_set_runtime_active(to_scsi_device(dev)->request_queue);

	if (fn) {
		async_schedule_domain(fn, dev, &scsi_sd_pm_domain);