[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
- [PATCH 0/5 gnumach] Progress with SMP revisited, Damien Zammit, 2023/02/01
- [PATCH 1/5 gnumach] pmap: Debug printf when pmap_update_interrupt runs, Damien Zammit, 2023/02/01
- [PATCH 4/5 gnumach] kdb: Fix ON_INT_STACK() macro to be cpu_number aware, Damien Zammit, 2023/02/01
- [PATCH 5/5 gnumach] linux: Skip probing IDE when 255 phys heads detected,
Damien Zammit <=
- [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Damien Zammit, 2023/02/01
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Almudena Garcia, 2023/02/01
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Samuel Thibault, 2023/02/01
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Almudena Garcia, 2023/02/02
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Damien Zammit, 2023/02/03
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Almudena Garcia, 2023/02/03
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Damien Zammit, 2023/02/03
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Samuel Thibault, 2023/02/04