aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_debug.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-10-02 08:39:55 -0400
committerChristoph Hellwig <hch@lst.de>2014-11-12 05:19:39 -0500
commita62182f338b39a22035531c6afc0a8d2928b1df2 (patch)
tree57ca6cea82a09d2655daf5c161024c5015373646 /drivers/scsi/scsi_debug.c
parent1d5203284d8acbdfdf9b478d434450b34f338f28 (diff)
scsi: provide a generic change_queue_type method
Most drivers use exactly the same implementation, so provide it as a library function. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r--drivers/scsi/scsi_debug.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 238e06f13b8a..7bcace2cdd53 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -4532,14 +4532,7 @@ sdebug_change_qdepth(struct scsi_device *sdev, int qdepth, int reason)
4532static int 4532static int
4533sdebug_change_qtype(struct scsi_device *sdev, int qtype) 4533sdebug_change_qtype(struct scsi_device *sdev, int qtype)
4534{ 4534{
4535 if (sdev->tagged_supported) { 4535 qtype = scsi_change_queue_type(sdev, qtype);
4536 scsi_set_tag_type(sdev, qtype);
4537 if (qtype)
4538 scsi_activate_tcq(sdev, sdev->queue_depth);
4539 else
4540 scsi_deactivate_tcq(sdev, sdev->queue_depth);
4541 } else
4542 qtype = 0;
4543 if (SCSI_DEBUG_OPT_Q_NOISE & scsi_debug_opts) { 4536 if (SCSI_DEBUG_OPT_Q_NOISE & scsi_debug_opts) {
4544 const char *cp; 4537 const char *cp;
4545 4538