diff options
Diffstat (limited to 'drivers/scsi/libiscsi.c')
| -rw-r--r-- | drivers/scsi/libiscsi.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 701457cca08a..a5168a673503 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
| @@ -1451,8 +1451,6 @@ EXPORT_SYMBOL_GPL(iscsi_queuecommand); | |||
| 1451 | 1451 | ||
| 1452 | int iscsi_change_queue_depth(struct scsi_device *sdev, int depth) | 1452 | int iscsi_change_queue_depth(struct scsi_device *sdev, int depth) |
| 1453 | { | 1453 | { |
| 1454 | if (depth > ISCSI_MAX_CMD_PER_LUN) | ||
| 1455 | depth = ISCSI_MAX_CMD_PER_LUN; | ||
| 1456 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); | 1454 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); |
| 1457 | return sdev->queue_depth; | 1455 | return sdev->queue_depth; |
| 1458 | } | 1456 | } |
| @@ -2062,13 +2060,8 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, | |||
| 2062 | if (!shost) | 2060 | if (!shost) |
| 2063 | return NULL; | 2061 | return NULL; |
| 2064 | 2062 | ||
| 2065 | if (qdepth > ISCSI_MAX_CMD_PER_LUN || qdepth < 1) { | 2063 | if (qdepth == 0) |
| 2066 | if (qdepth != 0) | ||
| 2067 | printk(KERN_ERR "iscsi: invalid queue depth of %d. " | ||
| 2068 | "Queue depth must be between 1 and %d.\n", | ||
| 2069 | qdepth, ISCSI_MAX_CMD_PER_LUN); | ||
| 2070 | qdepth = ISCSI_DEF_CMD_PER_LUN; | 2064 | qdepth = ISCSI_DEF_CMD_PER_LUN; |
| 2071 | } | ||
| 2072 | shost->cmd_per_lun = qdepth; | 2065 | shost->cmd_per_lun = qdepth; |
| 2073 | 2066 | ||
| 2074 | ihost = shost_priv(shost); | 2067 | ihost = shost_priv(shost); |
