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 | |
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')
-rw-r--r-- | sys/dev/mlx/mlx.c | 2 | ||||
-rw-r--r-- | sys/dev/mlx/mlx_disk.c | 2 |
2 files changed, 2 insertions, 2 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", diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c index 17991e3..ab0da60 100644 --- a/sys/dev/mlx/mlx_disk.c +++ b/sys/dev/mlx/mlx_disk.c @@ -267,7 +267,7 @@ mlxd_attach(device_t dev) state = "unknown state"; } - device_printf(dev, "%uMB (%u sectors), RAID %d (%s)\n", + device_printf(dev, "%uMB (%u sectors) RAID %d (%s)\n", sc->mlxd_drive->ms_size / ((1024 * 1024) / MLX_BLKSIZE), sc->mlxd_drive->ms_size, sc->mlxd_drive->ms_raidlevel, state); |