summaryrefslogtreecommitdiffstats
path: root/sys/dev/mcd
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/mcd
parent8714e3267f37f64227390db2b2ce2c12fd9bb5fb (diff)
downloadFreeBSD-src-583ddf14d7ae0458c368039d03d89a2ea6c67898.zip
FreeBSD-src-583ddf14d7ae0458c368039d03d89a2ea6c67898.tar.gz
Discontinue bio_blkno, use bio_offset instead.
Diffstat (limited to 'sys/dev/mcd')
-rw-r--r--sys/dev/mcd/mcd.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index 0a965de..21c160e 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -297,18 +297,6 @@ mcdstrategy(struct bio *bp)
sc = (struct mcd_softc *)bp->bio_dev->si_drv1;
- /* test validity */
-/*MCD_TRACE("strategy: buf=0x%lx, unit=%ld, block#=%ld bcount=%ld\n",
- bp,unit,bp->bio_blkno,bp->bio_bcount);*/
-
- if (bp->bio_blkno < 0) {
- 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 & MCDVALID)) {
device_printf(sc->dev, "media changed\n");
@@ -331,7 +319,6 @@ mcdstrategy(struct bio *bp)
goto bad;
}
- bp->bio_pblkno = bp->bio_blkno;
bp->bio_resid = 0;
/* queue it */
@@ -892,8 +879,7 @@ modedone:
mbx->skip = 0;
nextblock:
- blknum = (bp->bio_blkno / (mbx->sz/DEV_BSIZE))
- + mbx->skip/mbx->sz;
+ blknum = bp->bio_offset / mbx->sz + mbx->skip/mbx->sz;
MCD_TRACE("mcd_doread: read blknum=%d for bp=%p\n",
blknum, bp);
OpenPOWER on IntegriCloud