aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/tcm_qla2xxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/tcm_qla2xxx.c')
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 788c4fe2b0c9..68fb66fdb757 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -684,6 +684,20 @@ static void tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd)
684 qlt_xmit_tm_rsp(mcmd); 684 qlt_xmit_tm_rsp(mcmd);
685} 685}
686 686
687static void tcm_qla2xxx_aborted_task(struct se_cmd *se_cmd)
688{
689 struct qla_tgt_cmd *cmd = container_of(se_cmd,
690 struct qla_tgt_cmd, se_cmd);
691 struct scsi_qla_host *vha = cmd->vha;
692 struct qla_hw_data *ha = vha->hw;
693
694 if (!cmd->sg_mapped)
695 return;
696
697 pci_unmap_sg(ha->pdev, cmd->sg, cmd->sg_cnt, cmd->dma_data_direction);
698 cmd->sg_mapped = 0;
699}
700
687/* Local pointer to allocated TCM configfs fabric module */ 701/* Local pointer to allocated TCM configfs fabric module */
688struct target_fabric_configfs *tcm_qla2xxx_fabric_configfs; 702struct target_fabric_configfs *tcm_qla2xxx_fabric_configfs;
689struct target_fabric_configfs *tcm_qla2xxx_npiv_fabric_configfs; 703struct target_fabric_configfs *tcm_qla2xxx_npiv_fabric_configfs;
@@ -1468,7 +1482,7 @@ static int tcm_qla2xxx_check_initiator_node_acl(
1468 } 1482 }
1469 se_tpg = &tpg->se_tpg; 1483 se_tpg = &tpg->se_tpg;
1470 1484
1471 se_sess = transport_init_session(); 1485 se_sess = transport_init_session(TARGET_PROT_NORMAL);
1472 if (IS_ERR(se_sess)) { 1486 if (IS_ERR(se_sess)) {
1473 pr_err("Unable to initialize struct se_session\n"); 1487 pr_err("Unable to initialize struct se_session\n");
1474 return PTR_ERR(se_sess); 1488 return PTR_ERR(se_sess);
@@ -1877,6 +1891,7 @@ static struct target_core_fabric_ops tcm_qla2xxx_ops = {
1877 .queue_data_in = tcm_qla2xxx_queue_data_in, 1891 .queue_data_in = tcm_qla2xxx_queue_data_in,
1878 .queue_status = tcm_qla2xxx_queue_status, 1892 .queue_status = tcm_qla2xxx_queue_status,
1879 .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, 1893 .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp,
1894 .aborted_task = tcm_qla2xxx_aborted_task,
1880 /* 1895 /*
1881 * Setup function pointers for generic logic in 1896 * Setup function pointers for generic logic in
1882 * target_core_fabric_configfs.c 1897 * target_core_fabric_configfs.c
@@ -1926,6 +1941,7 @@ static struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = {
1926 .queue_data_in = tcm_qla2xxx_queue_data_in, 1941 .queue_data_in = tcm_qla2xxx_queue_data_in,
1927 .queue_status = tcm_qla2xxx_queue_status, 1942 .queue_status = tcm_qla2xxx_queue_status,
1928 .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, 1943 .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp,
1944 .aborted_task = tcm_qla2xxx_aborted_task,
1929 /* 1945 /*
1930 * Setup function pointers for generic logic in 1946 * Setup function pointers for generic logic in
1931 * target_core_fabric_configfs.c 1947 * target_core_fabric_configfs.c