aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-11-03 14:40:56 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-12 05:19:44 -0500
commitee11560f3ad150a1108d261cbff4fd617cc3fa09 (patch)
treecd833160e0d5ef6e2e83714d8e15385c5ca2dfaf
parentc8b09f6fb67df7fc1b51ced1037fa9b677428149 (diff)
scsi: don't force tagged_supported in drivers
Now that we also get proper values in cmd->request->tag for untagged commands, there is no need to force tagged_supported to on in drivers that need host-wide tags. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
-rw-r--r--drivers/scsi/fnic/fnic_main.c2
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c1
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c9
-rw-r--r--drivers/scsi/scsi_debug.c1
-rw-r--r--drivers/scsi/stex.c11
-rw-r--r--drivers/scsi/ufs/ufshcd.c6
6 files changed, 1 insertions, 29 deletions
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 0f29e3f89b26..cf1560c30b7f 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -95,8 +95,6 @@ static int fnic_slave_alloc(struct scsi_device *sdev)
95{ 95{
96 struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); 96 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
97 97
98 sdev->tagged_supported = 1;
99
100 if (!rport || fc_remote_port_chkready(rport)) 98 if (!rport || fc_remote_port_chkready(rport))
101 return -ENXIO; 99 return -ENXIO;
102 100
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 56d698af073d..89e8b687a679 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -945,7 +945,6 @@ int sas_slave_configure(struct scsi_device *scsi_dev)
945 SAS_DPRINTK("device %llx, LUN %llx doesn't support " 945 SAS_DPRINTK("device %llx, LUN %llx doesn't support "
946 "TCQ\n", SAS_ADDR(dev->sas_addr), 946 "TCQ\n", SAS_ADDR(dev->sas_addr),
947 scsi_dev->lun); 947 scsi_dev->lun);
948 scsi_dev->tagged_supported = 0;
949 scsi_adjust_queue_depth(scsi_dev, 1); 948 scsi_adjust_queue_depth(scsi_dev, 1);
950 } 949 }
951 950
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 784f59e55510..f8724f2e0158 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -162,7 +162,6 @@ static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd);
162static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd); 162static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd);
163static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd); 163static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd);
164static int qla4xxx_slave_alloc(struct scsi_device *device); 164static int qla4xxx_slave_alloc(struct scsi_device *device);
165static int qla4xxx_slave_configure(struct scsi_device *device);
166static umode_t qla4_attr_is_visible(int param_type, int param); 165static umode_t qla4_attr_is_visible(int param_type, int param);
167static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type); 166static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type);
168static int qla4xxx_change_queue_depth(struct scsi_device *sdev, int qdepth, 167static int qla4xxx_change_queue_depth(struct scsi_device *sdev, int qdepth,
@@ -203,7 +202,6 @@ static struct scsi_host_template qla4xxx_driver_template = {
203 .eh_host_reset_handler = qla4xxx_eh_host_reset, 202 .eh_host_reset_handler = qla4xxx_eh_host_reset,
204 .eh_timed_out = qla4xxx_eh_cmd_timed_out, 203 .eh_timed_out = qla4xxx_eh_cmd_timed_out,
205 204
206 .slave_configure = qla4xxx_slave_configure,
207 .slave_alloc = qla4xxx_slave_alloc, 205 .slave_alloc = qla4xxx_slave_alloc,
208 .change_queue_depth = qla4xxx_change_queue_depth, 206 .change_queue_depth = qla4xxx_change_queue_depth,
209 207
@@ -9059,7 +9057,6 @@ static int qla4xxx_slave_alloc(struct scsi_device *sdev)
9059 ddb = sess->dd_data; 9057 ddb = sess->dd_data;
9060 9058
9061 sdev->hostdata = ddb; 9059 sdev->hostdata = ddb;
9062 sdev->tagged_supported = 1;
9063 9060
9064 if (ql4xmaxqdepth != 0 && ql4xmaxqdepth <= 0xffffU) 9061 if (ql4xmaxqdepth != 0 && ql4xmaxqdepth <= 0xffffU)
9065 queue_depth = ql4xmaxqdepth; 9062 queue_depth = ql4xmaxqdepth;
@@ -9068,12 +9065,6 @@ static int qla4xxx_slave_alloc(struct scsi_device *sdev)
9068 return 0; 9065 return 0;
9069} 9066}
9070 9067
9071static int qla4xxx_slave_configure(struct scsi_device *sdev)
9072{
9073 sdev->tagged_supported = 1;
9074 return 0;
9075}
9076
9077static int qla4xxx_change_queue_depth(struct scsi_device *sdev, int qdepth, 9068static int qla4xxx_change_queue_depth(struct scsi_device *sdev, int qdepth,
9078 int reason) 9069 int reason)
9079{ 9070{
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index fce4e47becc7..b02571390d01 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -2700,7 +2700,6 @@ static int scsi_debug_slave_configure(struct scsi_device *sdp)
2700 devip = devInfoReg(sdp); 2700 devip = devInfoReg(sdp);
2701 if (NULL == devip) 2701 if (NULL == devip)
2702 return 1; /* no resources, will be marked offline */ 2702 return 1; /* no resources, will be marked offline */
2703 sdp->tagged_supported = 1;
2704 sdp->hostdata = devip; 2703 sdp->hostdata = devip;
2705 blk_queue_max_segment_size(sdp->request_queue, -1U); 2704 blk_queue_max_segment_size(sdp->request_queue, -1U);
2706 if (scsi_debug_no_uld) 2705 if (scsi_debug_no_uld)
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 2bb8a9e74dac..98a62bc15069 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -544,21 +544,11 @@ stex_ss_send_cmd(struct st_hba *hba, struct req_msg *req, u16 tag)
544} 544}
545 545
546static int 546static int
547stex_slave_alloc(struct scsi_device *sdev)
548{
549 /* Cheat: usually extracted from Inquiry data */
550 sdev->tagged_supported = 1;
551
552 return 0;
553}
554
555static int
556stex_slave_config(struct scsi_device *sdev) 547stex_slave_config(struct scsi_device *sdev)
557{ 548{
558 sdev->use_10_for_rw = 1; 549 sdev->use_10_for_rw = 1;
559 sdev->use_10_for_ms = 1; 550 sdev->use_10_for_ms = 1;
560 blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); 551 blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
561 sdev->tagged_supported = 1;
562 552
563 return 0; 553 return 0;
564} 554}
@@ -1380,7 +1370,6 @@ static struct scsi_host_template driver_template = {
1380 .proc_name = DRV_NAME, 1370 .proc_name = DRV_NAME,
1381 .bios_param = stex_biosparam, 1371 .bios_param = stex_biosparam,
1382 .queuecommand = stex_queuecommand, 1372 .queuecommand = stex_queuecommand,
1383 .slave_alloc = stex_slave_alloc,
1384 .slave_configure = stex_slave_config, 1373 .slave_configure = stex_slave_config,
1385 .eh_abort_handler = stex_abort, 1374 .eh_abort_handler = stex_abort,
1386 .eh_host_reset_handler = stex_reset, 1375 .eh_host_reset_handler = stex_reset,
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 5eb4931e2adc..67e2280e2be3 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -2695,8 +2695,7 @@ static void ufshcd_set_queue_depth(struct scsi_device *sdev)
2695 2695
2696 dev_dbg(hba->dev, "%s: activate tcq with queue depth %d\n", 2696 dev_dbg(hba->dev, "%s: activate tcq with queue depth %d\n",
2697 __func__, lun_qdepth); 2697 __func__, lun_qdepth);
2698 if (sdev->tagged_supported) 2698 scsi_adjust_queue_depth(sdev, lun_qdepth);
2699 scsi_adjust_queue_depth(sdev, lun_qdepth);
2700} 2699}
2701 2700
2702/* 2701/*
@@ -2766,7 +2765,6 @@ static int ufshcd_slave_alloc(struct scsi_device *sdev)
2766 struct ufs_hba *hba; 2765 struct ufs_hba *hba;
2767 2766
2768 hba = shost_priv(sdev->host); 2767 hba = shost_priv(sdev->host);
2769 sdev->tagged_supported = 1;
2770 2768
2771 /* Mode sense(6) is not supported by UFS, so use Mode sense(10) */ 2769 /* Mode sense(6) is not supported by UFS, so use Mode sense(10) */
2772 sdev->use_10_for_ms = 1; 2770 sdev->use_10_for_ms = 1;
@@ -2806,8 +2804,6 @@ static int ufshcd_change_queue_depth(struct scsi_device *sdev,
2806 switch (reason) { 2804 switch (reason) {
2807 case SCSI_QDEPTH_DEFAULT: 2805 case SCSI_QDEPTH_DEFAULT:
2808 case SCSI_QDEPTH_RAMP_UP: 2806 case SCSI_QDEPTH_RAMP_UP:
2809 if (!sdev->tagged_supported)
2810 depth = 1;
2811 scsi_adjust_queue_depth(sdev, depth); 2807 scsi_adjust_queue_depth(sdev, depth);
2812 break; 2808 break;
2813 case SCSI_QDEPTH_QFULL: 2809 case SCSI_QDEPTH_QFULL: