diff options
author | Christoph Hellwig <hch@lst.de> | 2014-11-24 09:36:18 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-12-04 03:55:45 -0500 |
commit | efc3c1df5fda0aee84f53c226d55804e6dbede4f (patch) | |
tree | d06cbf91a62eed9ba3df319ffd96c4eea0a39740 | |
parent | 79855d178557cc3e3ffd179fd26a64cef48dfb30 (diff) |
scsi: remove ->change_queue_type method
Since we got rid of ordered tag support in 2010 the prime use case of
switching on and off ordered tags has been obsolete. The other function
of enabling/disabling tagging entirely has only been correctly implemented
by the 53c700 driver and isn't generally useful.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
25 files changed, 4 insertions, 171 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 5461924c9f10..a1640364144b 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -2740,7 +2740,6 @@ static struct scsi_host_template srp_template = { | |||
2740 | .info = srp_target_info, | 2740 | .info = srp_target_info, |
2741 | .queuecommand = srp_queuecommand, | 2741 | .queuecommand = srp_queuecommand, |
2742 | .change_queue_depth = srp_change_queue_depth, | 2742 | .change_queue_depth = srp_change_queue_depth, |
2743 | .change_queue_type = scsi_change_queue_type, | ||
2744 | .eh_abort_handler = srp_abort, | 2743 | .eh_abort_handler = srp_abort, |
2745 | .eh_device_reset_handler = srp_reset_device, | 2744 | .eh_device_reset_handler = srp_reset_device, |
2746 | .eh_host_reset_handler = srp_reset_host, | 2745 | .eh_host_reset_handler = srp_reset_host, |
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index aa915da2a5e5..e7229114b52d 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -176,7 +176,6 @@ STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt); | |||
176 | STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); | 176 | STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); |
177 | STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt); | 177 | STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt); |
178 | static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth); | 178 | static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth); |
179 | static int NCR_700_change_queue_type(struct scsi_device *SDpnt, int depth); | ||
180 | 179 | ||
181 | STATIC struct device_attribute *NCR_700_dev_attrs[]; | 180 | STATIC struct device_attribute *NCR_700_dev_attrs[]; |
182 | 181 | ||
@@ -326,7 +325,6 @@ NCR_700_detect(struct scsi_host_template *tpnt, | |||
326 | tpnt->slave_destroy = NCR_700_slave_destroy; | 325 | tpnt->slave_destroy = NCR_700_slave_destroy; |
327 | tpnt->slave_alloc = NCR_700_slave_alloc; | 326 | tpnt->slave_alloc = NCR_700_slave_alloc; |
328 | tpnt->change_queue_depth = NCR_700_change_queue_depth; | 327 | tpnt->change_queue_depth = NCR_700_change_queue_depth; |
329 | tpnt->change_queue_type = NCR_700_change_queue_type; | ||
330 | tpnt->use_blk_tags = 1; | 328 | tpnt->use_blk_tags = 1; |
331 | 329 | ||
332 | if(tpnt->name == NULL) | 330 | if(tpnt->name == NULL) |
@@ -2082,39 +2080,6 @@ NCR_700_change_queue_depth(struct scsi_device *SDp, int depth) | |||
2082 | return scsi_change_queue_depth(SDp, depth); | 2080 | return scsi_change_queue_depth(SDp, depth); |
2083 | } | 2081 | } |
2084 | 2082 | ||
2085 | static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type) | ||
2086 | { | ||
2087 | int change_tag = ((tag_type ==0 && scsi_get_tag_type(SDp) != 0) | ||
2088 | || (tag_type != 0 && scsi_get_tag_type(SDp) == 0)); | ||
2089 | struct NCR_700_Host_Parameters *hostdata = | ||
2090 | (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; | ||
2091 | |||
2092 | /* We have a global (per target) flag to track whether TCQ is | ||
2093 | * enabled, so we'll be turning it off for the entire target here. | ||
2094 | * our tag algorithm will fail if we mix tagged and untagged commands, | ||
2095 | * so quiesce the device before doing this */ | ||
2096 | if (change_tag) | ||
2097 | scsi_target_quiesce(SDp->sdev_target); | ||
2098 | |||
2099 | scsi_set_tag_type(SDp, tag_type); | ||
2100 | if (!tag_type) { | ||
2101 | /* shift back to the default unqueued number of commands | ||
2102 | * (the user can still raise this) */ | ||
2103 | scsi_change_queue_depth(SDp, SDp->host->cmd_per_lun); | ||
2104 | hostdata->tag_negotiated &= ~(1 << sdev_id(SDp)); | ||
2105 | } else { | ||
2106 | /* Here, we cleared the negotiation flag above, so this | ||
2107 | * will force the driver to renegotiate */ | ||
2108 | scsi_change_queue_depth(SDp, SDp->queue_depth); | ||
2109 | if (change_tag) | ||
2110 | NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION); | ||
2111 | } | ||
2112 | if (change_tag) | ||
2113 | scsi_target_resume(SDp->sdev_target); | ||
2114 | |||
2115 | return tag_type; | ||
2116 | } | ||
2117 | |||
2118 | static ssize_t | 2083 | static ssize_t |
2119 | NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char *buf) | 2084 | NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char *buf) |
2120 | { | 2085 | { |
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 14fc018436c2..02a2512b76a8 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c | |||
@@ -63,7 +63,6 @@ static struct scsi_host_template aic94xx_sht = { | |||
63 | .scan_finished = asd_scan_finished, | 63 | .scan_finished = asd_scan_finished, |
64 | .scan_start = asd_scan_start, | 64 | .scan_start = asd_scan_start, |
65 | .change_queue_depth = sas_change_queue_depth, | 65 | .change_queue_depth = sas_change_queue_depth, |
66 | .change_queue_type = sas_change_queue_type, | ||
67 | .bios_param = sas_bios_param, | 66 | .bios_param = sas_bios_param, |
68 | .can_queue = 1, | 67 | .can_queue = 1, |
69 | .cmd_per_lun = 1, | 68 | .cmd_per_lun = 1, |
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 386c2cfad306..17a29e97ca03 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
@@ -2785,7 +2785,6 @@ static struct scsi_host_template bnx2fc_shost_template = { | |||
2785 | .eh_host_reset_handler = fc_eh_host_reset, | 2785 | .eh_host_reset_handler = fc_eh_host_reset, |
2786 | .slave_alloc = fc_slave_alloc, | 2786 | .slave_alloc = fc_slave_alloc, |
2787 | .change_queue_depth = scsi_change_queue_depth, | 2787 | .change_queue_depth = scsi_change_queue_depth, |
2788 | .change_queue_type = scsi_change_queue_type, | ||
2789 | .this_id = -1, | 2788 | .this_id = -1, |
2790 | .cmd_per_lun = 3, | 2789 | .cmd_per_lun = 3, |
2791 | .use_clustering = ENABLE_CLUSTERING, | 2790 | .use_clustering = ENABLE_CLUSTERING, |
diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index 593ff8a63c70..7e1c21e6736b 100644 --- a/drivers/scsi/esas2r/esas2r_main.c +++ b/drivers/scsi/esas2r/esas2r_main.c | |||
@@ -255,7 +255,6 @@ static struct scsi_host_template driver_template = { | |||
255 | .emulated = 0, | 255 | .emulated = 0, |
256 | .proc_name = ESAS2R_DRVR_NAME, | 256 | .proc_name = ESAS2R_DRVR_NAME, |
257 | .change_queue_depth = scsi_change_queue_depth, | 257 | .change_queue_depth = scsi_change_queue_depth, |
258 | .change_queue_type = scsi_change_queue_type, | ||
259 | .max_sectors = 0xFFFF, | 258 | .max_sectors = 0xFFFF, |
260 | .use_blk_tags = 1, | 259 | .use_blk_tags = 1, |
261 | }; | 260 | }; |
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 308a016fdaea..49df2130bd09 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -281,7 +281,6 @@ static struct scsi_host_template fcoe_shost_template = { | |||
281 | .eh_host_reset_handler = fc_eh_host_reset, | 281 | .eh_host_reset_handler = fc_eh_host_reset, |
282 | .slave_alloc = fc_slave_alloc, | 282 | .slave_alloc = fc_slave_alloc, |
283 | .change_queue_depth = scsi_change_queue_depth, | 283 | .change_queue_depth = scsi_change_queue_depth, |
284 | .change_queue_type = scsi_change_queue_type, | ||
285 | .this_id = -1, | 284 | .this_id = -1, |
286 | .cmd_per_lun = 3, | 285 | .cmd_per_lun = 3, |
287 | .can_queue = FCOE_MAX_OUTSTANDING_COMMANDS, | 286 | .can_queue = FCOE_MAX_OUTSTANDING_COMMANDS, |
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 0c1f8177b5b7..8a0d4d7b3254 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c | |||
@@ -111,7 +111,6 @@ static struct scsi_host_template fnic_host_template = { | |||
111 | .eh_host_reset_handler = fnic_host_reset, | 111 | .eh_host_reset_handler = fnic_host_reset, |
112 | .slave_alloc = fnic_slave_alloc, | 112 | .slave_alloc = fnic_slave_alloc, |
113 | .change_queue_depth = scsi_change_queue_depth, | 113 | .change_queue_depth = scsi_change_queue_depth, |
114 | .change_queue_type = scsi_change_queue_type, | ||
115 | .this_id = -1, | 114 | .this_id = -1, |
116 | .cmd_per_lun = 3, | 115 | .cmd_per_lun = 3, |
117 | .can_queue = FNIC_DFLT_IO_REQ, | 116 | .can_queue = FNIC_DFLT_IO_REQ, |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index f58c6d8e0264..6e3596471caa 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -3089,7 +3089,6 @@ static struct scsi_host_template driver_template = { | |||
3089 | .target_alloc = ibmvfc_target_alloc, | 3089 | .target_alloc = ibmvfc_target_alloc, |
3090 | .scan_finished = ibmvfc_scan_finished, | 3090 | .scan_finished = ibmvfc_scan_finished, |
3091 | .change_queue_depth = ibmvfc_change_queue_depth, | 3091 | .change_queue_depth = ibmvfc_change_queue_depth, |
3092 | .change_queue_type = scsi_change_queue_type, | ||
3093 | .cmd_per_lun = 16, | 3092 | .cmd_per_lun = 16, |
3094 | .can_queue = IBMVFC_MAX_REQUESTS_DEFAULT, | 3093 | .can_queue = IBMVFC_MAX_REQUESTS_DEFAULT, |
3095 | .this_id = -1, | 3094 | .this_id = -1, |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 540294389355..c35ef5f01e92 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -4346,30 +4346,6 @@ static int ipr_change_queue_depth(struct scsi_device *sdev, int qdepth) | |||
4346 | } | 4346 | } |
4347 | 4347 | ||
4348 | /** | 4348 | /** |
4349 | * ipr_change_queue_type - Change the device's queue type | ||
4350 | * @dsev: scsi device struct | ||
4351 | * @tag_type: type of tags to use | ||
4352 | * | ||
4353 | * Return value: | ||
4354 | * actual queue type set | ||
4355 | **/ | ||
4356 | static int ipr_change_queue_type(struct scsi_device *sdev, int tag_type) | ||
4357 | { | ||
4358 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; | ||
4359 | struct ipr_resource_entry *res; | ||
4360 | unsigned long lock_flags = 0; | ||
4361 | |||
4362 | spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); | ||
4363 | res = (struct ipr_resource_entry *)sdev->hostdata; | ||
4364 | if (res && ipr_is_gscsi(res)) | ||
4365 | tag_type = scsi_change_queue_type(sdev, tag_type); | ||
4366 | else | ||
4367 | tag_type = 0; | ||
4368 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); | ||
4369 | return tag_type; | ||
4370 | } | ||
4371 | |||
4372 | /** | ||
4373 | * ipr_show_adapter_handle - Show the adapter's resource handle for this device | 4349 | * ipr_show_adapter_handle - Show the adapter's resource handle for this device |
4374 | * @dev: device struct | 4350 | * @dev: device struct |
4375 | * @attr: device attribute structure | 4351 | * @attr: device attribute structure |
@@ -6302,7 +6278,6 @@ static struct scsi_host_template driver_template = { | |||
6302 | .target_alloc = ipr_target_alloc, | 6278 | .target_alloc = ipr_target_alloc, |
6303 | .target_destroy = ipr_target_destroy, | 6279 | .target_destroy = ipr_target_destroy, |
6304 | .change_queue_depth = ipr_change_queue_depth, | 6280 | .change_queue_depth = ipr_change_queue_depth, |
6305 | .change_queue_type = ipr_change_queue_type, | ||
6306 | .bios_param = ipr_biosparam, | 6281 | .bios_param = ipr_biosparam, |
6307 | .can_queue = IPR_MAX_COMMANDS, | 6282 | .can_queue = IPR_MAX_COMMANDS, |
6308 | .this_id = -1, | 6283 | .this_id = -1, |
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index 724c6265b667..cd41b63a2f10 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c | |||
@@ -158,7 +158,6 @@ static struct scsi_host_template isci_sht = { | |||
158 | .scan_finished = isci_host_scan_finished, | 158 | .scan_finished = isci_host_scan_finished, |
159 | .scan_start = isci_host_start, | 159 | .scan_start = isci_host_start, |
160 | .change_queue_depth = sas_change_queue_depth, | 160 | .change_queue_depth = sas_change_queue_depth, |
161 | .change_queue_type = sas_change_queue_type, | ||
162 | .bios_param = sas_bios_param, | 161 | .bios_param = sas_bios_param, |
163 | .can_queue = ISCI_CAN_QUEUE_VAL, | 162 | .can_queue = ISCI_CAN_QUEUE_VAL, |
164 | .cmd_per_lun = 1, | 163 | .cmd_per_lun = 1, |
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 72918d227ead..519dac4e341e 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -906,13 +906,6 @@ int sas_change_queue_depth(struct scsi_device *sdev, int depth) | |||
906 | return scsi_change_queue_depth(sdev, depth); | 906 | return scsi_change_queue_depth(sdev, depth); |
907 | } | 907 | } |
908 | 908 | ||
909 | int sas_change_queue_type(struct scsi_device *scsi_dev, int type) | ||
910 | { | ||
911 | if (dev_is_sata(sdev_to_domain_dev(scsi_dev))) | ||
912 | return -EINVAL; | ||
913 | return scsi_change_queue_type(scsi_dev, type); | ||
914 | } | ||
915 | |||
916 | int sas_bios_param(struct scsi_device *scsi_dev, | 909 | int sas_bios_param(struct scsi_device *scsi_dev, |
917 | struct block_device *bdev, | 910 | struct block_device *bdev, |
918 | sector_t capacity, int *hsc) | 911 | sector_t capacity, int *hsc) |
@@ -1011,7 +1004,6 @@ EXPORT_SYMBOL_GPL(sas_queuecommand); | |||
1011 | EXPORT_SYMBOL_GPL(sas_target_alloc); | 1004 | EXPORT_SYMBOL_GPL(sas_target_alloc); |
1012 | EXPORT_SYMBOL_GPL(sas_slave_configure); | 1005 | EXPORT_SYMBOL_GPL(sas_slave_configure); |
1013 | EXPORT_SYMBOL_GPL(sas_change_queue_depth); | 1006 | EXPORT_SYMBOL_GPL(sas_change_queue_depth); |
1014 | EXPORT_SYMBOL_GPL(sas_change_queue_type); | ||
1015 | EXPORT_SYMBOL_GPL(sas_bios_param); | 1007 | EXPORT_SYMBOL_GPL(sas_bios_param); |
1016 | EXPORT_SYMBOL_GPL(sas_task_abort); | 1008 | EXPORT_SYMBOL_GPL(sas_task_abort); |
1017 | EXPORT_SYMBOL_GPL(sas_phy_reset); | 1009 | EXPORT_SYMBOL_GPL(sas_phy_reset); |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index fd85952b621d..4f9222eb2266 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -5879,7 +5879,6 @@ struct scsi_host_template lpfc_template = { | |||
5879 | .max_sectors = 0xFFFF, | 5879 | .max_sectors = 0xFFFF, |
5880 | .vendor_id = LPFC_NL_VENDOR_ID, | 5880 | .vendor_id = LPFC_NL_VENDOR_ID, |
5881 | .change_queue_depth = scsi_change_queue_depth, | 5881 | .change_queue_depth = scsi_change_queue_depth, |
5882 | .change_queue_type = scsi_change_queue_type, | ||
5883 | .use_blk_tags = 1, | 5882 | .use_blk_tags = 1, |
5884 | .track_queue_depth = 1, | 5883 | .track_queue_depth = 1, |
5885 | }; | 5884 | }; |
@@ -5904,7 +5903,6 @@ struct scsi_host_template lpfc_vport_template = { | |||
5904 | .shost_attrs = lpfc_vport_attrs, | 5903 | .shost_attrs = lpfc_vport_attrs, |
5905 | .max_sectors = 0xFFFF, | 5904 | .max_sectors = 0xFFFF, |
5906 | .change_queue_depth = scsi_change_queue_depth, | 5905 | .change_queue_depth = scsi_change_queue_depth, |
5907 | .change_queue_type = scsi_change_queue_type, | ||
5908 | .use_blk_tags = 1, | 5906 | .use_blk_tags = 1, |
5909 | .track_queue_depth = 1, | 5907 | .track_queue_depth = 1, |
5910 | }; | 5908 | }; |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 8431eb10bbb1..6a1c036a6f3f 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
@@ -7592,7 +7592,6 @@ static struct scsi_host_template scsih_driver_template = { | |||
7592 | .scan_finished = _scsih_scan_finished, | 7592 | .scan_finished = _scsih_scan_finished, |
7593 | .scan_start = _scsih_scan_start, | 7593 | .scan_start = _scsih_scan_start, |
7594 | .change_queue_depth = _scsih_change_queue_depth, | 7594 | .change_queue_depth = _scsih_change_queue_depth, |
7595 | .change_queue_type = scsi_change_queue_type, | ||
7596 | .eh_abort_handler = _scsih_abort, | 7595 | .eh_abort_handler = _scsih_abort, |
7597 | .eh_device_reset_handler = _scsih_dev_reset, | 7596 | .eh_device_reset_handler = _scsih_dev_reset, |
7598 | .eh_target_reset_handler = _scsih_target_reset, | 7597 | .eh_target_reset_handler = _scsih_target_reset, |
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index a2b60991efd4..94261ee9e72d 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c | |||
@@ -7229,7 +7229,6 @@ static struct scsi_host_template scsih_driver_template = { | |||
7229 | .scan_finished = _scsih_scan_finished, | 7229 | .scan_finished = _scsih_scan_finished, |
7230 | .scan_start = _scsih_scan_start, | 7230 | .scan_start = _scsih_scan_start, |
7231 | .change_queue_depth = _scsih_change_queue_depth, | 7231 | .change_queue_depth = _scsih_change_queue_depth, |
7232 | .change_queue_type = scsi_change_queue_type, | ||
7233 | .eh_abort_handler = _scsih_abort, | 7232 | .eh_abort_handler = _scsih_abort, |
7234 | .eh_device_reset_handler = _scsih_dev_reset, | 7233 | .eh_device_reset_handler = _scsih_dev_reset, |
7235 | .eh_target_reset_handler = _scsih_target_reset, | 7234 | .eh_target_reset_handler = _scsih_target_reset, |
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index f15df3de6790..53030b0e8015 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c | |||
@@ -54,7 +54,6 @@ static struct scsi_host_template mvs_sht = { | |||
54 | .scan_finished = mvs_scan_finished, | 54 | .scan_finished = mvs_scan_finished, |
55 | .scan_start = mvs_scan_start, | 55 | .scan_start = mvs_scan_start, |
56 | .change_queue_depth = sas_change_queue_depth, | 56 | .change_queue_depth = sas_change_queue_depth, |
57 | .change_queue_type = sas_change_queue_type, | ||
58 | .bios_param = sas_bios_param, | 57 | .bios_param = sas_bios_param, |
59 | .can_queue = 1, | 58 | .can_queue = 1, |
60 | .cmd_per_lun = 1, | 59 | .cmd_per_lun = 1, |
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 329aba0083ab..65555916d3b8 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c | |||
@@ -76,7 +76,6 @@ static struct scsi_host_template pm8001_sht = { | |||
76 | .scan_finished = pm8001_scan_finished, | 76 | .scan_finished = pm8001_scan_finished, |
77 | .scan_start = pm8001_scan_start, | 77 | .scan_start = pm8001_scan_start, |
78 | .change_queue_depth = sas_change_queue_depth, | 78 | .change_queue_depth = sas_change_queue_depth, |
79 | .change_queue_type = sas_change_queue_type, | ||
80 | .bios_param = sas_bios_param, | 79 | .bios_param = sas_bios_param, |
81 | .can_queue = 1, | 80 | .can_queue = 1, |
82 | .cmd_per_lun = 1, | 81 | .cmd_per_lun = 1, |
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index b1b1f66b1ab7..8c27b6a77ec4 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
@@ -4251,7 +4251,6 @@ static struct scsi_host_template pmcraid_host_template = { | |||
4251 | .slave_configure = pmcraid_slave_configure, | 4251 | .slave_configure = pmcraid_slave_configure, |
4252 | .slave_destroy = pmcraid_slave_destroy, | 4252 | .slave_destroy = pmcraid_slave_destroy, |
4253 | .change_queue_depth = pmcraid_change_queue_depth, | 4253 | .change_queue_depth = pmcraid_change_queue_depth, |
4254 | .change_queue_type = scsi_change_queue_type, | ||
4255 | .can_queue = PMCRAID_MAX_IO_CMD, | 4254 | .can_queue = PMCRAID_MAX_IO_CMD, |
4256 | .this_id = -1, | 4255 | .this_id = -1, |
4257 | .sg_tablesize = PMCRAID_MAX_IOADLS, | 4256 | .sg_tablesize = PMCRAID_MAX_IOADLS, |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 6b4d9235368a..12ca291c1380 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -258,7 +258,6 @@ struct scsi_host_template qla2xxx_driver_template = { | |||
258 | .scan_finished = qla2xxx_scan_finished, | 258 | .scan_finished = qla2xxx_scan_finished, |
259 | .scan_start = qla2xxx_scan_start, | 259 | .scan_start = qla2xxx_scan_start, |
260 | .change_queue_depth = scsi_change_queue_depth, | 260 | .change_queue_depth = scsi_change_queue_depth, |
261 | .change_queue_type = scsi_change_queue_type, | ||
262 | .this_id = -1, | 261 | .this_id = -1, |
263 | .cmd_per_lun = 3, | 262 | .cmd_per_lun = 3, |
264 | .use_clustering = ENABLE_CLUSTERING, | 263 | .use_clustering = ENABLE_CLUSTERING, |
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 5ea15fc7d2fb..72282ae3009d 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c | |||
@@ -832,22 +832,6 @@ int scsi_track_queue_full(struct scsi_device *sdev, int depth) | |||
832 | EXPORT_SYMBOL(scsi_track_queue_full); | 832 | EXPORT_SYMBOL(scsi_track_queue_full); |
833 | 833 | ||
834 | /** | 834 | /** |
835 | * scsi_change_queue_type() - Change a device's queue type | ||
836 | * @sdev: The SCSI device whose queue depth is to change | ||
837 | * @tag_type: Identifier for queue type | ||
838 | */ | ||
839 | int scsi_change_queue_type(struct scsi_device *sdev, int tag_type) | ||
840 | { | ||
841 | if (!sdev->tagged_supported) | ||
842 | return 0; | ||
843 | |||
844 | scsi_set_tag_type(sdev, tag_type); | ||
845 | return tag_type; | ||
846 | |||
847 | } | ||
848 | EXPORT_SYMBOL(scsi_change_queue_type); | ||
849 | |||
850 | /** | ||
851 | * scsi_vpd_inquiry - Request a device provide us with a VPD page | 835 | * scsi_vpd_inquiry - Request a device provide us with a VPD page |
852 | * @sdev: The device to ask | 836 | * @sdev: The device to ask |
853 | * @buffer: Where to put the result | 837 | * @buffer: Where to put the result |
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index aa4b6b80aade..87b5361d893b 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -4988,32 +4988,6 @@ sdebug_change_qdepth(struct scsi_device *sdev, int qdepth) | |||
4988 | } | 4988 | } |
4989 | 4989 | ||
4990 | static int | 4990 | static int |
4991 | sdebug_change_qtype(struct scsi_device *sdev, int qtype) | ||
4992 | { | ||
4993 | qtype = scsi_change_queue_type(sdev, qtype); | ||
4994 | if (SCSI_DEBUG_OPT_Q_NOISE & scsi_debug_opts) { | ||
4995 | const char *cp; | ||
4996 | |||
4997 | switch (qtype) { | ||
4998 | case 0: | ||
4999 | cp = "untagged"; | ||
5000 | break; | ||
5001 | case MSG_SIMPLE_TAG: | ||
5002 | cp = "simple tags"; | ||
5003 | break; | ||
5004 | case MSG_ORDERED_TAG: | ||
5005 | cp = "ordered tags"; | ||
5006 | break; | ||
5007 | default: | ||
5008 | cp = "unknown"; | ||
5009 | break; | ||
5010 | } | ||
5011 | sdev_printk(KERN_INFO, sdev, "%s: to %s\n", __func__, cp); | ||
5012 | } | ||
5013 | return qtype; | ||
5014 | } | ||
5015 | |||
5016 | static int | ||
5017 | check_inject(struct scsi_cmnd *scp) | 4991 | check_inject(struct scsi_cmnd *scp) |
5018 | { | 4992 | { |
5019 | struct sdebug_scmd_extra_t *ep = scsi_cmd_priv(scp); | 4993 | struct sdebug_scmd_extra_t *ep = scsi_cmd_priv(scp); |
@@ -5212,7 +5186,6 @@ static struct scsi_host_template sdebug_driver_template = { | |||
5212 | .ioctl = scsi_debug_ioctl, | 5186 | .ioctl = scsi_debug_ioctl, |
5213 | .queuecommand = sdebug_queuecommand_lock_or_not, | 5187 | .queuecommand = sdebug_queuecommand_lock_or_not, |
5214 | .change_queue_depth = sdebug_change_qdepth, | 5188 | .change_queue_depth = sdebug_change_qdepth, |
5215 | .change_queue_type = sdebug_change_qtype, | ||
5216 | .eh_abort_handler = scsi_debug_abort, | 5189 | .eh_abort_handler = scsi_debug_abort, |
5217 | .eh_device_reset_handler = scsi_debug_device_reset, | 5190 | .eh_device_reset_handler = scsi_debug_device_reset, |
5218 | .eh_target_reset_handler = scsi_debug_target_reset, | 5191 | .eh_target_reset_handler = scsi_debug_target_reset, |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 1cb64a8e18c9..1ac38e73df7e 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -738,30 +738,12 @@ store_queue_type_field(struct device *dev, struct device_attribute *attr, | |||
738 | const char *buf, size_t count) | 738 | const char *buf, size_t count) |
739 | { | 739 | { |
740 | struct scsi_device *sdev = to_scsi_device(dev); | 740 | struct scsi_device *sdev = to_scsi_device(dev); |
741 | struct scsi_host_template *sht = sdev->host->hostt; | ||
742 | int tag_type = 0, retval; | ||
743 | int prev_tag_type = scsi_get_tag_type(sdev); | ||
744 | |||
745 | if (!sdev->tagged_supported || !sht->change_queue_type) | ||
746 | return -EINVAL; | ||
747 | 741 | ||
748 | /* | 742 | if (!sdev->tagged_supported) |
749 | * We're never issueing order tags these days, but allow the value | ||
750 | * for backwards compatibility. | ||
751 | */ | ||
752 | if (strncmp(buf, "ordered", 7) == 0 || | ||
753 | strncmp(buf, "simple", 6) == 0) | ||
754 | tag_type = MSG_SIMPLE_TAG; | ||
755 | else if (strncmp(buf, "none", 4) != 0) | ||
756 | return -EINVAL; | 743 | return -EINVAL; |
757 | 744 | ||
758 | if (tag_type == prev_tag_type) | 745 | sdev_printk(KERN_INFO, sdev, |
759 | return count; | 746 | "ignoring write to deprecated queue_type attribute"); |
760 | |||
761 | retval = sht->change_queue_type(sdev, tag_type); | ||
762 | if (retval < 0) | ||
763 | return retval; | ||
764 | |||
765 | return count; | 747 | return count; |
766 | } | 748 | } |
767 | 749 | ||
@@ -938,10 +920,6 @@ static umode_t scsi_sdev_attr_is_visible(struct kobject *kobj, | |||
938 | !sdev->host->hostt->change_queue_depth) | 920 | !sdev->host->hostt->change_queue_depth) |
939 | return 0; | 921 | return 0; |
940 | 922 | ||
941 | if (attr == &dev_attr_queue_type.attr && | ||
942 | !sdev->host->hostt->change_queue_type) | ||
943 | return S_IRUGO; | ||
944 | |||
945 | return attr->mode; | 923 | return attr->mode; |
946 | } | 924 | } |
947 | 925 | ||
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 4d1b7224a7f2..24e2c94e429b 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -385,7 +385,6 @@ static struct scsi_host_template tcm_loop_driver_template = { | |||
385 | .name = "TCM_Loopback", | 385 | .name = "TCM_Loopback", |
386 | .queuecommand = tcm_loop_queuecommand, | 386 | .queuecommand = tcm_loop_queuecommand, |
387 | .change_queue_depth = scsi_change_queue_depth, | 387 | .change_queue_depth = scsi_change_queue_depth, |
388 | .change_queue_type = scsi_change_queue_type, | ||
389 | .eh_abort_handler = tcm_loop_abort_task, | 388 | .eh_abort_handler = tcm_loop_abort_task, |
390 | .eh_device_reset_handler = tcm_loop_device_reset, | 389 | .eh_device_reset_handler = tcm_loop_device_reset, |
391 | .eh_target_reset_handler = tcm_loop_target_reset, | 390 | .eh_target_reset_handler = tcm_loop_target_reset, |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 832dcc9f86ec..8280234fba90 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -693,7 +693,6 @@ extern int sas_queuecommand(struct Scsi_Host * ,struct scsi_cmnd *); | |||
693 | extern int sas_target_alloc(struct scsi_target *); | 693 | extern int sas_target_alloc(struct scsi_target *); |
694 | extern int sas_slave_configure(struct scsi_device *); | 694 | extern int sas_slave_configure(struct scsi_device *); |
695 | extern int sas_change_queue_depth(struct scsi_device *, int new_depth); | 695 | extern int sas_change_queue_depth(struct scsi_device *, int new_depth); |
696 | extern int sas_change_queue_type(struct scsi_device *, int qt); | ||
697 | extern int sas_bios_param(struct scsi_device *, | 696 | extern int sas_bios_param(struct scsi_device *, |
698 | struct block_device *, | 697 | struct block_device *, |
699 | sector_t capacity, int *hsc); | 698 | sector_t capacity, int *hsc); |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index c8a462ef9a4e..c2fa8b49cb2e 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -278,19 +278,6 @@ struct scsi_host_template { | |||
278 | int (* change_queue_depth)(struct scsi_device *, int); | 278 | int (* change_queue_depth)(struct scsi_device *, int); |
279 | 279 | ||
280 | /* | 280 | /* |
281 | * Fill in this function to allow the changing of tag types | ||
282 | * (this also allows the enabling/disabling of tag command | ||
283 | * queueing). An error should only be returned if something | ||
284 | * went wrong in the driver while trying to set the tag type. | ||
285 | * If the driver doesn't support the requested tag type, then | ||
286 | * it should set the closest type it does support without | ||
287 | * returning an error. Returns the actual tag type set. | ||
288 | * | ||
289 | * Status: OPTIONAL | ||
290 | */ | ||
291 | int (* change_queue_type)(struct scsi_device *, int); | ||
292 | |||
293 | /* | ||
294 | * This function determines the BIOS parameters for a given | 281 | * This function determines the BIOS parameters for a given |
295 | * harddisk. These tend to be numbers that are made up by | 282 | * harddisk. These tend to be numbers that are made up by |
296 | * the host adapter. Parameters: | 283 | * the host adapter. Parameters: |
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index fe4a70299419..59578beac053 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h | |||
@@ -15,9 +15,6 @@ | |||
15 | 15 | ||
16 | 16 | ||
17 | #ifdef CONFIG_BLOCK | 17 | #ifdef CONFIG_BLOCK |
18 | |||
19 | int scsi_change_queue_type(struct scsi_device *sdev, int tag_type); | ||
20 | |||
21 | /** | 18 | /** |
22 | * scsi_get_tag_type - get the type of tag the device supports | 19 | * scsi_get_tag_type - get the type of tag the device supports |
23 | * @sdev: the scsi device | 20 | * @sdev: the scsi device |