diff options
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_backend.h | 22 | ||||
-rw-r--r-- | include/target/target_core_base.h | 4 |
2 files changed, 6 insertions, 20 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 80d9e486e33e..514b52019380 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
@@ -3,18 +3,7 @@ | |||
3 | 3 | ||
4 | #define TRANSPORT_FLAG_PASSTHROUGH 1 | 4 | #define TRANSPORT_FLAG_PASSTHROUGH 1 |
5 | 5 | ||
6 | struct target_backend_cits { | 6 | struct target_backend_ops { |
7 | struct config_item_type tb_dev_cit; | ||
8 | struct config_item_type tb_dev_attrib_cit; | ||
9 | struct config_item_type tb_dev_pr_cit; | ||
10 | struct config_item_type tb_dev_wwn_cit; | ||
11 | struct config_item_type tb_dev_alua_tg_pt_gps_cit; | ||
12 | struct config_item_type tb_dev_stat_cit; | ||
13 | }; | ||
14 | |||
15 | struct se_subsystem_api { | ||
16 | struct list_head sub_api_list; | ||
17 | |||
18 | char name[16]; | 7 | char name[16]; |
19 | char inquiry_prod[16]; | 8 | char inquiry_prod[16]; |
20 | char inquiry_rev[4]; | 9 | char inquiry_rev[4]; |
@@ -52,7 +41,7 @@ struct se_subsystem_api { | |||
52 | int (*format_prot)(struct se_device *); | 41 | int (*format_prot)(struct se_device *); |
53 | void (*free_prot)(struct se_device *); | 42 | void (*free_prot)(struct se_device *); |
54 | 43 | ||
55 | struct target_backend_cits tb_cits; | 44 | struct configfs_attribute **tb_dev_attrib_attrs; |
56 | }; | 45 | }; |
57 | 46 | ||
58 | struct sbc_ops { | 47 | struct sbc_ops { |
@@ -64,8 +53,8 @@ struct sbc_ops { | |||
64 | sense_reason_t (*execute_unmap)(struct se_cmd *cmd); | 53 | sense_reason_t (*execute_unmap)(struct se_cmd *cmd); |
65 | }; | 54 | }; |
66 | 55 | ||
67 | int transport_subsystem_register(struct se_subsystem_api *); | 56 | int transport_backend_register(const struct target_backend_ops *); |
68 | void transport_subsystem_release(struct se_subsystem_api *); | 57 | void target_backend_unregister(const struct target_backend_ops *); |
69 | 58 | ||
70 | void target_complete_cmd(struct se_cmd *, u8); | 59 | void target_complete_cmd(struct se_cmd *, u8); |
71 | void target_complete_cmd_with_length(struct se_cmd *, u8, int); | 60 | void target_complete_cmd_with_length(struct se_cmd *, u8, int); |
@@ -103,9 +92,6 @@ sense_reason_t transport_generic_map_mem_to_cmd(struct se_cmd *, | |||
103 | 92 | ||
104 | bool target_lun_is_rdonly(struct se_cmd *); | 93 | bool target_lun_is_rdonly(struct se_cmd *); |
105 | 94 | ||
106 | /* From target_core_configfs.c to setup default backend config_item_types */ | ||
107 | void target_core_setup_sub_cits(struct se_subsystem_api *); | ||
108 | |||
109 | /* attribute helpers from target_core_device.c for backend drivers */ | 95 | /* attribute helpers from target_core_device.c for backend drivers */ |
110 | bool se_dev_check_wce(struct se_device *); | 96 | bool se_dev_check_wce(struct se_device *); |
111 | int se_dev_set_max_unmap_lba_count(struct se_device *, u32); | 97 | int se_dev_set_max_unmap_lba_count(struct se_device *, u32); |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 78ed2a83838c..03e2ee8f8337 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -797,7 +797,7 @@ struct se_device { | |||
797 | #define SE_UDEV_PATH_LEN 512 /* must be less than PAGE_SIZE */ | 797 | #define SE_UDEV_PATH_LEN 512 /* must be less than PAGE_SIZE */ |
798 | unsigned char udev_path[SE_UDEV_PATH_LEN]; | 798 | unsigned char udev_path[SE_UDEV_PATH_LEN]; |
799 | /* Pointer to template of function pointers for transport */ | 799 | /* Pointer to template of function pointers for transport */ |
800 | struct se_subsystem_api *transport; | 800 | const struct target_backend_ops *transport; |
801 | /* Linked list for struct se_hba struct se_device list */ | 801 | /* Linked list for struct se_hba struct se_device list */ |
802 | struct list_head dev_list; | 802 | struct list_head dev_list; |
803 | struct se_lun xcopy_lun; | 803 | struct se_lun xcopy_lun; |
@@ -819,7 +819,7 @@ struct se_hba { | |||
819 | spinlock_t device_lock; | 819 | spinlock_t device_lock; |
820 | struct config_group hba_group; | 820 | struct config_group hba_group; |
821 | struct mutex hba_access_mutex; | 821 | struct mutex hba_access_mutex; |
822 | struct se_subsystem_api *transport; | 822 | struct target_backend *backend; |
823 | }; | 823 | }; |
824 | 824 | ||
825 | struct scsi_port_stats { | 825 | struct scsi_port_stats { |