mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
ide: idedisk_supports_lba48() -> ata_id_lba48_enabled()
* Add ata_id_lba48_enabled() inline helper to <linux/ata.h>. * idedisk_supports_lba48() -> ata_id_lba48_enabled() The latter one also checks validity of words 83 & 86. Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
367d7e78dd
commit
942dcd85bf
2 changed files with 15 additions and 15 deletions
|
|
@ -574,6 +574,15 @@ static inline int ata_id_has_lba48(const u16 *id)
|
|||
return id[ATA_ID_COMMAND_SET_2] & (1 << 10);
|
||||
}
|
||||
|
||||
static inline int ata_id_lba48_enabled(const u16 *id)
|
||||
{
|
||||
if (ata_id_has_lba48(id) == 0)
|
||||
return 0;
|
||||
if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000)
|
||||
return 0;
|
||||
return id[ATA_ID_CFS_ENABLE_2] & (1 << 10);
|
||||
}
|
||||
|
||||
static inline int ata_id_hpa_enabled(const u16 *id)
|
||||
{
|
||||
/* Yes children, word 83 valid bits cover word 82 data */
|
||||
|
|
|
|||
Loading…
Reference in a new issue