aboutsummaryrefslogtreecommitdiff
path: root/board-qemu
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-07-18 14:11:04 +0200
committerAlexey Kardashevskiy <aik@ozlabs.ru>2017-07-19 13:25:33 +1000
commitf72a37713fea47da625238f032c245f40b987a28 (patch)
tree6a7ddafbecaca4232a6b107d679739a5501a4565 /board-qemu
parent4cd2f07ee0f92f652d778d29e9f6ba9254ea90d9 (diff)
downloadSLOF-f72a37713fea47da625238f032c245f40b987a28.zip
SLOF-f72a37713fea47da625238f032c245f40b987a28.tar.gz
SLOF-f72a37713fea47da625238f032c245f40b987a28.tar.bz2
virtio-scsi: Allow LUNs bigger than 255
The virtio-scsi device expects LUNs according to a "Single level LUN structure" as defined in the "SCSI Architecture Model" specification. SLOF currently only uses the "Single level LUN structure using peripheral device addressing method" which provides the possibility to specify up to 256 different LUNs. To be able to use LUNs greater than 255, the "Single level LUN structure using flat space addressing method" has to be used instead. This can be done by setting the top-most bits to "01" instead of "00" in the first byte of the two LUN bytes. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1431584 Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'board-qemu')
-rw-r--r--board-qemu/slof/virtio-scsi.fs1
1 files changed, 1 insertions, 0 deletions
diff --git a/board-qemu/slof/virtio-scsi.fs b/board-qemu/slof/virtio-scsi.fs
index d52741e..d7ce3cc 100644
--- a/board-qemu/slof/virtio-scsi.fs
+++ b/board-qemu/slof/virtio-scsi.fs
@@ -144,6 +144,7 @@ scsi-open
;
: dev-generate-srplun ( target lun-id -- srplun )
+ dup ff > IF 4000 or THEN \ Use the LUN "flat space addressing method"
swap 0100 or 10 << or 20 <<
;