WIP FPC-III support
[linux/fpc-iii.git] / drivers / target / iscsi / iscsi_target.h
blob7409ce2a66078f75ae3e130577ec29f5e21ddc18
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef ISCSI_TARGET_H
3 #define ISCSI_TARGET_H
5 #include <linux/types.h>
6 #include <linux/spinlock.h>
8 struct iscsi_cmd;
9 struct iscsi_conn;
10 struct iscsi_np;
11 struct iscsi_portal_group;
12 struct iscsi_session;
13 struct iscsi_tpg_np;
14 struct kref;
15 struct sockaddr_storage;
17 extern struct iscsi_tiqn *iscsit_get_tiqn_for_login(unsigned char *);
18 extern struct iscsi_tiqn *iscsit_get_tiqn(unsigned char *, int);
19 extern void iscsit_put_tiqn_for_login(struct iscsi_tiqn *);
20 extern struct iscsi_tiqn *iscsit_add_tiqn(unsigned char *);
21 extern void iscsit_del_tiqn(struct iscsi_tiqn *);
22 extern int iscsit_access_np(struct iscsi_np *, struct iscsi_portal_group *);
23 extern void iscsit_login_kref_put(struct kref *);
24 extern int iscsit_deaccess_np(struct iscsi_np *, struct iscsi_portal_group *,
25 struct iscsi_tpg_np *);
26 extern bool iscsit_check_np_match(struct sockaddr_storage *,
27 struct iscsi_np *, int);
28 extern struct iscsi_np *iscsit_add_np(struct sockaddr_storage *,
29 int);
30 extern int iscsit_reset_np_thread(struct iscsi_np *, struct iscsi_tpg_np *,
31 struct iscsi_portal_group *, bool);
32 extern int iscsit_del_np(struct iscsi_np *);
33 extern int iscsit_reject_cmd(struct iscsi_cmd *cmd, u8, unsigned char *);
34 extern void iscsit_set_unsolicited_dataout(struct iscsi_cmd *);
35 extern int iscsit_logout_closesession(struct iscsi_cmd *, struct iscsi_conn *);
36 extern int iscsit_logout_closeconnection(struct iscsi_cmd *, struct iscsi_conn *);
37 extern int iscsit_logout_removeconnforrecovery(struct iscsi_cmd *, struct iscsi_conn *);
38 extern int iscsit_send_async_msg(struct iscsi_conn *, u16, u8, u8);
39 extern int iscsit_build_r2ts_for_cmd(struct iscsi_conn *, struct iscsi_cmd *, bool recovery);
40 extern void iscsit_thread_get_cpumask(struct iscsi_conn *);
41 extern int iscsi_target_tx_thread(void *);
42 extern int iscsi_target_rx_thread(void *);
43 extern int iscsit_close_connection(struct iscsi_conn *);
44 extern int iscsit_close_session(struct iscsi_session *);
45 extern void iscsit_fail_session(struct iscsi_session *);
46 extern void iscsit_stop_session(struct iscsi_session *, int, int);
47 extern int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *, int);
49 extern struct iscsit_global *iscsit_global;
50 extern const struct target_core_fabric_ops iscsi_ops;
52 extern struct kmem_cache *lio_dr_cache;
53 extern struct kmem_cache *lio_ooo_cache;
54 extern struct kmem_cache *lio_qr_cache;
55 extern struct kmem_cache *lio_r2t_cache;
57 extern struct ida sess_ida;
58 extern struct mutex auth_id_lock;
60 #endif /*** ISCSI_TARGET_H ***/