Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132047
b: refs/heads/master
c: 968e594
h: refs/heads/master
i:
  132045: fdf471d
  132043: 19a837a
  132039: a784171
  132031: 0c47f96
v: v3
  • Loading branch information
Robert Hancock authored and Jeff Garzik committed Mar 5, 2009
1 parent 1dd6075 commit e5518c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: d6515e6ff4ad3db4bd5ef2dd4e1026a7aca2482e
refs/heads/master: 968e594afdbc40b4270f9d4032ae8350475749d6
10 changes: 6 additions & 4 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,14 +1322,16 @@ 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);
return ata_id_u64(id, ATA_ID_LBA_CAPACITY_2);
else
return ata_id_u32(id, 60);
return ata_id_u32(id, ATA_ID_LBA_CAPACITY);
} else {
if (ata_id_current_chs_valid(id))
return ata_id_u32(id, 57);
return id[ATA_ID_CUR_CYLS] * id[ATA_ID_CUR_HEADS] *
id[ATA_ID_CUR_SECTORS];
else
return id[1] * id[3] * id[6];
return id[ATA_ID_CYLS] * id[ATA_ID_HEADS] *
id[ATA_ID_SECTORS];
}
}

Expand Down

0 comments on commit e5518c6

Please sign in to comment.