From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXwB8-0000yA-77 for qemu-devel@nongnu.org; Mon, 12 Nov 2012 10:44:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXwB5-0003mD-4l for qemu-devel@nongnu.org; Mon, 12 Nov 2012 10:44:02 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:38059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXwB4-0003kt-Te for qemu-devel@nongnu.org; Mon, 12 Nov 2012 10:43:59 -0500 Received: by mail-pa0-f45.google.com with SMTP id fb10so4246865pad.4 for ; Mon, 12 Nov 2012 07:43:58 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50A11936.2030003@redhat.com> Date: Mon, 12 Nov 2012 16:43:50 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1352731362-19524-1-git-send-email-hare@suse.de> In-Reply-To: <1352731362-19524-1-git-send-email-hare@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] megasas: Correct target/lun mapping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: qemu-devel@nongnu.org, Gerd Hofmann 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 > Cc: Paolo Bonzini > Cc: Gerd Hofmann 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; > >