diff options
author | msmith <msmith@FreeBSD.org> | 1999-11-02 03:25:24 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1999-11-02 03:25:24 +0000 |
commit | bc581235b4054ac6456e3ef91e57fa92f4de5647 (patch) | |
tree | 65d94b44be3a3e6b8aee99effb633c4324af617b /sys/dev/mlx/mlx.c | |
parent | 0581a055e6545d6be327ec8a349e5af82beba6aa (diff) | |
download | FreeBSD-src-bc581235b4054ac6456e3ef91e57fa92f4de5647.zip FreeBSD-src-bc581235b4054ac6456e3ef91e57fa92f4de5647.tar.gz |
Correctly compute the block count. In reality, it seems that the
controller will never return the command if it's not exactly a multiple
of a block in size.
Cosmetic formatting for RAID level output.
Diffstat (limited to 'sys/dev/mlx/mlx.c')
-rw-r--r-- | sys/dev/mlx/mlx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index 7a7b1e0..eccb788 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -1626,7 +1626,7 @@ mlx_startio(struct mlx_softc *sc) /* build a suitable I/O command (assumes 512-byte rounded transfers) */ mlxd = (struct mlxd_softc *)bp->b_dev->si_drv1; driveno = mlxd->mlxd_drive - &sc->mlx_sysdrive[0]; - blkcount = bp->b_bcount / MLX_BLKSIZE; + blkcount = (bp->b_bcount + MLX_BLKSIZE - 1) / MLX_BLKSIZE; if ((bp->b_pblkno + blkcount) > sc->mlx_sysdrive[driveno].ms_size) device_printf(sc->mlx_dev, "I/O beyond end of unit (%u,%d > %u)\n", |