summaryrefslogtreecommitdiff
path: root/hw/ide/qdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide/qdev.c')
-rw-r--r--hw/ide/qdev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 84097fd4ec..de9db3bf9f 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -171,6 +171,9 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind)
hd_geometry_guess(dev->conf.bs,
&dev->conf.cyls, &dev->conf.heads, &dev->conf.secs,
&dev->chs_trans);
+ } else if (dev->chs_trans == BIOS_ATA_TRANSLATION_AUTO) {
+ dev->chs_trans = hd_bios_chs_auto_trans(dev->conf.cyls,
+ dev->conf.heads, dev->conf.secs);
}
if (ide_init_drive(s, dev->conf.bs, kind,