aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-11-13 09:08:42 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-24 08:45:27 -0500
commitdb5ed4dfd5dd0142ec36ff7b335e0ec3b836b3e6 (patch)
tree6cae824b5c9e5a7fd9d213e3f9c2b1c7dc8b7b8a /drivers/scsi/aacraid/linit.c
parent1e6f2416044c062a56091ebf8d76760956dd5872 (diff)
scsi: drop reason argument from ->change_queue_depth
Drop the now unused reason argument from the ->change_queue_depth method. Also add a return value to scsi_adjust_queue_depth, and rename it to scsi_change_queue_depth now that it can be used as the default ->change_queue_depth implementation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 41b9c68bca67..d11c23aad046 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -462,9 +462,9 @@ static int aac_slave_configure(struct scsi_device *sdev)
462 depth = 256; 462 depth = 256;
463 else if (depth < 2) 463 else if (depth < 2)
464 depth = 2; 464 depth = 2;
465 scsi_adjust_queue_depth(sdev, depth); 465 scsi_change_queue_depth(sdev, depth);
466 } else 466 } else
467 scsi_adjust_queue_depth(sdev, 1); 467 scsi_change_queue_depth(sdev, 1);
468 468
469 return 0; 469 return 0;
470} 470}
@@ -478,12 +478,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
478 * total capacity and the queue depth supported by the target device. 478 * total capacity and the queue depth supported by the target device.
479 */ 479 */
480 480
481static int aac_change_queue_depth(struct scsi_device *sdev, int depth, 481static int aac_change_queue_depth(struct scsi_device *sdev, int depth)
482 int reason)
483{ 482{
484 if (reason != SCSI_QDEPTH_DEFAULT)
485 return -EOPNOTSUPP;
486
487 if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && 483 if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
488 (sdev_channel(sdev) == CONTAINER_CHANNEL)) { 484 (sdev_channel(sdev) == CONTAINER_CHANNEL)) {
489 struct scsi_device * dev; 485 struct scsi_device * dev;
@@ -504,10 +500,10 @@ static int aac_change_queue_depth(struct scsi_device *sdev, int depth,
504 depth = 256; 500 depth = 256;
505 else if (depth < 2) 501 else if (depth < 2)
506 depth = 2; 502 depth = 2;
507 scsi_adjust_queue_depth(sdev, depth); 503 return scsi_change_queue_depth(sdev, depth);
508 } else 504 }
509 scsi_adjust_queue_depth(sdev, 1); 505
510 return sdev->queue_depth; 506 return scsi_change_queue_depth(sdev, 1);
511} 507}
512 508
513static ssize_t aac_show_raid_level(struct device *dev, struct device_attribute *attr, char *buf) 509static ssize_t aac_show_raid_level(struct device *dev, struct device_attribute *attr, char *buf)