arch: Mass conversion of smp_mb__*()
[deliverable/linux.git] / drivers / target / loopback / tcm_loop.c
index fadad7c5f635f01496acdc79d56a678a4e4fb1a6..73ab75ddaf42e9b3fc8e378cf3ae3669d1e040e8 100644 (file)
@@ -212,6 +212,10 @@ static void tcm_loop_submission_work(struct work_struct *work)
                se_cmd->se_cmd_flags |= SCF_BIDI;
 
        }
+
+       if (!scsi_prot_sg_count(sc) && scsi_get_prot_op(sc) != SCSI_PROT_NORMAL)
+               se_cmd->prot_pto = true;
+
        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,
                        scsi_bufflen(sc), tcm_loop_sam_attr(sc),
@@ -915,6 +919,11 @@ static void tcm_loop_queue_tm_rsp(struct se_cmd *se_cmd)
        wake_up(&tl_tmr->tl_tmr_wait);
 }
 
+static void tcm_loop_aborted_task(struct se_cmd *se_cmd)
+{
+       return;
+}
+
 static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba)
 {
        switch (tl_hba->tl_proto_id) {
@@ -942,7 +951,7 @@ static int tcm_loop_port_link(
        struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba;
 
        atomic_inc(&tl_tpg->tl_tpg_port_count);
-       smp_mb__after_atomic_inc();
+       smp_mb__after_atomic();
        /*
         * Add Linux/SCSI struct scsi_device by HCTL
         */
@@ -977,7 +986,7 @@ static void tcm_loop_port_unlink(
        scsi_device_put(sd);
 
        atomic_dec(&tl_tpg->tl_tpg_port_count);
-       smp_mb__after_atomic_dec();
+       smp_mb__after_atomic();
 
        pr_debug("TCM_Loop_ConfigFS: Port Unlink Successful\n");
 }
@@ -1009,7 +1018,7 @@ static int tcm_loop_make_nexus(
        /*
         * Initialize the struct se_session pointer
         */
-       tl_nexus->se_sess = transport_init_session();
+       tl_nexus->se_sess = transport_init_session(TARGET_PROT_ALL);
        if (IS_ERR(tl_nexus->se_sess)) {
                ret = PTR_ERR(tl_nexus->se_sess);
                goto out;
@@ -1483,6 +1492,7 @@ static int tcm_loop_register_configfs(void)
        fabric->tf_ops.queue_data_in = &tcm_loop_queue_data_in;
        fabric->tf_ops.queue_status = &tcm_loop_queue_status;
        fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp;
+       fabric->tf_ops.aborted_task = &tcm_loop_aborted_task;
 
        /*
         * Setup function pointers for generic logic in target_core_fabric_configfs.c
This page took 0.060744 seconds and 5 git commands to generate.