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/dev/mlx/mlx_disk.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/dev/mlx/mlx_disk.c')
-rw-r--r-- | sys/dev/mlx/mlx_disk.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c index 5420326..50f20c5 100644 --- a/sys/dev/mlx/mlx_disk.c +++ b/sys/dev/mlx/mlx_disk.c @@ -165,26 +165,26 @@ mlxd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct proc *p) * be a multiple of a sector in length. */ static void -mlxd_strategy(struct buf *bp) +mlxd_strategy(struct bio *bp) { - struct mlxd_softc *sc = (struct mlxd_softc *)bp->b_dev->si_drv1; + struct mlxd_softc *sc = (struct mlxd_softc *)bp->bio_dev->si_drv1; debug_called(1); /* bogus disk? */ if (sc == NULL) { - bp->b_error = EINVAL; + bp->bio_error = EINVAL; goto bad; } /* XXX may only be temporarily offline - sleep? */ if (sc->mlxd_drive->ms_state == MLX_SYSD_OFFLINE) { - bp->b_error = ENXIO; + bp->bio_error = ENXIO; goto bad; } /* do-nothing operation */ - if (bp->b_bcount == 0) + if (bp->bio_bcount == 0) goto done; devstat_start_transaction(&sc->mlxd_stats); @@ -192,13 +192,13 @@ mlxd_strategy(struct buf *bp) return; bad: - bp->b_ioflags |= BIO_ERROR; + bp->bio_flags |= BIO_ERROR; done: /* * Correctly set the buf to indicate a completed transfer */ - bp->b_resid = bp->b_bcount; + bp->bio_resid = bp->bio_bcount; biodone(bp); return; } @@ -206,17 +206,17 @@ mlxd_strategy(struct buf *bp) void mlxd_intr(void *data) { - struct buf *bp = (struct buf *)data; - struct mlxd_softc *sc = (struct mlxd_softc *)bp->b_dev->si_drv1; + struct bio *bp = (struct bio *)data; + struct mlxd_softc *sc = (struct mlxd_softc *)bp->bio_dev->si_drv1; debug_called(1); - if (bp->b_ioflags & BIO_ERROR) - bp->b_error = EIO; + if (bp->bio_flags & BIO_ERROR) + bp->bio_error = EIO; else - bp->b_resid = 0; + bp->bio_resid = 0; - devstat_end_transaction_buf(&sc->mlxd_stats, bp); + devstat_end_transaction_bio(&sc->mlxd_stats, bp); biodone(bp); } |