Home Home > GIT Browse > SLE12-SP3
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2019-01-11 15:12:56 +0100
committerHannes Reinecke <hare@suse.de>2019-01-11 15:13:42 +0100
commit7b195cb287b54b4cb3e1bcfea19f9487b8168b70 (patch)
tree50a55d2ca26823fc5be742af67c94641b29746ae
parentc7f3fff5fb449d0c130b4588d62ee7d003465c38 (diff)
scsi: Introduce scsi_start_queue() (bsc#1119877).
-rw-r--r--patches.fixes/scsi-Introduce-scsi_start_queue.patch86
-rw-r--r--series.conf1
2 files changed, 87 insertions, 0 deletions
diff --git a/patches.fixes/scsi-Introduce-scsi_start_queue.patch b/patches.fixes/scsi-Introduce-scsi_start_queue.patch
new file mode 100644
index 0000000000..fa185e38d3
--- /dev/null
+++ b/patches.fixes/scsi-Introduce-scsi_start_queue.patch
@@ -0,0 +1,86 @@
+From: Bart Van Assche <bart.vanassche@sandisk.com>
+Date: Fri, 2 Jun 2017 14:21:56 -0700
+Subject: [PATCH] scsi: Introduce scsi_start_queue()
+Git-commit: 66483a4a9f34427e3d6ec87d8e583f5d2a7cbb76
+References: bsc#1119877
+Patch-Mainline: v4.13-rc1
+
+This patch does not change any functionality.
+
+Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
+Reviewed-by: Hannes Reinecke <hare@suse.de>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Cc: Israel Rukshin <israelr@mellanox.com>
+Cc: Max Gurtovoy <maxg@mellanox.com>
+Cc: Benjamin Block <bblock@linux.vnet.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+---
+ drivers/scsi/scsi_lib.c | 25 +++++++++++++++----------
+ drivers/scsi/scsi_priv.h | 1 +
+ 2 files changed, 16 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
+index 4b0bac3ac6ab..ed744668b984 100644
+--- a/drivers/scsi/scsi_lib.c
++++ b/drivers/scsi/scsi_lib.c
+@@ -3031,6 +3031,20 @@ static int scsi_internal_device_block(struct scsi_device *sdev)
+ return err;
+ }
+
++void scsi_start_queue(struct scsi_device *sdev)
++{
++ struct request_queue *q = sdev->request_queue;
++ unsigned long flags;
++
++ if (q->mq_ops) {
++ blk_mq_start_stopped_hw_queues(q, false);
++ } else {
++ spin_lock_irqsave(q->queue_lock, flags);
++ blk_start_queue(q);
++ spin_unlock_irqrestore(q->queue_lock, flags);
++ }
++}
++
+ /**
+ * scsi_internal_device_unblock_nowait - resume a device after a block request
+ * @sdev: device to resume
+@@ -3049,9 +3063,6 @@ static int scsi_internal_device_block(struct scsi_device *sdev)
+ int scsi_internal_device_unblock_nowait(struct scsi_device *sdev,
+ enum scsi_device_state new_state)
+ {
+- struct request_queue *q = sdev->request_queue;
+- unsigned long flags;
+-
+ /*
+ * Try to transition the scsi device to SDEV_RUNNING or one of the
+ * offlined states and goose the device queue if successful.
+@@ -3069,13 +3080,7 @@ int scsi_internal_device_unblock_nowait(struct scsi_device *sdev,
+ sdev->sdev_state != SDEV_OFFLINE)
+ return -EINVAL;
+
+- if (q->mq_ops) {
+- blk_mq_start_stopped_hw_queues(q, false);
+- } else {
+- spin_lock_irqsave(q->queue_lock, flags);
+- blk_start_queue(q);
+- spin_unlock_irqrestore(q->queue_lock, flags);
+- }
++ scsi_start_queue(sdev);
+
+ return 0;
+ }
+diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
+index 59ebc1795bb3..f86057842f9a 100644
+--- a/drivers/scsi/scsi_priv.h
++++ b/drivers/scsi/scsi_priv.h
+@@ -88,6 +88,7 @@ extern void scsi_run_host_queues(struct Scsi_Host *shost);
+ extern void scsi_requeue_run_queue(struct work_struct *work);
+ extern struct request_queue *scsi_alloc_queue(struct scsi_device *sdev);
+ extern struct request_queue *scsi_mq_alloc_queue(struct scsi_device *sdev);
++extern void scsi_start_queue(struct scsi_device *sdev);
+ extern int scsi_mq_setup_tags(struct Scsi_Host *shost);
+ extern void scsi_mq_destroy_tags(struct Scsi_Host *shost);
+ extern int scsi_init_queue(void);
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 2ba833904d..470a1f3da0 100644
--- a/series.conf
+++ b/series.conf
@@ -21169,6 +21169,7 @@
patches.fixes/scsi-Split-scsi_internal_device_block.patch
patches.fixes/scsi-Create-two-versions-of-scsi_internal_device_unb.patch
patches.fixes/scsi-Protect-SCSI-device-state-changes-with-a-mutex.patch
+ patches.fixes/scsi-Introduce-scsi_start_queue.patch
patches.drivers/scsi-qla2xxx-remove-redundant-null-check-on-tgt.patch
patches.drivers/scsi-qla2xxx-Fix-compile-warning.patch
patches.drivers/0019-scsi-qedf-Fix-a-return-value-in-case-of-error-in-qed.patch