]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[SCSI] virtio-scsi: fix LUNs greater than 255
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Oct 2012 15:25:47 +0000 (17:25 +0200)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 9 Oct 2012 10:23:28 +0000 (11:23 +0100)
commit9da5f5ac6affad8dd8cd80f5cca26e4335e1728b
tree7c7b94c39e1b932feaf60ee1ae6e2fad1d5d4a39
parent2e9c9dfde00a6466441e93033cf2c37f720bdacf
[SCSI] virtio-scsi: fix LUNs greater than 255

virtio-scsi needs to report LUNs greater than 256 using the "flat"
format.  Because the Linux SCSI layer just maps the SCSI LUN to
an u32, without any parsing, these end up in the range from 16640
to 32767.  Fix max_lun to account for the possibility that logical
unit numbers are encoded with the "flat" format.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/virtio_scsi.c