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/target | |
parent | 009d0431c3914de64666bec0d350e54fdd59df6a (diff) | |
parent | 249b15ba6380830881b7863ca5dd3f33320adfdb (diff) | |
download | linux-dc843ef00e79ef0466d4d66bb20beeccda92e003.tar.bz2 |
Merge remote-tracking branch 'scsi-queue/core-for-3.19' into for-linus
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 51 | ||||
-rw-r--r-- | drivers/target/target_core_alua.c | 2 | ||||
-rw-r--r-- | drivers/target/target_core_pr.c | 2 | ||||
-rw-r--r-- | drivers/target/target_core_sbc.c | 2 |
4 files changed, 8 insertions, 49 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index ab3ab27d49b7..0ed96644ec94 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -121,13 +121,13 @@ static int tcm_loop_change_queue_depth( { switch (reason) { case SCSI_QDEPTH_DEFAULT: - scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); + scsi_adjust_queue_depth(sdev, depth); break; case SCSI_QDEPTH_QFULL: scsi_track_queue_full(sdev, depth); break; case SCSI_QDEPTH_RAMP_UP: - scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); + scsi_adjust_queue_depth(sdev, depth); break; default: return -EOPNOTSUPP; @@ -135,33 +135,6 @@ static int tcm_loop_change_queue_depth( return sdev->queue_depth; } -static int tcm_loop_change_queue_type(struct scsi_device *sdev, int tag) -{ - if (sdev->tagged_supported) { - scsi_set_tag_type(sdev, tag); - - if (tag) - scsi_activate_tcq(sdev, sdev->queue_depth); - else - scsi_deactivate_tcq(sdev, sdev->queue_depth); - } else - tag = 0; - - return tag; -} - -/* - * Locate the SAM Task Attr from struct scsi_cmnd * - */ -static int tcm_loop_sam_attr(struct scsi_cmnd *sc, int tag) -{ - if (sc->device->tagged_supported && - sc->device->ordered_tags && tag >= 0) - return MSG_ORDERED_TAG; - - return MSG_SIMPLE_TAG; -} - static void tcm_loop_submission_work(struct work_struct *work) { struct tcm_loop_cmd *tl_cmd = @@ -220,7 +193,7 @@ static void tcm_loop_submission_work(struct work_struct *work) rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd, &tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun, - transfer_length, tcm_loop_sam_attr(sc, tl_cmd->sc_cmd_tag), + transfer_length, MSG_SIMPLE_TAG, sc->sc_data_direction, 0, scsi_sglist(sc), scsi_sg_count(sc), sgl_bidi, sgl_bidi_count, @@ -431,27 +404,13 @@ static int tcm_loop_slave_alloc(struct scsi_device *sd) return 0; } -static int tcm_loop_slave_configure(struct scsi_device *sd) -{ - if (sd->tagged_supported) { - scsi_activate_tcq(sd, sd->queue_depth); - scsi_adjust_queue_depth(sd, MSG_SIMPLE_TAG, - sd->host->cmd_per_lun); - } else { - scsi_adjust_queue_depth(sd, 0, - sd->host->cmd_per_lun); - } - - return 0; -} - static struct scsi_host_template tcm_loop_driver_template = { .show_info = tcm_loop_show_info, .proc_name = "tcm_loopback", .name = "TCM_Loopback", .queuecommand = tcm_loop_queuecommand, .change_queue_depth = tcm_loop_change_queue_depth, - .change_queue_type = tcm_loop_change_queue_type, + .change_queue_type = scsi_change_queue_type, .eh_abort_handler = tcm_loop_abort_task, .eh_device_reset_handler = tcm_loop_device_reset, .eh_target_reset_handler = tcm_loop_target_reset, @@ -462,8 +421,8 @@ static struct scsi_host_template tcm_loop_driver_template = { .max_sectors = 0xFFFF, .use_clustering = DISABLE_CLUSTERING, .slave_alloc = tcm_loop_slave_alloc, - .slave_configure = tcm_loop_slave_configure, .module = THIS_MODULE, + .use_blk_tags = 1, }; static int tcm_loop_driver_probe(struct device *dev) diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index fb87780929d2..75cbde1f7c5b 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -576,7 +576,7 @@ static inline int core_alua_state_standby( case SEND_DIAGNOSTIC: case READ_CAPACITY: return 0; - case SERVICE_ACTION_IN: + case SERVICE_ACTION_IN_16: switch (cdb[1] & 0x1f) { case SAI_READ_CAPACITY_16: return 0; diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 9f93b8234095..4c261c33cf55 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -459,7 +459,7 @@ static int core_scsi3_pr_seq_non_holder( case ACCESS_CONTROL_OUT: case INQUIRY: case LOG_SENSE: - case READ_MEDIA_SERIAL_NUMBER: + case SERVICE_ACTION_IN_12: case REPORT_LUNS: case REQUEST_SENSE: case PERSISTENT_RESERVE_IN: diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index ebe62afb957d..8d171ff77e75 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -852,7 +852,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) size = READ_CAP_LEN; cmd->execute_cmd = sbc_emulate_readcapacity; break; - case SERVICE_ACTION_IN: + case SERVICE_ACTION_IN_16: switch (cmd->t_task_cdb[1] & 0x1f) { case SAI_READ_CAPACITY_16: cmd->execute_cmd = sbc_emulate_readcapacity_16; |