qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] megasas: Correct target/lun mapping


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] megasas: Correct target/lun mapping
Date: Mon, 12 Nov 2012 16:43:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

Il 12/11/2012 15:42, Hannes Reinecke ha scritto:
> 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.
> 
> Signed-off-by: Hannes Reinecke <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Gerd Hofmann <address@hidden>

Applied to scsi-next branch.

Paolo

> 
> diff --git a/hw/megasas.c b/hw/megasas.c
> index 7a2036e..395feb3 100644
> --- a/hw/megasas.c
> +++ b/hw/megasas.c
> @@ -1080,6 +1080,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++;
> diff --git a/hw/mfi.h b/hw/mfi.h
> index 436b690..cd8355b 100644
> --- a/hw/mfi.h
> +++ b/hw/mfi.h
> @@ -1085,7 +1085,7 @@ struct mfi_pd_list {
>  union mfi_ld_ref {
>      struct {
>          uint8_t target_id;
> -        uint8_t reserved;
> +        uint8_t lun_id;
>          uint16_t seq;
>      } v;
>      uint32_t ref;
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]