bug-hurd
[Top][All Lists]
Advanced

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

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


From: Samuel Thibault
Subject: Re: [PATCH 5/5 gnumach] linux: Skip probing IDE when 255 phys heads detected
Date: Wed, 1 Feb 2023 19:13:22 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Damien Zammit, le mer. 01 févr. 2023 10:06:11 +0000, a ecrit:
> I very much doubt a disk exists with 255 physical heads.

That's not the question :)

Disks have been lying about their geometry for a long time. But yes,
some disks may be erroneously reporting an "all-max" geometry that we
should just ignore.

Thanks!

> ---
>  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
> 
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



reply via email to

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