aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
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/megaraid
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/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c21
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c13
2 files changed, 2 insertions, 32 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index d56eb9d3d40c..f0987f22ea70 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -332,25 +332,6 @@ static struct device_attribute *megaraid_sdev_attrs[] = {
332 NULL, 332 NULL,
333}; 333};
334 334
335/**
336 * megaraid_change_queue_depth - Change the device's queue depth
337 * @sdev: scsi device struct
338 * @qdepth: depth to set
339 * @reason: calling context
340 *
341 * Return value:
342 * actual depth set
343 */
344static int megaraid_change_queue_depth(struct scsi_device *sdev, int qdepth,
345 int reason)
346{
347 if (reason != SCSI_QDEPTH_DEFAULT)
348 return -EOPNOTSUPP;
349
350 scsi_adjust_queue_depth(sdev, qdepth);
351 return sdev->queue_depth;
352}
353
354/* 335/*
355 * Scsi host template for megaraid unified driver 336 * Scsi host template for megaraid unified driver
356 */ 337 */
@@ -363,7 +344,7 @@ static struct scsi_host_template megaraid_template_g = {
363 .eh_device_reset_handler = megaraid_reset_handler, 344 .eh_device_reset_handler = megaraid_reset_handler,
364 .eh_bus_reset_handler = megaraid_reset_handler, 345 .eh_bus_reset_handler = megaraid_reset_handler,
365 .eh_host_reset_handler = megaraid_reset_handler, 346 .eh_host_reset_handler = megaraid_reset_handler,
366 .change_queue_depth = megaraid_change_queue_depth, 347 .change_queue_depth = scsi_change_queue_depth,
367 .use_clustering = ENABLE_CLUSTERING, 348 .use_clustering = ENABLE_CLUSTERING,
368 .no_write_same = 1, 349 .no_write_same = 1,
369 .sdev_attrs = megaraid_sdev_attrs, 350 .sdev_attrs = megaraid_sdev_attrs,
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 69a9dd6ae04c..f05580e693d0 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -2591,17 +2591,6 @@ megasas_service_aen(struct megasas_instance *instance, struct megasas_cmd *cmd)
2591 } 2591 }
2592} 2592}
2593 2593
2594static int megasas_change_queue_depth(struct scsi_device *sdev,
2595 int queue_depth, int reason)
2596{
2597 if (reason != SCSI_QDEPTH_DEFAULT)
2598 return -EOPNOTSUPP;
2599
2600 scsi_adjust_queue_depth(sdev, queue_depth);
2601
2602 return queue_depth;
2603}
2604
2605static ssize_t 2594static ssize_t
2606megasas_fw_crash_buffer_store(struct device *cdev, 2595megasas_fw_crash_buffer_store(struct device *cdev,
2607 struct device_attribute *attr, const char *buf, size_t count) 2596 struct device_attribute *attr, const char *buf, size_t count)
@@ -2766,7 +2755,7 @@ static struct scsi_host_template megasas_template = {
2766 .shost_attrs = megaraid_host_attrs, 2755 .shost_attrs = megaraid_host_attrs,
2767 .bios_param = megasas_bios_param, 2756 .bios_param = megasas_bios_param,
2768 .use_clustering = ENABLE_CLUSTERING, 2757 .use_clustering = ENABLE_CLUSTERING,
2769 .change_queue_depth = megasas_change_queue_depth, 2758 .change_queue_depth = scsi_change_queue_depth,
2770 .no_write_same = 1, 2759 .no_write_same = 1,
2771}; 2760};
2772 2761