]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/libiscsi.c
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / drivers / scsi / libiscsi.c
index 07ec997c5d4ff97d22f9c2ae92b28017f7190fc9..b7689f3d05f529d113a243afd74df6a477438d40 100644 (file)
@@ -1739,10 +1739,19 @@ EXPORT_SYMBOL_GPL(iscsi_queuecommand);
 
 int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, int reason)
 {
-       if (reason != SCSI_QDEPTH_DEFAULT)
+       switch (reason) {
+       case SCSI_QDEPTH_DEFAULT:
+               scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth);
+               break;
+       case SCSI_QDEPTH_QFULL:
+               scsi_track_queue_full(sdev, depth);
+               break;
+       case SCSI_QDEPTH_RAMP_UP:
+               scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth);
+               break;
+       default:
                return -EOPNOTSUPP;
-
-       scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth);
+       }
        return sdev->queue_depth;
 }
 EXPORT_SYMBOL_GPL(iscsi_change_queue_depth);