blob: d5876e17d3fb0670cce3cbb9e6664797114097dd [file] [log] [blame]
Nicholas Bellingerc66ac9d2010-12-17 11:11:26 -08001#ifndef TARGET_CORE_TMR_H
2#define TARGET_CORE_TMR_H
3
Nicholas Bellinger5c6cd612011-03-14 04:06:04 -07004/* fabric independent task management function values */
5enum tcm_tmreq_table {
6 TMR_ABORT_TASK = 1,
7 TMR_ABORT_TASK_SET = 2,
8 TMR_CLEAR_ACA = 3,
9 TMR_CLEAR_TASK_SET = 4,
10 TMR_LUN_RESET = 5,
11 TMR_TARGET_WARM_RESET = 6,
12 TMR_TARGET_COLD_RESET = 7,
13 TMR_FABRIC_TMR = 255,
14};
Nicholas Bellingerc66ac9d2010-12-17 11:11:26 -080015
Nicholas Bellinger5c6cd612011-03-14 04:06:04 -070016/* fabric independent task management response values */
17enum tcm_tmrsp_table {
18 TMR_FUNCTION_COMPLETE = 0,
19 TMR_TASK_DOES_NOT_EXIST = 1,
20 TMR_LUN_DOES_NOT_EXIST = 2,
21 TMR_TASK_STILL_ALLEGIANT = 3,
22 TMR_TASK_FAILOVER_NOT_SUPPORTED = 4,
23 TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 5,
24 TMR_FUNCTION_AUTHORIZATION_FAILED = 6,
25 TMR_FUNCTION_REJECTED = 255,
26};
Nicholas Bellingerc66ac9d2010-12-17 11:11:26 -080027
28extern struct kmem_cache *se_tmr_req_cache;
29
Roland Dreierdd503a52011-10-06 09:56:16 -070030extern struct se_tmr_req *core_tmr_alloc_req(struct se_cmd *, void *, u8, gfp_t);
Nicholas Bellingerc66ac9d2010-12-17 11:11:26 -080031extern void core_tmr_release_req(struct se_tmr_req *);
32extern int core_tmr_lun_reset(struct se_device *, struct se_tmr_req *,
33 struct list_head *, struct se_cmd *);
34
35#endif /* TARGET_CORE_TMR_H */