]> 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 2b6d447ad6d641723169cb45af42efdab5cb16be..7bcace2cdd53af18d8eaf92777cac1fa097696d9 100644 (file)
@@ -3371,7 +3371,7 @@ static ssize_t opts_store(struct device_driver *ddp, const char *buf,
        char work[20];
 
         if (1 == sscanf(buf, "%10s", work)) {
-               if (0 == strnicmp(work,"0x", 2)) {
+               if (0 == strncasecmp(work,"0x", 2)) {
                        if (1 == sscanf(&work[2], "%x", &opts))
                                goto opts_done;
                } else {
@@ -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;