aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2011-11-28 20:54:28 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2011-12-14 06:37:37 -0500
commit77271de645631cb1dc4563d564f9dd5c214b5eed (patch)
tree8412e12c074eb81c4d4630f8831228b6ddd02673 /Documentation/target
parente0a53e70e8d519579d92c150606ece22333645cb (diff)
Documentation/target: Fix tcm_mod_builder.py build breakage
This patch fixes TFO->release_cmd() and removes legacy pack_lun() usage and new_cmd_failure when generating new TCM fabric skeleton from the tcm_mod_builder.py script. Reported-by: Stefan Bergstrand <stefan.bergstrand@sdsab.se> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'Documentation/target')
-rwxr-xr-xDocumentation/target/tcm_mod_builder.py23
1 files changed, 2 insertions, 21 deletions
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
index e2abb29fb993..520a923d7ac4 100755
--- a/Documentation/target/tcm_mod_builder.py
+++ b/Documentation/target/tcm_mod_builder.py
@@ -386,8 +386,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
386 buf += " .tpg_alloc_fabric_acl = " + fabric_mod_name + "_alloc_fabric_acl,\n" 386 buf += " .tpg_alloc_fabric_acl = " + fabric_mod_name + "_alloc_fabric_acl,\n"
387 buf += " .tpg_release_fabric_acl = " + fabric_mod_name + "_release_fabric_acl,\n" 387 buf += " .tpg_release_fabric_acl = " + fabric_mod_name + "_release_fabric_acl,\n"
388 buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n" 388 buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n"
389 buf += " .release_cmd_to_pool = " + fabric_mod_name + "_release_cmd,\n" 389 buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n"
390 buf += " .release_cmd_direct = " + fabric_mod_name + "_release_cmd,\n"
391 buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n" 390 buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n"
392 buf += " .close_session = " + fabric_mod_name + "_close_session,\n" 391 buf += " .close_session = " + fabric_mod_name + "_close_session,\n"
393 buf += " .stop_session = " + fabric_mod_name + "_stop_session,\n" 392 buf += " .stop_session = " + fabric_mod_name + "_stop_session,\n"
@@ -400,14 +399,12 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
400 buf += " .set_default_node_attributes = " + fabric_mod_name + "_set_default_node_attrs,\n" 399 buf += " .set_default_node_attributes = " + fabric_mod_name + "_set_default_node_attrs,\n"
401 buf += " .get_task_tag = " + fabric_mod_name + "_get_task_tag,\n" 400 buf += " .get_task_tag = " + fabric_mod_name + "_get_task_tag,\n"
402 buf += " .get_cmd_state = " + fabric_mod_name + "_get_cmd_state,\n" 401 buf += " .get_cmd_state = " + fabric_mod_name + "_get_cmd_state,\n"
403 buf += " .new_cmd_failure = " + fabric_mod_name + "_new_cmd_failure,\n"
404 buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n" 402 buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n"
405 buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n" 403 buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n"
406 buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n" 404 buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n"
407 buf += " .get_fabric_sense_len = " + fabric_mod_name + "_get_fabric_sense_len,\n" 405 buf += " .get_fabric_sense_len = " + fabric_mod_name + "_get_fabric_sense_len,\n"
408 buf += " .set_fabric_sense_len = " + fabric_mod_name + "_set_fabric_sense_len,\n" 406 buf += " .set_fabric_sense_len = " + fabric_mod_name + "_set_fabric_sense_len,\n"
409 buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n" 407 buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n"
410 buf += " .pack_lun = " + fabric_mod_name + "_pack_lun,\n"
411 buf += " /*\n" 408 buf += " /*\n"
412 buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n" 409 buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n"
413 buf += " */\n" 410 buf += " */\n"
@@ -806,7 +803,7 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
806 buf += "}\n\n" 803 buf += "}\n\n"
807 bufi += "u32 " + fabric_mod_name + "_tpg_get_inst_index(struct se_portal_group *);\n" 804 bufi += "u32 " + fabric_mod_name + "_tpg_get_inst_index(struct se_portal_group *);\n"
808 805
809 if re.search('release_cmd_to_pool', fo): 806 if re.search('\*release_cmd\)\(', fo):
810 buf += "void " + fabric_mod_name + "_release_cmd(struct se_cmd *se_cmd)\n" 807 buf += "void " + fabric_mod_name + "_release_cmd(struct se_cmd *se_cmd)\n"
811 buf += "{\n" 808 buf += "{\n"
812 buf += " return;\n" 809 buf += " return;\n"
@@ -890,13 +887,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
890 buf += "}\n\n" 887 buf += "}\n\n"
891 bufi += "int " + fabric_mod_name + "_get_cmd_state(struct se_cmd *);\n" 888 bufi += "int " + fabric_mod_name + "_get_cmd_state(struct se_cmd *);\n"
892 889
893 if re.search('new_cmd_failure\)\(', fo):
894 buf += "void " + fabric_mod_name + "_new_cmd_failure(struct se_cmd *se_cmd)\n"
895 buf += "{\n"
896 buf += " return;\n"
897 buf += "}\n\n"
898 bufi += "void " + fabric_mod_name + "_new_cmd_failure(struct se_cmd *);\n"
899
900 if re.search('queue_data_in\)\(', fo): 890 if re.search('queue_data_in\)\(', fo):
901 buf += "int " + fabric_mod_name + "_queue_data_in(struct se_cmd *se_cmd)\n" 891 buf += "int " + fabric_mod_name + "_queue_data_in(struct se_cmd *se_cmd)\n"
902 buf += "{\n" 892 buf += "{\n"
@@ -939,15 +929,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
939 buf += "}\n\n" 929 buf += "}\n\n"
940 bufi += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *);\n" 930 bufi += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *);\n"
941 931
942 if re.search('pack_lun\)\(', fo):
943 buf += "u64 " + fabric_mod_name + "_pack_lun(unsigned int lun)\n"
944 buf += "{\n"
945 buf += " WARN_ON(lun >= 256);\n"
946 buf += " /* Caller wants this byte-swapped */\n"
947 buf += " return cpu_to_le64((lun & 0xff) << 8);\n"
948 buf += "}\n\n"
949 bufi += "u64 " + fabric_mod_name + "_pack_lun(unsigned int);\n"
950
951 932
952 ret = p.write(buf) 933 ret = p.write(buf)
953 if ret: 934 if ret: