aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.c1
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c20
2 files changed, 9 insertions, 12 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index f42ab14105ac..812a2891de58 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -922,6 +922,7 @@ static struct scsi_host_template iscsi_iser_sht = {
922 .use_clustering = DISABLE_CLUSTERING, 922 .use_clustering = DISABLE_CLUSTERING,
923 .proc_name = "iscsi_iser", 923 .proc_name = "iscsi_iser",
924 .this_id = -1, 924 .this_id = -1,
925 .track_queue_depth = 1,
925}; 926};
926 927
927static struct iscsi_transport iscsi_iser_transport = { 928static struct iscsi_transport iscsi_iser_transport = {
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 57b5ff1bbcb6..98a303558930 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -2402,7 +2402,7 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
2402 * srp_change_queue_depth - setting device queue depth 2402 * srp_change_queue_depth - setting device queue depth
2403 * @sdev: scsi device struct 2403 * @sdev: scsi device struct
2404 * @qdepth: requested queue depth 2404 * @qdepth: requested queue depth
2405 * @reason: SCSI_QDEPTH_DEFAULT/SCSI_QDEPTH_QFULL/SCSI_QDEPTH_RAMP_UP 2405 * @reason: SCSI_QDEPTH_DEFAULT
2406 * (see include/scsi/scsi_host.h for definition) 2406 * (see include/scsi/scsi_host.h for definition)
2407 * 2407 *
2408 * Returns queue depth. 2408 * Returns queue depth.
@@ -2412,18 +2412,13 @@ srp_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
2412{ 2412{
2413 struct Scsi_Host *shost = sdev->host; 2413 struct Scsi_Host *shost = sdev->host;
2414 int max_depth; 2414 int max_depth;
2415 if (reason == SCSI_QDEPTH_DEFAULT || reason == SCSI_QDEPTH_RAMP_UP) {
2416 max_depth = shost->can_queue;
2417 if (!sdev->tagged_supported)
2418 max_depth = 1;
2419 if (qdepth > max_depth)
2420 qdepth = max_depth;
2421 scsi_adjust_queue_depth(sdev, qdepth);
2422 } else if (reason == SCSI_QDEPTH_QFULL)
2423 scsi_track_queue_full(sdev, qdepth);
2424 else
2425 return -EOPNOTSUPP;
2426 2415
2416 max_depth = shost->can_queue;
2417 if (!sdev->tagged_supported)
2418 max_depth = 1;
2419 if (qdepth > max_depth)
2420 qdepth = max_depth;
2421 scsi_adjust_queue_depth(sdev, qdepth);
2427 return sdev->queue_depth; 2422 return sdev->queue_depth;
2428} 2423}
2429 2424
@@ -2766,6 +2761,7 @@ static struct scsi_host_template srp_template = {
2766 .use_clustering = ENABLE_CLUSTERING, 2761 .use_clustering = ENABLE_CLUSTERING,
2767 .shost_attrs = srp_host_attrs, 2762 .shost_attrs = srp_host_attrs,
2768 .use_blk_tags = 1, 2763 .use_blk_tags = 1,
2764 .track_queue_depth = 1,
2769}; 2765};
2770 2766
2771static int srp_sdev_count(struct Scsi_Host *host) 2767static int srp_sdev_count(struct Scsi_Host *host)