summaryrefslogtreecommitdiffstats
path: root/sys/dev/scd
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-10-18 17:44:01 +0000
committerphk <phk@FreeBSD.org>2003-10-18 17:44:01 +0000
commit583ddf14d7ae0458c368039d03d89a2ea6c67898 (patch)
tree9b196474d1c48823bbd252744028ddfbca6155eb /sys/dev/scd
parent8714e3267f37f64227390db2b2ce2c12fd9bb5fb (diff)
downloadFreeBSD-src-583ddf14d7ae0458c368039d03d89a2ea6c67898.zip
FreeBSD-src-583ddf14d7ae0458c368039d03d89a2ea6c67898.tar.gz
Discontinue bio_blkno, use bio_offset instead.
Diffstat (limited to 'sys/dev/scd')
-rw-r--r--sys/dev/scd/scd.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index 71244f2..89850b3 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -255,17 +255,6 @@ scdstrategy(struct bio *bp)
sc = (struct scd_softc *)bp->bio_dev->si_drv1;
- XDEBUG(sc, 2, "DEBUG: strategy: block=%ld, bcount=%ld\n",
- (long)bp->bio_blkno, bp->bio_bcount);
-
- if (bp->bio_blkno < 0 || (bp->bio_bcount % SCDBLKSIZE)) {
- device_printf(sc->dev, "strategy failure: blkno = %ld, bcount = %ld\n",
- (long)bp->bio_blkno, bp->bio_bcount);
- bp->bio_error = EINVAL;
- bp->bio_flags |= BIO_ERROR;
- goto bad;
- }
-
/* if device invalidated (e.g. media change, door open), error */
if (!(sc->data.flags & SCDVALID)) {
device_printf(sc->dev, "media changed\n");
@@ -288,7 +277,6 @@ scdstrategy(struct bio *bp)
goto bad;
}
- bp->bio_pblkno = bp->bio_blkno;
bp->bio_resid = 0;
/* queue it */
@@ -749,8 +737,7 @@ nextblock:
if (!(sc->data.flags & SCDVALID))
goto changed;
- blknum = (bp->bio_blkno / (mbx->sz/DEV_BSIZE))
- + mbx->skip/mbx->sz;
+ blknum = bp->bio_offset / mbx->sz + mbx->skip/mbx->sz;
XDEBUG(sc, 2, "scd_doread: read blknum=%d\n", blknum);
OpenPOWER on IntegriCloud