Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68099
b: refs/heads/master
c: db6f875
h: refs/heads/master
i:
  68097: ee29c5e
  68095: 0004d0f
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Oct 12, 2007
1 parent fd53b28 commit 0128116
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 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: 2557164e0b18e78a7772632a2a90832f56181fc5
refs/heads/master: db6f8759d05d2082f09a45b5674edc0fb5e92b1b
30 changes: 15 additions & 15 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,21 @@ void ata_id_c_string(const u16 *id, unsigned char *s,
*p = '\0';
}

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);
else
return ata_id_u32(id, 60);
} else {
if (ata_id_current_chs_valid(id))
return ata_id_u32(id, 57);
else
return id[1] * id[3] * id[6];
}
}

static u64 ata_tf_to_lba48(struct ata_taskfile *tf)
{
u64 sectors = 0;
Expand Down Expand Up @@ -1021,21 +1036,6 @@ static u64 ata_hpa_resize(struct ata_device *dev)
return sectors;
}

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);
else
return ata_id_u32(id, 60);
} else {
if (ata_id_current_chs_valid(id))
return ata_id_u32(id, 57);
else
return id[1] * id[3] * id[6];
}
}

/**
* ata_id_to_dma_mode - Identify DMA mode from id block
* @dev: device to identify
Expand Down

0 comments on commit 0128116

Please sign in to comment.