[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 31/41] Relax IDE CHS limits from 16383, 16, 63 to 65
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 31/41] Relax IDE CHS limits from 16383, 16, 63 to 65535, 16, 255 |
Date: |
Tue, 17 Jul 2012 18:00:28 +0200 |
From: Markus Armbruster <address@hidden>
New limits straight from ATA4 6.2 Register delivered data transfer
command sector addressing.
I figure the old sector limit 63 was blindly copied from the BIOS
int 13 limit. Doesn't apply to the hardware. No idea where the old
cylinder limit comes from.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/ide/core.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 1ca7cdf..58a454f 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1935,16 +1935,16 @@ int ide_init_drive(IDEState *s, BlockDriverState *bs,
IDEDriveKind kind,
s->drive_kind = kind;
bdrv_get_geometry(bs, &nb_sectors);
- if (cylinders < 1 || cylinders > 16383) {
- error_report("cyls must be between 1 and 16383");
+ if (cylinders < 1 || cylinders > 65535) {
+ error_report("cyls must be between 1 and 65535");
return -1;
}
if (heads < 1 || heads > 16) {
error_report("heads must be between 1 and 16");
return -1;
}
- if (secs < 1 || secs > 63) {
- error_report("secs must be between 1 and 63");
+ if (secs < 1 || secs > 255) {
+ error_report("secs must be between 1 and 255");
return -1;
}
s->cylinders = cylinders;
--
1.7.6.5
- [Qemu-devel] [PULL 00/41] Block patches, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 01/41] sheepdog: always use coroutine-based network functions, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 02/41] sheepdog: do not blindly memset all read buffers, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 03/41] fdc: Move floppy geometry guessing back from block.c, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 13/41] hd-geometry: Cut out block layer translation middleman, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 22/41] qdev: Collect private helpers in one place, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 33/41] hw/block-common: Factor out fall back to legacy -drive serial=..., Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 30/41] blockdev: Drop redundant CHS validation for if=ide, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 27/41] ide pc: Put hard disk info into CMOS only for hard disks, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 31/41] Relax IDE CHS limits from 16383, 16, 63 to 65535, 16, 255,
Kevin Wolf <=
- [Qemu-devel] [PATCH 41/41] fdc-test: Clean up a bit, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 37/41] coroutine-ucontext: Help valgrind understand coroutines, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 24/41] ide: qdev property for BIOS CHS translation, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 25/41] qtest: Cover qdev property for BIOS CHS translation, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 18/41] scsi-hd: qdev properties for disk geometry, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 26/41] block: Geometry and translation hints are now useless, purge them, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 32/41] hw/block-common: Move BlockConf & friends from block.h, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 38/41] qemu-iotests: Valgrind support, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 28/41] qtest: Test we don't put hard disk info into CMOS for a CD-ROM, Kevin Wolf, 2012/07/17
- [Qemu-devel] [PATCH 34/41] blockdev: Don't limit DriveInfo serial to 20 characters, Kevin Wolf, 2012/07/17