aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libiscsi.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 07ec997c5d4f..b7689f3d05f5 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1739,10 +1739,19 @@ EXPORT_SYMBOL_GPL(iscsi_queuecommand);
1739 1739
1740int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, int reason) 1740int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, int reason)
1741{ 1741{
1742 if (reason != SCSI_QDEPTH_DEFAULT) 1742 switch (reason) {
1743 case SCSI_QDEPTH_DEFAULT:
1744 scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth);
1745 break;
1746 case SCSI_QDEPTH_QFULL:
1747 scsi_track_queue_full(sdev, depth);
1748 break;
1749 case SCSI_QDEPTH_RAMP_UP:
1750 scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth);
1751 break;
1752 default:
1743 return -EOPNOTSUPP; 1753 return -EOPNOTSUPP;
1744 1754 }
1745 scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth);
1746 return sdev->queue_depth; 1755 return sdev->queue_depth;
1747} 1756}
1748EXPORT_SYMBOL_GPL(iscsi_change_queue_depth); 1757EXPORT_SYMBOL_GPL(iscsi_change_queue_depth);