diff options
author | phk <phk@FreeBSD.org> | 2000-04-15 05:54:02 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-04-15 05:54:02 +0000 |
commit | aaaef0b54e307450b19dcd1fb6ec921cc62d1acf (patch) | |
tree | 175dac1aaf0d06b54deb889161091dbcf88c79c6 /sys/i386/isa/wt.c | |
parent | f2310ef109eccf99c872f4f90eb70f4fc26e39f1 (diff) | |
download | FreeBSD-src-aaaef0b54e307450b19dcd1fb6ec921cc62d1acf.zip FreeBSD-src-aaaef0b54e307450b19dcd1fb6ec921cc62d1acf.tar.gz |
Complete the bio/buf divorce for all code below devfs::strategy
Exceptions:
Vinum untouched. This means that it cannot be compiled.
Greg Lehey is on the case.
CCD not converted yet, casts to struct buf (still safe)
atapi-cd casts to struct buf to examine B_PHYS
Diffstat (limited to 'sys/i386/isa/wt.c')
-rw-r--r-- | sys/i386/isa/wt.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 0aa7015..f6e65a5 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -506,15 +506,15 @@ wtioctl (dev_t dev, u_long cmd, caddr_t arg, int flags, struct proc *p) * Strategy routine. */ static void -wtstrategy (struct buf *bp) +wtstrategy (struct bio *bp) { - int u = minor (bp->b_dev) & T_UNIT; + int u = minor (bp->bio_dev) & T_UNIT; wtinfo_t *t = wttab + u; int s; - bp->b_resid = bp->b_bcount; + bp->bio_resid = bp->bio_bcount; if (u >= NWT || t->type == UNKNOWN) { - bp->b_error = ENXIO; + bp->bio_error = ENXIO; goto err2xit; } @@ -522,12 +522,12 @@ wtstrategy (struct buf *bp) if (t->flags & TPVOL) goto xit; - if (bp->b_bcount % t->bsize != 0) { - bp->b_error = EINVAL; + if (bp->bio_bcount % t->bsize != 0) { + bp->bio_error = EINVAL; goto err2xit; } - if (bp->b_iocmd == BIO_READ) { + if (bp->bio_cmd == BIO_READ) { /* Check read access and no previous write to this tape. */ if (! (t->flags & TPREAD) || (t->flags & TPWANY)) goto errxit; @@ -561,21 +561,21 @@ wtstrategy (struct buf *bp) } } - if (! bp->b_bcount) + if (! bp->bio_bcount) goto xit; t->flags &= ~TPEXCEP; s = splbio (); - if (wtstart (t, bp->b_iocmd == BIO_READ ? ISADMA_READ : ISADMA_WRITE, - bp->b_data, bp->b_bcount)) { - wtwait (t, 0, (bp->b_iocmd == BIO_READ) ? "wtread" : "wtwrite"); - bp->b_resid -= t->dmacount; + if (wtstart (t, bp->bio_cmd == BIO_READ ? ISADMA_READ : ISADMA_WRITE, + bp->bio_data, bp->bio_bcount)) { + wtwait (t, 0, (bp->bio_cmd == BIO_READ) ? "wtread" : "wtwrite"); + bp->bio_resid -= t->dmacount; } splx (s); if (t->flags & TPEXCEP) { -errxit: bp->b_error = EIO; -err2xit: bp->b_ioflags |= BIO_ERROR; +errxit: bp->bio_error = EIO; +err2xit: bp->bio_flags |= BIO_ERROR; } xit: biodone (bp); return; |