diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-10-18 17:44:01 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-10-18 17:44:01 +0000 |
| commit | c4f832d1186ab6021f401b325c87188bdf408e2a (patch) | |
| tree | 9b196474d1c48823bbd252744028ddfbca6155eb /sys/dev/mcd/mcd.c | |
| parent | 0eac610fd7cfdce336588271e6a565cc70987a05 (diff) | |
Notes
Diffstat (limited to 'sys/dev/mcd/mcd.c')
| -rw-r--r-- | sys/dev/mcd/mcd.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 0a965de16275..21c160e513cd 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); |
