diff options
author | James Bottomley <JBottomley@Parallels.com> | 2014-12-08 07:40:20 -0800 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2014-12-08 07:40:20 -0800 |
commit | dc843ef00e79ef0466d4d66bb20beeccda92e003 (patch) | |
tree | 7491381fdd81b6d40b25fec533e6f249d7823ce3 /drivers/scsi/ibmvscsi/ibmvfc.c | |
parent | 009d0431c3914de64666bec0d350e54fdd59df6a (diff) | |
parent | 249b15ba6380830881b7863ca5dd3f33320adfdb (diff) | |
download | talos-op-linux-dc843ef00e79ef0466d4d66bb20beeccda92e003.tar.gz talos-op-linux-dc843ef00e79ef0466d4d66bb20beeccda92e003.zip |
Merge remote-tracking branch 'scsi-queue/core-for-3.19' into for-linus
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvfc.c')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 50 |
1 files changed, 6 insertions, 44 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 598c42cba5a8..147b80e07b00 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -1643,19 +1643,9 @@ static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd, int_to_scsilun(cmnd->device->lun, &vfc_cmd->iu.lun); memcpy(vfc_cmd->iu.cdb, cmnd->cmnd, cmnd->cmd_len); - if (scsi_populate_tag_msg(cmnd, tag)) { - vfc_cmd->task_tag = cpu_to_be64(tag[1]); - switch (tag[0]) { - case MSG_SIMPLE_TAG: - vfc_cmd->iu.pri_task_attr = IBMVFC_SIMPLE_TASK; - break; - case MSG_HEAD_TAG: - vfc_cmd->iu.pri_task_attr = IBMVFC_HEAD_OF_QUEUE; - break; - case MSG_ORDERED_TAG: - vfc_cmd->iu.pri_task_attr = IBMVFC_ORDERED_TASK; - break; - }; + if (cmnd->flags & SCMD_TAGGED) { + vfc_cmd->task_tag = cpu_to_be64(cmnd->tag); + vfc_cmd->iu.pri_task_attr = IBMVFC_SIMPLE_TASK; } if (likely(!(rc = ibmvfc_map_sg_data(cmnd, evt, vfc_cmd, vhost->dev)))) @@ -2897,12 +2887,6 @@ static int ibmvfc_slave_configure(struct scsi_device *sdev) spin_lock_irqsave(shost->host_lock, flags); if (sdev->type == TYPE_DISK) sdev->allow_restart = 1; - - if (sdev->tagged_supported) { - scsi_set_tag_type(sdev, MSG_SIMPLE_TAG); - scsi_activate_tcq(sdev, sdev->queue_depth); - } else - scsi_deactivate_tcq(sdev, sdev->queue_depth); spin_unlock_irqrestore(shost->host_lock, flags); return 0; } @@ -2925,33 +2909,10 @@ static int ibmvfc_change_queue_depth(struct scsi_device *sdev, int qdepth, if (qdepth > IBMVFC_MAX_CMDS_PER_LUN) qdepth = IBMVFC_MAX_CMDS_PER_LUN; - scsi_adjust_queue_depth(sdev, 0, qdepth); + scsi_adjust_queue_depth(sdev, qdepth); return sdev->queue_depth; } -/** - * ibmvfc_change_queue_type - Change the device's queue type - * @sdev: scsi device struct - * @tag_type: type of tags to use - * - * Return value: - * actual queue type set - **/ -static int ibmvfc_change_queue_type(struct scsi_device *sdev, int tag_type) -{ - if (sdev->tagged_supported) { - scsi_set_tag_type(sdev, tag_type); - - if (tag_type) - scsi_activate_tcq(sdev, sdev->queue_depth); - else - scsi_deactivate_tcq(sdev, sdev->queue_depth); - } else - tag_type = 0; - - return tag_type; -} - static ssize_t ibmvfc_show_host_partition_name(struct device *dev, struct device_attribute *attr, char *buf) { @@ -3133,7 +3094,7 @@ static struct scsi_host_template driver_template = { .target_alloc = ibmvfc_target_alloc, .scan_finished = ibmvfc_scan_finished, .change_queue_depth = ibmvfc_change_queue_depth, - .change_queue_type = ibmvfc_change_queue_type, + .change_queue_type = scsi_change_queue_type, .cmd_per_lun = 16, .can_queue = IBMVFC_MAX_REQUESTS_DEFAULT, .this_id = -1, @@ -3141,6 +3102,7 @@ static struct scsi_host_template driver_template = { .max_sectors = IBMVFC_MAX_SECTORS, .use_clustering = ENABLE_CLUSTERING, .shost_attrs = ibmvfc_attrs, + .use_blk_tags = 1, }; /** |