summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-cd.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-04-25 10:51:18 +0000
committerphk <phk@FreeBSD.org>2000-04-25 10:51:18 +0000
commita708c222de7b2882a8f9e471911f7768d353532c (patch)
tree845969f3fdfdd9a87c329c4f057492cffe310673 /sys/dev/ata/atapi-cd.c
parent7dbc44ea9253465e587b32df22ba4bef4b564e19 (diff)
downloadFreeBSD-src-a708c222de7b2882a8f9e471911f7768d353532c.zip
FreeBSD-src-a708c222de7b2882a8f9e471911f7768d353532c.tar.gz
Clone the {b|bio}_offset field, and make sure it is always initialized
in struct bio. Eventually, bio_offset will probably obsolete the bio_blkno and bio_pblkno fields. Remove the special hack in atapi-cd.c to determine of bio_offset was valid.
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
-rw-r--r--sys/dev/ata/atapi-cd.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 15a6a2b..81c8ed4 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -1146,14 +1146,7 @@ acd_start(struct atapi_softc *atp)
bzero(ccb, sizeof(ccb));
count = (bp->bio_bcount + (cdp->block_size - 1)) / cdp->block_size;
- {
- /* XXX Hack until b_offset is always initialized */
- struct buf *bup = (struct buf *)bp;
- if (bup->b_flags & B_PHYS)
- lba = bup->b_offset / cdp->block_size;
- else
- lba = bp->bio_blkno / (cdp->block_size / DEV_BSIZE);
- }
+ lba = bp->bio_offset / cdp->block_size;
if (bp->bio_cmd == BIO_READ) {
/* if transfer goes beyond EOM adjust it to be within limits */
OpenPOWER on IntegriCloud