diff options
author | Christoph Hellwig <hch@lst.de> | 2014-10-02 14:39:55 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-12 11:19:39 +0100 |
commit | a62182f338b39a22035531c6afc0a8d2928b1df2 (patch) | |
tree | 57ca6cea82a09d2655daf5c161024c5015373646 /drivers/scsi/esas2r | |
parent | 1d5203284d8acbdfdf9b478d434450b34f338f28 (diff) | |
download | linux-a62182f338b39a22035531c6afc0a8d2928b1df2.tar.bz2 |
scsi: provide a generic change_queue_type method
Most drivers use exactly the same implementation, so provide it as a
library function.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/esas2r')
-rw-r--r-- | drivers/scsi/esas2r/esas2r.h | 1 | ||||
-rw-r--r-- | drivers/scsi/esas2r/esas2r_main.c | 20 |
2 files changed, 1 insertions, 20 deletions
diff --git a/drivers/scsi/esas2r/esas2r.h b/drivers/scsi/esas2r/esas2r.h index 3fd305d6b67d..20ab211983f2 100644 --- a/drivers/scsi/esas2r/esas2r.h +++ b/drivers/scsi/esas2r/esas2r.h @@ -976,7 +976,6 @@ int esas2r_slave_alloc(struct scsi_device *dev); int esas2r_slave_configure(struct scsi_device *dev); void esas2r_slave_destroy(struct scsi_device *dev); int esas2r_change_queue_depth(struct scsi_device *dev, int depth, int reason); -int esas2r_change_queue_type(struct scsi_device *dev, int type); long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg); /* SCSI error handler (eh) functions */ diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index 45aa684f8b74..be09c628d034 100644 --- a/drivers/scsi/esas2r/esas2r_main.c +++ b/drivers/scsi/esas2r/esas2r_main.c @@ -258,7 +258,7 @@ static struct scsi_host_template driver_template = { .slave_alloc = esas2r_slave_alloc, .slave_destroy = esas2r_slave_destroy, .change_queue_depth = esas2r_change_queue_depth, - .change_queue_type = esas2r_change_queue_type, + .change_queue_type = scsi_change_queue_type, .max_sectors = 0xFFFF, }; @@ -1268,24 +1268,6 @@ int esas2r_change_queue_depth(struct scsi_device *dev, int depth, int reason) return dev->queue_depth; } -int esas2r_change_queue_type(struct scsi_device *dev, int type) -{ - esas2r_log(ESAS2R_LOG_INFO, "change_queue_type %p, %d", dev, type); - - if (dev->tagged_supported) { - scsi_set_tag_type(dev, type); - - if (type) - scsi_activate_tcq(dev, dev->queue_depth); - else - scsi_deactivate_tcq(dev, dev->queue_depth); - } else { - type = 0; - } - - return type; -} - int esas2r_slave_alloc(struct scsi_device *dev) { return 0; |