aboutsummaryrefslogtreecommitdiff
path: root/hw/megasas.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2012-11-12 15:42:42 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-11-12 16:42:56 +0100
commit4003e24fce1df84a2e8c992376ed2c294816c33c (patch)
tree4b6dd0139490160e039834dbf9bdbec443705123 /hw/megasas.c
parentaccfeb2dd32ece73350b06cee1b2403f47e86fe3 (diff)
megasas: Correct target/lun mapping
The structure to reference a logical drive has an unused field, which can be used to carry the lun ID. This enabled seabios to establish the proper target/LUN mapping. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/megasas.c')
-rw-r--r--hw/megasas.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/megasas.c b/hw/megasas.c
index b845ea7b48..291ff40403 100644
--- a/hw/megasas.c
+++ b/hw/megasas.c
@@ -1079,6 +1079,7 @@ static int megasas_dcmd_ld_get_list(MegasasState *s, MegasasCmd *cmd)
/* Logical device size is in blocks */
bdrv_get_geometry(conf->bs, &ld_size);
info.ld_list[num_ld_disks].ld.v.target_id = sdev->id;
+ info.ld_list[num_ld_disks].ld.v.lun_id = sdev->lun;
info.ld_list[num_ld_disks].state = MFI_LD_STATE_OPTIMAL;
info.ld_list[num_ld_disks].size = cpu_to_le64(ld_size);
num_ld_disks++;