diff options
Diffstat (limited to 'drivers/infiniband/ulp/srp/ib_srp.c')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 98a303558930..8d13a19e04b2 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -2410,14 +2410,8 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) | |||
2410 | static int | 2410 | static int |
2411 | srp_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) | 2411 | srp_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) |
2412 | { | 2412 | { |
2413 | struct Scsi_Host *shost = sdev->host; | ||
2414 | int max_depth; | ||
2415 | |||
2416 | max_depth = shost->can_queue; | ||
2417 | if (!sdev->tagged_supported) | 2413 | if (!sdev->tagged_supported) |
2418 | max_depth = 1; | 2414 | qdepth = 1; |
2419 | if (qdepth > max_depth) | ||
2420 | qdepth = max_depth; | ||
2421 | scsi_adjust_queue_depth(sdev, qdepth); | 2415 | scsi_adjust_queue_depth(sdev, qdepth); |
2422 | return sdev->queue_depth; | 2416 | return sdev->queue_depth; |
2423 | } | 2417 | } |