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>
This commit is contained in:
Christoph Hellwig
2014-11-13 15:08:42 +01:00
förälder 1e6f241604
incheckning db5ed4dfd5
73 ändrade filer med 155 tillägg och 412 borttagningar

Visa fil

@@ -462,9 +462,9 @@ static int aac_slave_configure(struct scsi_device *sdev)
depth = 256;
else if (depth < 2)
depth = 2;
scsi_adjust_queue_depth(sdev, depth);
scsi_change_queue_depth(sdev, depth);
} else
scsi_adjust_queue_depth(sdev, 1);
scsi_change_queue_depth(sdev, 1);
return 0;
}
@@ -478,12 +478,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
* total capacity and the queue depth supported by the target device.
*/
static int aac_change_queue_depth(struct scsi_device *sdev, int depth,
int reason)
static int aac_change_queue_depth(struct scsi_device *sdev, int depth)
{
if (reason != SCSI_QDEPTH_DEFAULT)
return -EOPNOTSUPP;
if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
(sdev_channel(sdev) == CONTAINER_CHANNEL)) {
struct scsi_device * dev;
@@ -504,10 +500,10 @@ static int aac_change_queue_depth(struct scsi_device *sdev, int depth,
depth = 256;
else if (depth < 2)
depth = 2;
scsi_adjust_queue_depth(sdev, depth);
} else
scsi_adjust_queue_depth(sdev, 1);
return sdev->queue_depth;
return scsi_change_queue_depth(sdev, depth);
}
return scsi_change_queue_depth(sdev, 1);
}
static ssize_t aac_show_raid_level(struct device *dev, struct device_attribute *attr, char *buf)