提交 17bd9a2f 编写于 作者: G Geert Uytterhoeven 提交者: Jeff Garzik

libata and bogus LBA48 drives

A colleague noticed recent versions of Ubuntu no longer detect his 80 GB
ST380020ACE drive. This drive is special in that it advertises LBA48 support,
but has the lba_capacity_2 field set to zero (cfr.
http://lkml.org/lkml/2004/3/30/163).

Upon closer look, libata indeed doesn't seem to handle this case yet.
Below is an (untested) fix.
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 b55d1b18
......@@ -425,6 +425,8 @@ static inline int ata_id_has_lba48(const u16 *id)
{
if ((id[83] & 0xC000) != 0x4000)
return 0;
if (!ata_id_u64(id, 100))
return 0;
return id[83] & (1 << 10);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册