[Kos-dev] ATA & LBA, more informations

kos-dev@enix.org kos-dev@enix.org
12 Feb 2002 13:40:31 +0100


Hi,

I tested exactly the same code, but with disabling LBA. I commented
this :

  /*
  if(harddisk->flags & HARDDISK_LBA_CAPABLE)
    {
      sect   = (sector_num & 0xff);
      cyl_lo = (sector_num >> 8) & 0xff;
      cyl_hi = (sector_num >> 16) & 0xff;
      head   = ((sector_num >> 24) & 0xf) | 0x40;
      printk("Using LBA mode %d : sect=%d,cyl_lo=%d,cyl_hi=%d,head=%d\n",
             sector_num,sect,cyl_lo,cyl_hi,head);
    }
  else
  */

So as to always use CHS even if the drive does support LBA.

And it works perfectly !

So it's really the LBA stuff which sucks, and the initialization stuff
seems to be OK.

Any idea ?

Thomas
-- 
PETAZZONI Thomas - thomas.petazzoni@enix.org - UIN : 34937744
(Perso)      http://www.enix.org/~thomas/
(KOS)        http://kos.enix.org/ 
(Club LinUT) http://club-linut.enix.org