@@ -389,9 +389,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
389
389
buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n "
390
390
buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n "
391
391
buf += " .close_session = " + fabric_mod_name + "_close_session,\n "
392
- buf += " .stop_session = " + fabric_mod_name + "_stop_session,\n "
393
- buf += " .fall_back_to_erl0 = " + fabric_mod_name + "_reset_nexus,\n "
394
- buf += " .sess_logged_in = " + fabric_mod_name + "_sess_logged_in,\n "
395
392
buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n "
396
393
buf += " .sess_get_initiator_sid = NULL,\n "
397
394
buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n "
@@ -402,7 +399,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
402
399
buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n "
403
400
buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n "
404
401
buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n "
405
- buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove ,\n "
402
+ buf += " .aborted_task = " + fabric_mod_name + "_aborted_task ,\n "
406
403
buf += " /*\n "
407
404
buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n "
408
405
buf += " */\n "
@@ -428,7 +425,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
428
425
buf += " /*\n "
429
426
buf += " * Register the top level struct config_item_type with TCM core\n "
430
427
buf += " */\n "
431
- buf += " fabric = target_fabric_configfs_init(THIS_MODULE, \" " + fabric_mod_name [ 4 :] + "\" );\n "
428
+ buf += " fabric = target_fabric_configfs_init(THIS_MODULE, \" " + fabric_mod_name + "\" );\n "
432
429
buf += " if (IS_ERR(fabric)) {\n "
433
430
buf += " printk(KERN_ERR \" target_fabric_configfs_init() failed\\ n\" );\n "
434
431
buf += " return PTR_ERR(fabric);\n "
@@ -595,7 +592,7 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
595
592
if re .search ('get_fabric_name' , fo ):
596
593
buf += "char *" + fabric_mod_name + "_get_fabric_name(void)\n "
597
594
buf += "{\n "
598
- buf += " return \" " + fabric_mod_name [ 4 :] + "\" ;\n "
595
+ buf += " return \" " + fabric_mod_name + "\" ;\n "
599
596
buf += "}\n \n "
600
597
bufi += "char *" + fabric_mod_name + "_get_fabric_name(void);\n "
601
598
continue
@@ -820,27 +817,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
820
817
buf += "}\n \n "
821
818
bufi += "void " + fabric_mod_name + "_close_session(struct se_session *);\n "
822
819
823
- if re .search ('stop_session\)\(' , fo ):
824
- buf += "void " + fabric_mod_name + "_stop_session(struct se_session *se_sess, int sess_sleep , int conn_sleep)\n "
825
- buf += "{\n "
826
- buf += " return;\n "
827
- buf += "}\n \n "
828
- bufi += "void " + fabric_mod_name + "_stop_session(struct se_session *, int, int);\n "
829
-
830
- if re .search ('fall_back_to_erl0\)\(' , fo ):
831
- buf += "void " + fabric_mod_name + "_reset_nexus(struct se_session *se_sess)\n "
832
- buf += "{\n "
833
- buf += " return;\n "
834
- buf += "}\n \n "
835
- bufi += "void " + fabric_mod_name + "_reset_nexus(struct se_session *);\n "
836
-
837
- if re .search ('sess_logged_in\)\(' , fo ):
838
- buf += "int " + fabric_mod_name + "_sess_logged_in(struct se_session *se_sess)\n "
839
- buf += "{\n "
840
- buf += " return 0;\n "
841
- buf += "}\n \n "
842
- bufi += "int " + fabric_mod_name + "_sess_logged_in(struct se_session *);\n "
843
-
844
820
if re .search ('sess_get_index\)\(' , fo ):
845
821
buf += "u32 " + fabric_mod_name + "_sess_get_index(struct se_session *se_sess)\n "
846
822
buf += "{\n "
@@ -898,19 +874,18 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
898
874
bufi += "int " + fabric_mod_name + "_queue_status(struct se_cmd *);\n "
899
875
900
876
if re .search ('queue_tm_rsp\)\(' , fo ):
901
- buf += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *se_cmd)\n "
877
+ buf += "void " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *se_cmd)\n "
902
878
buf += "{\n "
903
- buf += " return 0 ;\n "
879
+ buf += " return;\n "
904
880
buf += "}\n \n "
905
- bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n "
881
+ bufi += "void " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n "
906
882
907
- if re .search ('is_state_remove \)\(' , fo ):
908
- buf += "int " + fabric_mod_name + "_is_state_remove (struct se_cmd *se_cmd)\n "
883
+ if re .search ('aborted_task \)\(' , fo ):
884
+ buf += "void " + fabric_mod_name + "_aborted_task (struct se_cmd *se_cmd)\n "
909
885
buf += "{\n "
910
- buf += " return 0 ;\n "
886
+ buf += " return;\n "
911
887
buf += "}\n \n "
912
- bufi += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *);\n "
913
-
888
+ bufi += "void " + fabric_mod_name + "_aborted_task(struct se_cmd *);\n "
914
889
915
890
ret = p .write (buf )
916
891
if ret :
@@ -1018,11 +993,11 @@ def main(modname, proto_ident):
1018
993
tcm_mod_build_kbuild (fabric_mod_dir , fabric_mod_name )
1019
994
tcm_mod_build_kconfig (fabric_mod_dir , fabric_mod_name )
1020
995
1021
- input = raw_input ("Would you like to add " + fabric_mod_name + "to drivers/target/Makefile..? [yes,no]: " )
996
+ input = raw_input ("Would you like to add " + fabric_mod_name + " to drivers/target/Makefile..? [yes,no]: " )
1022
997
if input == "yes" or input == "y" :
1023
998
tcm_mod_add_kbuild (tcm_dir , fabric_mod_name )
1024
999
1025
- input = raw_input ("Would you like to add " + fabric_mod_name + "to drivers/target/Kconfig..? [yes,no]: " )
1000
+ input = raw_input ("Would you like to add " + fabric_mod_name + " to drivers/target/Kconfig..? [yes,no]: " )
1026
1001
if input == "yes" or input == "y" :
1027
1002
tcm_mod_add_kconfig (tcm_dir , fabric_mod_name )
1028
1003
0 commit comments