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.
This commit is contained in:
Mike Smith 1999-11-02 03:25:24 +00:00
parent 83f2409369
commit 97adfbaf83
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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);