From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNn13-0001Hl-E2 for qemu-devel@nongnu.org; Mon, 25 Jan 2016 14:41:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNn0y-0000pf-MR for qemu-devel@nongnu.org; Mon, 25 Jan 2016 14:41:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNn0y-0000pb-Gz for qemu-devel@nongnu.org; Mon, 25 Jan 2016 14:41:28 -0500 From: John Snow Date: Mon, 25 Jan 2016 14:41:13 -0500 Message-Id: <1453750885-16066-2-git-send-email-jsnow@redhat.com> In-Reply-To: <1453750885-16066-1-git-send-email-jsnow@redhat.com> References: <1453750885-16066-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PULL 01/13] ide: Correct the CHS 'cyls_max' limit to be 65535 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, jsnow@redhat.com, Shmulik Ladkani From: Shmulik Ladkani In b7eb0c9: hw/block-common: Factor out fall back to legacy -drive cyls=... 'blkconf_geometry()' was introduced, factoring out CHS limit validation code that was repeated in ide, scsi, virtio-blk. The original IDE CHS limit prior b7eb0c9 was 65535,16,255 (as per ATA CHS addressing). However the 'cyls_max' argument passed to 'blkconf_geometry' in the ide_dev_initfn case was accidentally set to 65536 instead of 65535. Fix, providing the correct 'cyls_max'. Signed-off-by: Shmulik Ladkani Reviewed-by: John Snow Message-id: 1453112371-29760-1-git-send-email-shmulik.ladkani@ravellosystems.com Signed-off-by: John Snow --- hw/ide/qdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 1f83109..fea5425 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -172,7 +172,7 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind) blkconf_serial(&dev->conf, &dev->serial); if (kind != IDE_CD) { - blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255, &err); + blkconf_geometry(&dev->conf, &dev->chs_trans, 65535, 16, 255, &err); if (err) { error_report_err(err); return -1; -- 2.4.3