aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2007-10-29 16:21:37 -0400
committerJeff Garzik <jeff@garzik.org>2007-11-04 22:53:15 -0500
commit17bd9a2f4c35de29d2539a2ff6851d61be281e25 (patch)
tree9119dc563f702644c4ca889a942f49be6a2fd18a /include/linux/ata.h
parentb55d1b1814c52463c11707f53dbdc223e09b2924 (diff)
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: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 61535e72834d..304825b1c977 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -425,6 +425,8 @@ static inline int ata_id_has_lba48(const u16 *id)
425{ 425{
426 if ((id[83] & 0xC000) != 0x4000) 426 if ((id[83] & 0xC000) != 0x4000)
427 return 0; 427 return 0;
428 if (!ata_id_u64(id, 100))
429 return 0;
428 return id[83] & (1 << 10); 430 return id[83] & (1 << 10);
429} 431}
430 432