Re: [PATCH] Re: 2.2.0pre5/6 IDE disk geometry detection problem

Marko Siladin (msiladin@athos.mas.vcu.edu)
Wed, 13 Jan 1999 11:14:21 -0500 (EST)


> > in the ide-disk.c source:
> >
> > --- ide-disk.c~ Thu Jan 7 21:15:02 1999
> > +++ ide-disk.c Tue Jan 12 20:21:41 1999
> > @@ -742,8 +742,8 @@
> > * if possible, give fdisk access to more of the drive,
> > * by correcting bios_cyls:
> > */
> > - if ((capacity >= (id->cyls * id->heads * id->sectors)) &&
> > - (!drive->forced_geom)) {
> > + if ((capacity >= (drive->bios_cyl * drive->bios_sect * drive->bios_head)) &&
> > + (!drive->forced_geom) && drive->bios_sect && drive->bios_head) {
> > drive->bios_cyl = (capacity / drive->bios_sect) / drive->bios_head;
> > #ifdef DEBUG
> > printk("Fixing Geometry :: CHS=%d/%d/%d to CHS=%d/%d/%d\n",
> >
> >
> >
> > Andries
The patch did great. It fixed the CurCHS value to the correct BIOS setting.
Thanks for the time to look into it.
I also tried adding a
append = "hda=847,128,63"
to lilo.conf (without applying the patch) - and that did the job as well.

I really don't know why the DISK is reporting wrong track # values.
It coould be that the BIOS is messing things up - but I'm really not an
expert here - and I didn't have much time to find out all the info.
The motherboard is a Tyan Tomcat IV 1.01 with 2 Pentiums (166MMX),
with Award Modular BIOS 4.51PG (or P6 - I can't read my own handwriting :))
[ROM PCI/ISA BIOS (2A59FT59)]
I know it supports LBA - as you can see from the hdparm, but I can't find
the manual right now to read up on the details.
>
> So the patch works great for me. I don't know what Linus will say about
> it - but I hope it stays.
> Let me know if you want to try anything else (like detect the real
> geometry )
>
> --
> ...Marko
> ------------------------///////////-\\\\\\\\\\\--------------------------
> (O) ^ ^ (O) If you are going to reinvent
> Marko Siladin | | | the wheel, don't make it a square
> msiladin@athos.mas.vcu.edu \ / - John Carmack, id Software
> http://athos.mas.vcu.edu/grad/marko/home.html
> ------------------------\\\\\\\\\\\-///////////--------------------------
>

-- 
...Marko
------------------------///////////-\\\\\\\\\\\--------------------------
                              (O) ^ ^ (O)    If you are going to reinvent
Marko Siladin                    | | |  the wheel, don't make it a square
msiladin@athos.mas.vcu.edu        \ /        - John Carmack,  id Software 
           http://athos.mas.vcu.edu/grad/marko/home.html
------------------------\\\\\\\\\\\-///////////--------------------------  

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/