bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/5 gnumach] linux: Skip probing IDE when 255 phys heads detected


From: Damien Zammit
Subject: [PATCH 5/5 gnumach] linux: Skip probing IDE when 255 phys heads detected
Date: Wed, 01 Feb 2023 10:06:11 +0000

This allows qemu -M q35 to boot without 30 second timeout
failing on hd0, when disk is actually attached via ahci.

I very much doubt a disk exists with 255 physical heads.
---
 linux/src/drivers/block/ide.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux/src/drivers/block/ide.c b/linux/src/drivers/block/ide.c
index 2d0fc77e..41d4cef8 100644
--- a/linux/src/drivers/block/ide.c
+++ b/linux/src/drivers/block/ide.c
@@ -2964,7 +2964,7 @@ static void probe_cmos_for_drives (ide_hwif_t *hwif)
                        unsigned char  head = *(BIOS+2);
                        unsigned char  sect = *(BIOS+14);
                        unsigned char  ctl  = *(BIOS+8);
-                       if (cyl > 0 && head > 0 && sect > 0 && sect < 64) {
+                       if (cyl > 0 && head > 0 && sect > 0 && sect < 64 && 
head != 0xff) {
                                drive->cyl   = drive->bios_cyl  = cyl;
                                drive->head  = drive->bios_head = head;
                                drive->sect  = drive->bios_sect = sect;
--
2.34.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]