diff options
author | Hannes Reinecke <hare@suse.de> | 2015-06-11 10:01:28 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-06-23 00:27:39 -0700 |
commit | b5aafb16ebdb713e9e5ac60db2940fe4baf6328f (patch) | |
tree | 2643f7105dc8f26cab778189db985edfedcb7108 /drivers/target | |
parent | 3dd348fcaa407181585fcadc04b0cac6e31f9be0 (diff) | |
download | linux-b5aafb16ebdb713e9e5ac60db2940fe4baf6328f.tar.bz2 |
target: Send UA upon LUN RESET tmr completion
SAM mandates that an BUS DEVICE RESET FUNCTION OCCURRED
UA needs to be send after a LUN RESET tmr has completed.
(Update to use target_ua_allocate_lun - hch)
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_transport.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 0364534f8d46..e5088c059b4f 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2983,6 +2983,11 @@ static void target_tmr_work(struct work_struct *work) ret = core_tmr_lun_reset(dev, tmr, NULL, NULL); tmr->response = (!ret) ? TMR_FUNCTION_COMPLETE : TMR_FUNCTION_REJECTED; + if (tmr->response == TMR_FUNCTION_COMPLETE) { + target_ua_allocate_lun(cmd->se_sess->se_node_acl, + cmd->orig_fe_lun, 0x29, + ASCQ_29H_BUS_DEVICE_RESET_FUNCTION_OCCURRED); + } break; case TMR_TARGET_WARM_RESET: tmr->response = TMR_FUNCTION_REJECTED; |