aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-10-18 06:57:00 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2011-10-23 23:21:56 -0400
commit7c1c6af37af69a4ac4a6485c968496d257245b5d (patch)
tree7837a4ec24de8dc4c373810137250c7e75d9f24b /drivers/target
parentdbc5623eb2898f5b5dcdc0b16077bb3f58629c78 (diff)
target: remove the task_sg_bidi field se_task and pSCSI BIDI support
This field is never used given that BIDI handling happens at the command and not the task level. Remove it and the dead code in pscsi that tries to work on it. It also prevents pSCSI passthrough for the two currently enabled BIDI commands now that task->task_sg_bidi support has been removed. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_pscsi.c32
-rw-r--r--drivers/target/target_core_transport.c18
2 files changed, 5 insertions, 45 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 936b9fec4cca..dad671dee9e9 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -1095,32 +1095,6 @@ static int pscsi_do_task(struct se_task *task)
1095 pr_err("pSCSI: blk_make_request() failed\n"); 1095 pr_err("pSCSI: blk_make_request() failed\n");
1096 goto fail; 1096 goto fail;
1097 } 1097 }
1098
1099 if (task->task_sg_bidi) {
1100 /*
1101 * If present, set up the extra BIDI-COMMAND SCSI READ
1102 * struct request and payload.
1103 */
1104 ret = pscsi_map_sg(task, task->task_sg_bidi, &hbio);
1105 if (ret < 0) {
1106 /* XXX: free the main request? */
1107 return PYX_TRANSPORT_LU_COMM_FAILURE;
1108 }
1109
1110 /*
1111 * Setup the secondary pt->pscsi_req->next_rq used for the extra
1112 * BIDI READ payload.
1113 */
1114 req->next_rq = blk_make_request(pdv->pdv_sd->request_queue,
1115 hbio, GFP_KERNEL);
1116 if (!req) {
1117 pr_err("pSCSI: blk_make_request() failed for BIDI\n");
1118 /* XXX: free the main request? */
1119 goto fail;
1120 }
1121
1122 req->next_rq->cmd_type = REQ_TYPE_BLOCK_PC;
1123 }
1124 } 1098 }
1125 1099
1126 req->cmd_type = REQ_TYPE_BLOCK_PC; 1100 req->cmd_type = REQ_TYPE_BLOCK_PC;
@@ -1240,12 +1214,6 @@ static void pscsi_req_done(struct request *req, int uptodate)
1240 pt->pscsi_resid = req->resid_len; 1214 pt->pscsi_resid = req->resid_len;
1241 1215
1242 pscsi_process_SAM_status(task, pt); 1216 pscsi_process_SAM_status(task, pt);
1243 /*
1244 * Release BIDI-READ if present
1245 */
1246 if (req->next_rq != NULL)
1247 __blk_put_request(req->q, req->next_rq);
1248
1249 __blk_put_request(req->q, req); 1217 __blk_put_request(req->q, req);
1250} 1218}
1251 1219
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 06305beb61dd..624d86ea083b 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2871,13 +2871,10 @@ static int transport_generic_cmd_sequencer(
2871 size = transport_get_size(sectors, cdb, cmd); 2871 size = transport_get_size(sectors, cdb, cmd);
2872 cmd->t_task_lba = transport_lba_32(cdb); 2872 cmd->t_task_lba = transport_lba_32(cdb);
2873 cmd->se_cmd_flags |= SCF_SCSI_DATA_SG_IO_CDB; 2873 cmd->se_cmd_flags |= SCF_SCSI_DATA_SG_IO_CDB;
2874 passthrough = (dev->transport->transport_type == 2874
2875 TRANSPORT_PLUGIN_PHBA_PDEV); 2875 if (dev->transport->transport_type ==
2876 /* 2876 TRANSPORT_PLUGIN_PHBA_PDEV)
2877 * Skip the remaining assignments for TCM/PSCSI passthrough 2877 goto out_unsupported_cdb;
2878 */
2879 if (passthrough)
2880 break;
2881 /* 2878 /*
2882 * Setup BIDI XOR callback to be run after I/O completion. 2879 * Setup BIDI XOR callback to be run after I/O completion.
2883 */ 2880 */
@@ -2906,12 +2903,8 @@ static int transport_generic_cmd_sequencer(
2906 cmd->t_task_lba = transport_lba_64_ext(cdb); 2903 cmd->t_task_lba = transport_lba_64_ext(cdb);
2907 cmd->se_cmd_flags |= SCF_SCSI_DATA_SG_IO_CDB; 2904 cmd->se_cmd_flags |= SCF_SCSI_DATA_SG_IO_CDB;
2908 2905
2909 /*
2910 * Skip the remaining assignments for TCM/PSCSI passthrough
2911 */
2912 if (passthrough) 2906 if (passthrough)
2913 break; 2907 goto out_unsupported_cdb;
2914
2915 /* 2908 /*
2916 * Setup BIDI XOR callback to be run during after I/O 2909 * Setup BIDI XOR callback to be run during after I/O
2917 * completion. 2910 * completion.
@@ -3562,7 +3555,6 @@ static void transport_free_dev_tasks(struct se_cmd *cmd)
3562 */ 3555 */
3563 del_timer_sync(&task->task_timer); 3556 del_timer_sync(&task->task_timer);
3564 3557
3565 kfree(task->task_sg_bidi);
3566 kfree(task->task_sg); 3558 kfree(task->task_sg);
3567 3559
3568 list_del(&task->t_list); 3560 list_del(&task->t_list);