From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuOKh-0004h1-Bs for qemu-devel@nongnu.org; Thu, 26 Jul 2012 09:42:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuOKb-0004rc-Fj for qemu-devel@nongnu.org; Thu, 26 Jul 2012 09:42:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuOKb-0004pE-4g for qemu-devel@nongnu.org; Thu, 26 Jul 2012 09:42:21 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6QDgKCM009510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Jul 2012 09:42:20 -0400 Message-ID: <50114937.9070506@redhat.com> Date: Thu, 26 Jul 2012 15:42:15 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1342111951-27930-1-git-send-email-armbru@redhat.com> <87629fos67.fsf@blackfin.pond.sub.org> <500D218B.7000809@redhat.com> In-Reply-To: <500D218B.7000809@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ide scsi: Mess with geometry only for hard disk devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Markus Armbruster , qemu-devel@nongnu.org Am 23.07.2012 12:03, schrieb Paolo Bonzini: > Il 23/07/2012 09:25, Markus Armbruster ha scritto: >> Ping? >> >> Markus Armbruster writes: >> >>> Legacy -drive cyls=... are now ignored completely when the drive >>> doesn't back a hard disk device. Before, they were first checked >>> against a hard disk's limits, then ignored. >>> >>> Signed-off-by: Markus Armbruster >>> --- >>> hw/ide/qdev.c | 3 ++- >>> hw/scsi-disk.c | 3 ++- >>> 2 files changed, 4 insertions(+), 2 deletions(-) >>> >>> diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c >>> index 22e58df..5ea9b8f 100644 >>> --- a/hw/ide/qdev.c >>> +++ b/hw/ide/qdev.c >>> @@ -149,7 +149,8 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind) >>> } >>> >>> blkconf_serial(&dev->conf, &dev->serial); >>> - if (blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255) < 0) { >>> + if (kind != IDE_CD >>> + && blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255) < 0) { >>> return -1; >>> } >>> >>> diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c >>> index 525816c..318318c 100644 >>> --- a/hw/scsi-disk.c >>> +++ b/hw/scsi-disk.c >>> @@ -1750,7 +1750,8 @@ static int scsi_initfn(SCSIDevice *dev) >>> } >>> >>> blkconf_serial(&s->qdev.conf, &s->serial); >>> - if (blkconf_geometry(&dev->conf, NULL, 65535, 255, 255) < 0) { >>> + if (dev->type == TYPE_DISK >>> + && blkconf_geometry(&dev->conf, NULL, 65535, 255, 255) < 0) { >>> return -1; >>> } >> >> > > Acked-by: Paolo Bonzini > > Kevin, are you taking this patch? Thanks, applied to the block branch. Kevin