mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
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>
This commit is contained in:
parent
accfeb2dd3
commit
4003e24fce
2 changed files with 2 additions and 1 deletions
|
@ -1079,6 +1079,7 @@ static int megasas_dcmd_ld_get_list(MegasasState *s, MegasasCmd *cmd)
|
||||||
/* Logical device size is in blocks */
|
/* Logical device size is in blocks */
|
||||||
bdrv_get_geometry(conf->bs, &ld_size);
|
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.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].state = MFI_LD_STATE_OPTIMAL;
|
||||||
info.ld_list[num_ld_disks].size = cpu_to_le64(ld_size);
|
info.ld_list[num_ld_disks].size = cpu_to_le64(ld_size);
|
||||||
num_ld_disks++;
|
num_ld_disks++;
|
||||||
|
|
2
hw/mfi.h
2
hw/mfi.h
|
@ -1085,7 +1085,7 @@ struct mfi_pd_list {
|
||||||
union mfi_ld_ref {
|
union mfi_ld_ref {
|
||||||
struct {
|
struct {
|
||||||
uint8_t target_id;
|
uint8_t target_id;
|
||||||
uint8_t reserved;
|
uint8_t lun_id;
|
||||||
uint16_t seq;
|
uint16_t seq;
|
||||||
} v;
|
} v;
|
||||||
uint32_t ref;
|
uint32_t ref;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue