diff options
-rw-r--r-- | drivers/target/target_core_transport.c | 19 | ||||
-rw-r--r-- | include/target/target_core_tmr.h | 52 |
2 files changed, 29 insertions, 42 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 80df4056f9f1..20ab27cb3e45 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -5832,31 +5832,26 @@ int transport_generic_do_tmr(struct se_cmd *cmd) | |||
5832 | int ret; | 5832 | int ret; |
5833 | 5833 | ||
5834 | switch (tmr->function) { | 5834 | switch (tmr->function) { |
5835 | case ABORT_TASK: | 5835 | case TMR_ABORT_TASK: |
5836 | ref_cmd = tmr->ref_cmd; | 5836 | ref_cmd = tmr->ref_cmd; |
5837 | tmr->response = TMR_FUNCTION_REJECTED; | 5837 | tmr->response = TMR_FUNCTION_REJECTED; |
5838 | break; | 5838 | break; |
5839 | case ABORT_TASK_SET: | 5839 | case TMR_ABORT_TASK_SET: |
5840 | case CLEAR_ACA: | 5840 | case TMR_CLEAR_ACA: |
5841 | case CLEAR_TASK_SET: | 5841 | case TMR_CLEAR_TASK_SET: |
5842 | tmr->response = TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED; | 5842 | tmr->response = TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED; |
5843 | break; | 5843 | break; |
5844 | case LUN_RESET: | 5844 | case TMR_LUN_RESET: |
5845 | ret = core_tmr_lun_reset(dev, tmr, NULL, NULL); | 5845 | ret = core_tmr_lun_reset(dev, tmr, NULL, NULL); |
5846 | tmr->response = (!ret) ? TMR_FUNCTION_COMPLETE : | 5846 | tmr->response = (!ret) ? TMR_FUNCTION_COMPLETE : |
5847 | TMR_FUNCTION_REJECTED; | 5847 | TMR_FUNCTION_REJECTED; |
5848 | break; | 5848 | break; |
5849 | #if 0 | 5849 | case TMR_TARGET_WARM_RESET: |
5850 | case TARGET_WARM_RESET: | ||
5851 | transport_generic_host_reset(dev->se_hba); | ||
5852 | tmr->response = TMR_FUNCTION_REJECTED; | 5850 | tmr->response = TMR_FUNCTION_REJECTED; |
5853 | break; | 5851 | break; |
5854 | case TARGET_COLD_RESET: | 5852 | case TMR_TARGET_COLD_RESET: |
5855 | transport_generic_host_reset(dev->se_hba); | ||
5856 | transport_generic_cold_reset(dev->se_hba); | ||
5857 | tmr->response = TMR_FUNCTION_REJECTED; | 5853 | tmr->response = TMR_FUNCTION_REJECTED; |
5858 | break; | 5854 | break; |
5859 | #endif | ||
5860 | default: | 5855 | default: |
5861 | printk(KERN_ERR "Uknown TMR function: 0x%02x.\n", | 5856 | printk(KERN_ERR "Uknown TMR function: 0x%02x.\n", |
5862 | tmr->function); | 5857 | tmr->function); |
diff --git a/include/target/target_core_tmr.h b/include/target/target_core_tmr.h index 6c8248bc2c66..bd5596807478 100644 --- a/include/target/target_core_tmr.h +++ b/include/target/target_core_tmr.h | |||
@@ -1,37 +1,29 @@ | |||
1 | #ifndef TARGET_CORE_TMR_H | 1 | #ifndef TARGET_CORE_TMR_H |
2 | #define TARGET_CORE_TMR_H | 2 | #define TARGET_CORE_TMR_H |
3 | 3 | ||
4 | /* task management function values */ | 4 | /* fabric independent task management function values */ |
5 | #ifdef ABORT_TASK | 5 | enum tcm_tmreq_table { |
6 | #undef ABORT_TASK | 6 | TMR_ABORT_TASK = 1, |
7 | #endif /* ABORT_TASK */ | 7 | TMR_ABORT_TASK_SET = 2, |
8 | #define ABORT_TASK 1 | 8 | TMR_CLEAR_ACA = 3, |
9 | #ifdef ABORT_TASK_SET | 9 | TMR_CLEAR_TASK_SET = 4, |
10 | #undef ABORT_TASK_SET | 10 | TMR_LUN_RESET = 5, |
11 | #endif /* ABORT_TASK_SET */ | 11 | TMR_TARGET_WARM_RESET = 6, |
12 | #define ABORT_TASK_SET 2 | 12 | TMR_TARGET_COLD_RESET = 7, |
13 | #ifdef CLEAR_ACA | 13 | TMR_FABRIC_TMR = 255, |
14 | #undef CLEAR_ACA | 14 | }; |
15 | #endif /* CLEAR_ACA */ | ||
16 | #define CLEAR_ACA 3 | ||
17 | #ifdef CLEAR_TASK_SET | ||
18 | #undef CLEAR_TASK_SET | ||
19 | #endif /* CLEAR_TASK_SET */ | ||
20 | #define CLEAR_TASK_SET 4 | ||
21 | #define LUN_RESET 5 | ||
22 | #define TARGET_WARM_RESET 6 | ||
23 | #define TARGET_COLD_RESET 7 | ||
24 | #define TASK_REASSIGN 8 | ||
25 | 15 | ||
26 | /* task management response values */ | 16 | /* fabric independent task management response values */ |
27 | #define TMR_FUNCTION_COMPLETE 0 | 17 | enum tcm_tmrsp_table { |
28 | #define TMR_TASK_DOES_NOT_EXIST 1 | 18 | TMR_FUNCTION_COMPLETE = 0, |
29 | #define TMR_LUN_DOES_NOT_EXIST 2 | 19 | TMR_TASK_DOES_NOT_EXIST = 1, |
30 | #define TMR_TASK_STILL_ALLEGIANT 3 | 20 | TMR_LUN_DOES_NOT_EXIST = 2, |
31 | #define TMR_TASK_FAILOVER_NOT_SUPPORTED 4 | 21 | TMR_TASK_STILL_ALLEGIANT = 3, |
32 | #define TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED 5 | 22 | TMR_TASK_FAILOVER_NOT_SUPPORTED = 4, |
33 | #define TMR_FUNCTION_AUTHORIZATION_FAILED 6 | 23 | TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 5, |
34 | #define TMR_FUNCTION_REJECTED 255 | 24 | TMR_FUNCTION_AUTHORIZATION_FAILED = 6, |
25 | TMR_FUNCTION_REJECTED = 255, | ||
26 | }; | ||
35 | 27 | ||
36 | extern struct kmem_cache *se_tmr_req_cache; | 28 | extern struct kmem_cache *se_tmr_req_cache; |
37 | 29 | ||