diff options
author | Christoph Hellwig <hch@lst.de> | 2014-10-02 08:39:55 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-12 05:19:39 -0500 |
commit | a62182f338b39a22035531c6afc0a8d2928b1df2 (patch) | |
tree | 57ca6cea82a09d2655daf5c161024c5015373646 /drivers/scsi/libfc | |
parent | 1d5203284d8acbdfdf9b478d434450b34f338f28 (diff) |
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/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 1d7e76e8b447..f3043ad1f35d 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -2196,26 +2196,6 @@ int fc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) | |||
2196 | EXPORT_SYMBOL(fc_change_queue_depth); | 2196 | EXPORT_SYMBOL(fc_change_queue_depth); |
2197 | 2197 | ||
2198 | /** | 2198 | /** |
2199 | * fc_change_queue_type() - Change a device's queue type | ||
2200 | * @sdev: The SCSI device whose queue depth is to change | ||
2201 | * @tag_type: Identifier for queue type | ||
2202 | */ | ||
2203 | int fc_change_queue_type(struct scsi_device *sdev, int tag_type) | ||
2204 | { | ||
2205 | if (sdev->tagged_supported) { | ||
2206 | scsi_set_tag_type(sdev, tag_type); | ||
2207 | if (tag_type) | ||
2208 | scsi_activate_tcq(sdev, sdev->queue_depth); | ||
2209 | else | ||
2210 | scsi_deactivate_tcq(sdev, sdev->queue_depth); | ||
2211 | } else | ||
2212 | tag_type = 0; | ||
2213 | |||
2214 | return tag_type; | ||
2215 | } | ||
2216 | EXPORT_SYMBOL(fc_change_queue_type); | ||
2217 | |||
2218 | /** | ||
2219 | * fc_fcp_destory() - Tear down the FCP layer for a given local port | 2199 | * fc_fcp_destory() - Tear down the FCP layer for a given local port |
2220 | * @lport: The local port that no longer needs the FCP layer | 2200 | * @lport: The local port that no longer needs the FCP layer |
2221 | */ | 2201 | */ |