From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRP60-0003T2-5I for qemu-devel@nongnu.org; Fri, 18 Nov 2011 09:07:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RRP5r-0003fX-VV for qemu-devel@nongnu.org; Fri, 18 Nov 2011 09:07:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRP5r-0003ev-NH for qemu-devel@nongnu.org; Fri, 18 Nov 2011 09:07:03 -0500 Message-ID: <4EC66741.4010001@redhat.com> Date: Fri, 18 Nov 2011 15:10:09 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1321363722-23687-1-git-send-email-pbonzini@redhat.com> <1321374998-18214-1-git-send-email-pbonzini@redhat.com> <4EC65126.9000206@redhat.com> <4EC65F58.6060500@suse.de> <4EC664AD.9080307@redhat.com> In-Reply-To: <4EC664AD.9080307@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1.0 v2] scsi: fix fw path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: =?ISO-8859-15?Q?Andreas_F=E4rber?= , qemu-devel@nongnu.org Am 18.11.2011 14:59, schrieb Paolo Bonzini: > On 11/18/2011 02:36 PM, Andreas F=E4rber wrote: >> Am 18.11.2011 13:35, schrieb Kevin Wolf: >>> Am 15.11.2011 17:36, schrieb Paolo Bonzini: >>>> The pre-1.0 firmware path for SCSI devices already included the LUN >>>> using the suffix argument to add_boot_device_path. I missed that wh= en >>>> making channel and LUN customizable. Avoid that it is included twic= e, and >>>> convert the colons to commas for consistency with other kinds of dev= ices >>>> >>>> Signed-off-by: Paolo Bonzini >>>> --- >>>> v1->v2: include scsi-disk hunk too >>> >>> Thanks, applied to the block-stable branch (for 1.0) >> >> Did you guys check the consistency part against OpenFirmware syntax? I >> didn't get around to that yet. >=20 > No, I wasn't aware about the existence of an OF spec for that (only tha= t=20 > fw_dev_path design was roughly corresponding to OF). Based on=20 > http://www.openfirmware.org/ofwg/practice/spi/spi1_0.ps it looks like=20 > this (followup) patch would be preferrable: >=20 > diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c > index b4e6e29..4c33583 100644 > --- a/hw/scsi-bus.c > +++ b/hw/scsi-bus.c > @@ -1304,7 +1304,7 @@ static char *scsibus_get_fw_dev_path(DeviceState = *dev) > SCSIDevice *d =3D DO_UPCAST(SCSIDevice, qdev, dev); > char path[100]; >=20 > - snprintf(path, sizeof(path), "%s@%d,%d,%d", qdev_fw_name(dev), > + snprintf(path, sizeof(path), "scsi@%x/%s@%x,%x", qdev_fw_name(dev)= , > d->channel, d->id, d->lun); The parameter order doesn't look right. >=20 > return strdup(path); >=20 > Kevin, how do you want to proceed? Whatever you think is best. I already included the other patch in the pull request, so any other change would have to be on top. Kevin