From 5cc78efff5b36d544f6a0d62bdf7534e7eaa96fc Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 2 Dec 2011 02:46:33 +0000 Subject: [PATCH] According to SPC-4 in the PERSISTENT RESERVE IN full status descriptor the format of byte 13 is defined as follows: - The most significant four bits are SCOPE field. - The least significant four bits are the TYPE field. Make sure that that byte is filled in according to the specification. BSD-Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3950 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_pres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/scst_pres.c b/scst/src/scst_pres.c index 44b145de6..a195cb802 100644 --- a/scst/src/scst_pres.c +++ b/scst/src/scst_pres.c @@ -2770,7 +2770,7 @@ void scst_pr_read_full_status(struct scst_cmd *cmd, uint8_t *buffer, if (dev->pr_is_set && scst_pr_is_holder(dev, reg)) { buffer[offset + 12] = 1; - buffer[offset + 13] = (dev->pr_scope << 8) | dev->pr_type; + buffer[offset + 13] = (dev->pr_scope << 4) | dev->pr_type; } put_unaligned_be16(reg->rel_tgt_id,