Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158517
b: refs/heads/master
c: ac8672e
h: refs/heads/master
i:
  158515: 23a8c64
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Sep 9, 2009
1 parent 47c51a2 commit af3b594
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 1b549dcbf607e88f3016bc149109472a46fe7bbb
refs/heads/master: ac8672ea922bde59acf50eaa1eaa1640a6395fd2
8 changes: 7 additions & 1 deletion trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,13 @@ u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev)
head = tf->device & 0xf;
sect = tf->lbal;

block = (cyl * dev->heads + head) * dev->sectors + sect;
if (!sect) {
ata_dev_printk(dev, KERN_WARNING, "device reported "
"invalid CHS sector 0\n");
sect = 1; /* oh well */
}

block = (cyl * dev->heads + head) * dev->sectors + sect - 1;
}

return block;
Expand Down

0 comments on commit af3b594

Please sign in to comment.