diff options
author | Marco Sanvido <marco@purestorage.com> | 2012-01-03 20:12:57 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-01-18 03:28:43 -0500 |
commit | 9e08e34e3735ae057eb3834da3570995811b7eb9 (patch) | |
tree | 2a062cdc55b523373690325b3a2b8686e367ac90 /drivers/target | |
parent | 48cfe37cc03f616e6c139796962e7ec677cde8a9 (diff) |
target: Use correct preempted registration sense code
The comments quote the right parts of the spec:
* d) Establish a unit attention condition for the
* initiator port associated with every I_T nexus
* that lost its registration other than the I_T
* nexus on which the PERSISTENT RESERVE OUT command
* was received, with the additional sense code set
* to REGISTRATIONS PREEMPTED.
and
* e) Establish a unit attention condition for the initiator
* port associated with every I_T nexus that lost its
* persistent reservation and/or registration, with the
* additional sense code set to REGISTRATIONS PREEMPTED;
but the actual code accidentally uses ASCQ_2AH_RESERVATIONS_PREEMPTED
instead of ASCQ_2AH_REGISTRATIONS_PREEMPTED. Fix this.
Signed-off-by: Marco Sanvido <marco@purestorage.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_pr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 429ad7291664..d14860ff2508 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c | |||
@@ -3120,7 +3120,7 @@ static int core_scsi3_pro_preempt( | |||
3120 | if (!calling_it_nexus) | 3120 | if (!calling_it_nexus) |
3121 | core_scsi3_ua_allocate(pr_reg_nacl, | 3121 | core_scsi3_ua_allocate(pr_reg_nacl, |
3122 | pr_res_mapped_lun, 0x2A, | 3122 | pr_res_mapped_lun, 0x2A, |
3123 | ASCQ_2AH_RESERVATIONS_PREEMPTED); | 3123 | ASCQ_2AH_REGISTRATIONS_PREEMPTED); |
3124 | } | 3124 | } |
3125 | spin_unlock(&pr_tmpl->registration_lock); | 3125 | spin_unlock(&pr_tmpl->registration_lock); |
3126 | /* | 3126 | /* |
@@ -3233,7 +3233,7 @@ static int core_scsi3_pro_preempt( | |||
3233 | * additional sense code set to REGISTRATIONS PREEMPTED; | 3233 | * additional sense code set to REGISTRATIONS PREEMPTED; |
3234 | */ | 3234 | */ |
3235 | core_scsi3_ua_allocate(pr_reg_nacl, pr_res_mapped_lun, 0x2A, | 3235 | core_scsi3_ua_allocate(pr_reg_nacl, pr_res_mapped_lun, 0x2A, |
3236 | ASCQ_2AH_RESERVATIONS_PREEMPTED); | 3236 | ASCQ_2AH_REGISTRATIONS_PREEMPTED); |
3237 | } | 3237 | } |
3238 | spin_unlock(&pr_tmpl->registration_lock); | 3238 | spin_unlock(&pr_tmpl->registration_lock); |
3239 | /* | 3239 | /* |