diff options
author | Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> | 2016-01-25 14:34:40 -0500 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:29:54 -0600 |
commit | a8b7e0553c840712a29053f62997659dc8654b1c (patch) | |
tree | cf56d323bd11eb1e9a65c0332d089096e95944db /hw/ide | |
parent | 09febbead8e52dc92927ab17c6e9e1fdddfd9a2e (diff) | |
download | hqemu-a8b7e0553c840712a29053f62997659dc8654b1c.zip hqemu-a8b7e0553c840712a29053f62997659dc8654b1c.tar.gz |
ide: Correct the CHS 'cyls_max' limit to be 65535
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 <shmulik.ladkani@ravellosystems.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 1453112371-29760-1-git-send-email-shmulik.ladkani@ravellosystems.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/ide')
-rw-r--r-- | hw/ide/qdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |