From 1d20bb6147954d4fbd337a3d1b40c7eeae254cd7 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Thu, 21 Jul 2011 04:41:48 +0000 Subject: target: ->map_task_SG conversion to ->map_control_SG and ->map_data_SG This patch breaks up the ->map_task_SG() backend call into two seperate ->map_control_SG() and ->map_data_SG() in order to better address IBLOCK and pSCSI. IBLOCK only allocates bios for ->map_data_SG(), and pSCSI will allocate a struct request for both cases. This patch fixes incorrect usage of ->map_task_SG() for all se_cmd descriptors in transport_generic_new_cmd() by moving the call into it's proper location directly inside of transport_allocate_data_tasks() Reported-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/target') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 740957655a6..54af39d8e3f 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -239,9 +239,13 @@ struct se_subsystem_api { */ int (*cdb_none)(struct se_task *); /* - * For SCF_SCSI_DATA_SG_IO_CDB and SCF_SCSI_CONTROL_SG_IO_CDB + * For SCF_SCSI_DATA_SG_IO_CDB */ - int (*map_task_SG)(struct se_task *); + int (*map_data_SG)(struct se_task *); + /* + * For SCF_SCSI_CONTROL_SG_IO_CDB + */ + int (*map_control_SG)(struct se_task *); /* * attach_hba(): */ -- cgit v1.2.3-70-g09d2