]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/scsi_debug.c
scsi: provide a generic change_queue_type method
[karo-tx-linux.git] / drivers / scsi / scsi_debug.c
index 238e06f13b8a1c977146699d95f1783bbef571e7..7bcace2cdd53af18d8eaf92777cac1fa097696d9 100644 (file)
@@ -4532,14 +4532,7 @@ sdebug_change_qdepth(struct scsi_device *sdev, int qdepth, int reason)
 static int
 sdebug_change_qtype(struct scsi_device *sdev, int qtype)
 {
-       if (sdev->tagged_supported) {
-               scsi_set_tag_type(sdev, qtype);
-               if (qtype)
-                       scsi_activate_tcq(sdev, sdev->queue_depth);
-               else
-                       scsi_deactivate_tcq(sdev, sdev->queue_depth);
-       } else
-               qtype = 0;
+       qtype = scsi_change_queue_type(sdev, qtype);
        if (SCSI_DEBUG_OPT_Q_NOISE & scsi_debug_opts) {
                const char *cp;