aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pmcraid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pmcraid.c')
-rw-r--r--drivers/scsi/pmcraid.c40
1 files changed, 7 insertions, 33 deletions
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 71f9f59b13c6..d8b9ba251fbd 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -249,14 +249,11 @@ static int pmcraid_slave_configure(struct scsi_device *scsi_dev)
249 PMCRAID_VSET_MAX_SECTORS); 249 PMCRAID_VSET_MAX_SECTORS);
250 } 250 }
251 251
252 if (scsi_dev->tagged_supported && 252 /*
253 (RES_IS_GSCSI(res->cfg_entry) || RES_IS_VSET(res->cfg_entry))) { 253 * We never want to report TCQ support for these types of devices.
254 scsi_adjust_queue_depth(scsi_dev, MSG_SIMPLE_TAG, 254 */
255 scsi_dev->host->cmd_per_lun); 255 if (!RES_IS_GSCSI(res->cfg_entry) && !RES_IS_VSET(res->cfg_entry))
256 } else { 256 scsi_dev->tagged_supported = 0;
257 scsi_adjust_queue_depth(scsi_dev, 0,
258 scsi_dev->host->cmd_per_lun);
259 }
260 257
261 return 0; 258 return 0;
262} 259}
@@ -302,35 +299,12 @@ static int pmcraid_change_queue_depth(struct scsi_device *scsi_dev, int depth,
302 if (depth > PMCRAID_MAX_CMD_PER_LUN) 299 if (depth > PMCRAID_MAX_CMD_PER_LUN)
303 depth = PMCRAID_MAX_CMD_PER_LUN; 300 depth = PMCRAID_MAX_CMD_PER_LUN;
304 301
305 scsi_adjust_queue_depth(scsi_dev, scsi_get_tag_type(scsi_dev), depth); 302 scsi_adjust_queue_depth(scsi_dev, depth);
306 303
307 return scsi_dev->queue_depth; 304 return scsi_dev->queue_depth;
308} 305}
309 306
310/** 307/**
311 * pmcraid_change_queue_type - Change the device's queue type
312 * @scsi_dev: scsi device struct
313 * @tag: type of tags to use
314 *
315 * Return value:
316 * actual queue type set
317 */
318static int pmcraid_change_queue_type(struct scsi_device *scsi_dev, int tag)
319{
320 struct pmcraid_resource_entry *res;
321
322 res = (struct pmcraid_resource_entry *)scsi_dev->hostdata;
323 if (res && scsi_dev->tagged_supported &&
324 (RES_IS_GSCSI(res->cfg_entry) || RES_IS_VSET(res->cfg_entry)))
325 tag = scsi_change_queue_type(scsi_dev, tag);
326 else
327 tag = 0;
328
329 return tag;
330}
331
332
333/**
334 * pmcraid_init_cmdblk - initializes a command block 308 * pmcraid_init_cmdblk - initializes a command block
335 * 309 *
336 * @cmd: pointer to struct pmcraid_cmd to be initialized 310 * @cmd: pointer to struct pmcraid_cmd to be initialized
@@ -4285,7 +4259,7 @@ static struct scsi_host_template pmcraid_host_template = {
4285 .slave_configure = pmcraid_slave_configure, 4259 .slave_configure = pmcraid_slave_configure,
4286 .slave_destroy = pmcraid_slave_destroy, 4260 .slave_destroy = pmcraid_slave_destroy,
4287 .change_queue_depth = pmcraid_change_queue_depth, 4261 .change_queue_depth = pmcraid_change_queue_depth,
4288 .change_queue_type = pmcraid_change_queue_type, 4262 .change_queue_type = scsi_change_queue_type,
4289 .can_queue = PMCRAID_MAX_IO_CMD, 4263 .can_queue = PMCRAID_MAX_IO_CMD,
4290 .this_id = -1, 4264 .this_id = -1,
4291 .sg_tablesize = PMCRAID_MAX_IOADLS, 4265 .sg_tablesize = PMCRAID_MAX_IOADLS,