Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112865
b: refs/heads/master
c: f41891c
h: refs/heads/master
i:
  112863: da76ba7
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 10, 2008
1 parent bf65104 commit 0e521bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a089c6679a9f1c0a00b7e08554e90b507ec527a
refs/heads/master: f41891c134ccdd07583ebd8d4af7fed883375672
15 changes: 2 additions & 13 deletions trunk/drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,6 @@ static unsigned long long sectors_to_MB(unsigned long long n)
return n;
}

/*
* Bits 10 of command_set_1 and cfs_enable_1 must be equal,
* so on non-buggy drives we need test only one.
* However, we should also check whether these fields are valid.
*/
static inline int idedisk_supports_hpa(const u16 *id)
{
return (id[ATA_ID_COMMAND_SET_1] & 0x0400) &&
(id[ATA_ID_CFS_ENABLE_1] & 0x0400);
}

/*
* The same here.
*/
Expand Down Expand Up @@ -461,7 +450,7 @@ static void init_idedisk_capacity(ide_drive_t *drive)
* If this drive supports the Host Protected Area feature set,
* then we may need to change our opinion about the drive's capacity.
*/
int hpa = idedisk_supports_hpa(id);
int hpa = ata_id_hpa_enabled(id);

if (idedisk_supports_lba48(id)) {
/* drive speaks 48-bit LBA */
Expand Down Expand Up @@ -939,7 +928,7 @@ static int ide_disk_probe(ide_drive_t *drive);
*/
static void ide_disk_resume(ide_drive_t *drive)
{
if (idedisk_supports_hpa(drive->id))
if (ata_id_hpa_enabled(drive->id))
init_idedisk_capacity(drive);
}

Expand Down

0 comments on commit 0e521bd

Please sign in to comment.