From 583ddf14d7ae0458c368039d03d89a2ea6c67898 Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 18 Oct 2003 17:44:01 +0000 Subject: Discontinue bio_blkno, use bio_offset instead. --- sys/dev/scd/scd.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'sys/dev/scd') 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); -- cgit v1.1