[stgt] [PATCH] Allow 14bit lun numbers.
Jan Vesely
jvesely at redhat.com
Wed Jun 12 10:16:35 CEST 2013
From: Jan Vesely <jvesely at redhat.com>
Only the topmost 2 bits are reserved, and flat space addressing allows
14bit luns.
Tested by creating a target with 1500 luns.
Signed-off-by: Jan Vesely <jvesely at redhat.com>
---
usr/spc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/spc.c b/usr/spc.c
index 074fdad..8b80fa8 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -348,7 +348,7 @@ int spc_report_luns(int host_no, struct scsi_cmd *cmd)
if (remain_len) {
lun = lu->lun;
lun = ((lun > 0xff) ? (0x1 << 30) : 0) |
- ((0x3ff & lun) << 16);
+ ((0x3fff & lun) << 16);
lun = __cpu_to_be64(lun << 32);
}
actual_len += spc_memcpy((uint8_t *)plun, &remain_len,
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list