]> Git Repo - qemu.git/commitdiff
Relax IDE CHS limits from 16383,16,63 to 65535,16,255
authorMarkus Armbruster <[email protected]>
Tue, 10 Jul 2012 09:12:55 +0000 (11:12 +0200)
committerKevin Wolf <[email protected]>
Tue, 17 Jul 2012 14:48:32 +0000 (16:48 +0200)
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 <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
hw/ide/core.c

index 1ca7cdf7d02d71b6da6c8cb3f927b87c6d0aff91..58a454fde57f0476b2784f2bba385e8c427bebae 100644 (file)
@@ -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;
This page took 0.031865 seconds and 4 git commands to generate.