aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Schmidt <sos@FreeBSD.org>2004-01-08 19:17:16 +0000
committerSøren Schmidt <sos@FreeBSD.org>2004-01-08 19:17:16 +0000
commit986a96490048b1ac87b891350db9baa377b488e3 (patch)
treece95d9cc1cd61ebab57818278abb926a05ad0ffc
parentec6a729924f27fcf905d0ed8683ee9c1d61f43c8 (diff)
Notes
-rw-r--r--sys/dev/ata/ata-disk.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 353ee6b8835f..5c056ff7cb44 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -250,11 +250,10 @@ ad_start(struct ata_device *atadev)
/* convert LBA contents if this is an old non-LBA device */
if (atadev->flags & ATA_D_USE_CHS) {
- struct ata_params *param = atadev->param;
- int sector = (bp->bio_pblkno % param->sectors) + 1;
- int cylinder = bp->bio_pblkno / (param->sectors * param->heads);
+ int sector = (bp->bio_pblkno % adp->sectors) + 1;
+ int cylinder = bp->bio_pblkno / (adp->sectors * adp->heads);
int head = (bp->bio_pblkno %
- (param->sectors * param->heads)) / param->sectors;
+ (adp->sectors * adp->heads)) / adp->sectors;
request->u.ata.lba =
(sector & 0xff) | (cylinder & 0xffff) << 8 | (head & 0xf) << 24;