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/scd/scd.c | |
| parent | 0eac610fd7cfdce336588271e6a565cc70987a05 (diff) | |
Notes
Diffstat (limited to 'sys/dev/scd/scd.c')
| -rw-r--r-- | sys/dev/scd/scd.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index 71244f298ac3..89850b3705b8 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); |
