summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mlx')
-rw-r--r--sys/dev/mlx/mlx.c2
-rw-r--r--sys/dev/mlx/mlx_disk.c2
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);
OpenPOWER on IntegriCloud