Re: pata_it821x completely broken

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alan Cox <alan@...>
Cc: Alan Cox <alan@...>, LKML <linux-kernel@...>, <linux-ide@...>
Date: Saturday, July 12, 2008 - 5:42 pm

On Friday 11 July 2008 22:14:09 Alan Cox wrote:

The problem is that ata_id_n_sectors() function:

static u64 ata_id_n_sectors(const u16 *id)
{
        if (ata_id_has_lba(id)) {
                if (ata_id_has_lba48(id))
                        return ata_id_u64(id, 100);
                else
                        return ata_id_u32(id, 60);
        } else {
                if (ata_id_current_chs_valid(id))
                        return ata_id_u32(id, 57);
                else
                        return id[1] * id[3] * id[6];
        }
}

fails to retrieve the LBA48 value.


This is because the ata_id_has_lba() test

#define ata_id_has_lba(id)      ((id)[49] & (1 << 9))

fails as the identify data contains only zeros at word 49 (byte 0x62). 

Another problem is that ata_id_has_lba48() would fail too - that will break 
array over 2TB (if the controller BIOS and firmware can do it).

Looks like this needs to force LBA48 with these virtual drives.

-- 
Ondrej Zary
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
pata_it821x completely broken, Ondrej Zary, (Fri Jul 4, 3:53 pm)
Re: pata_it821x completely broken, Alan Cox, (Fri Jul 4, 4:22 pm)
Re: pata_it821x completely broken, Ondrej Zary, (Fri Jul 4, 5:39 pm)
Re: pata_it821x completely broken, Alan Cox, (Fri Jul 4, 5:46 pm)
Re: pata_it821x completely broken, Ondrej Zary, (Sat Jul 5, 6:41 am)
Re: pata_it821x completely broken, Alan Cox, (Sun Jul 6, 3:37 pm)
Re: pata_it821x completely broken, Ondrej Zary, (Sun Jul 6, 5:50 pm)
Re: pata_it821x completely broken, Alan Cox, (Sun Jul 6, 7:01 pm)
Re: pata_it821x completely broken, Ondrej Zary, (Thu Jul 10, 4:35 pm)
Re: pata_it821x completely broken, Ondrej Zary, (Fri Jul 11, 2:43 pm)
Re: pata_it821x completely broken, Alan Cox, (Fri Jul 11, 4:14 pm)
Re: pata_it821x completely broken, Ondrej Zary, (Sat Jul 12, 5:42 pm)
Re: pata_it821x completely broken, Ondrej Zary, (Sun Jul 13, 7:47 am)
Re: pata_it821x completely broken, Ondrej Zary, (Tue Jul 22, 1:59 pm)
Re: pata_it821x completely broken, Alan Cox, (Tue Jul 22, 2:10 pm)
Re: pata_it821x completely broken, Ondrej Zary, (Tue Jul 22, 3:16 pm)
Re: pata_it821x completely broken, Rene Herman, (Tue Jul 22, 3:35 pm)
Re: pata_it821x completely broken, Alan Cox, (Tue Jul 22, 4:39 pm)
Re: pata_it821x completely broken, Alan Cox, (Sun Jul 13, 7:35 am)
Re: pata_it821x completely broken, Ondrej Zary, (Sun Jul 13, 8:10 am)
Re: pata_it821x completely broken, Alan Cox, (Sun Jul 13, 10:08 am)
Re: pata_it821x completely broken, Ondrej Zary, (Mon Jul 7, 2:07 pm)
Re: pata_it821x completely broken, Alan Cox, (Sat Jul 5, 11:49 am)
Re: pata_it821x completely broken, Ondrej Zary, (Sun Jul 6, 5:03 pm)
Re: pata_it821x completely broken, Alan Cox, (Sun Jul 6, 4:51 pm)
Re: pata_it821x completely broken, Ondrej Zary, (Sun Jul 6, 5:46 pm)