diff options
author | msmith <msmith@FreeBSD.org> | 1999-10-22 20:55:15 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1999-10-22 20:55:15 +0000 |
commit | 1e1a86c642c05b04b68acddb82e4524ef9c582ee (patch) | |
tree | 4d97bb1ebae1734ba870eba437870c1f68d749ee /sys/dev/mlx/mlx.c | |
parent | 3d0daca952a67f886c2b99bf749026ca12b3bd48 (diff) | |
download | FreeBSD-src-1e1a86c642c05b04b68acddb82e4524ef9c582ee.zip FreeBSD-src-1e1a86c642c05b04b68acddb82e4524ef9c582ee.tar.gz |
Use the physical block number, not the logical block number, for I/O
operations. The latter only works where the partion begins at the bottom
of the disk. Whoops.
Submitted by: Chris Csanady <cc@137.org>
Diffstat (limited to 'sys/dev/mlx/mlx.c')
-rw-r--r-- | sys/dev/mlx/mlx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index 94376f8..7d2fac0 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -1621,9 +1621,9 @@ mlx_startio(struct mlx_softc *sc) driveno = mlxd->mlxd_drive - &sc->mlx_sysdrive[0]; blkcount = bp->b_bcount / MLX_BLKSIZE; - if ((bp->b_blkno + blkcount) > sc->mlx_sysdrive[driveno].ms_size) + 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", - bp->b_blkno, blkcount, sc->mlx_sysdrive[driveno].ms_size); + bp->b_pblkno, blkcount, sc->mlx_sysdrive[driveno].ms_size); /* * Build the I/O command. Note that the SG list type bits are set to zero, @@ -1632,7 +1632,7 @@ mlx_startio(struct mlx_softc *sc) mlx_make_type5(mc, cmd, blkcount & 0xff, /* xfer length low byte */ (driveno << 3) | ((blkcount >> 8) & 0x07), /* target and length high 3 bits */ - bp->b_blkno, /* physical block number */ + bp->b_pblkno, /* physical block number */ mc->mc_sgphys, /* location of SG list */ mc->mc_nsgent & 0x3f); /* size of SG list (top 2 bits clear) */ @@ -1670,8 +1670,8 @@ mlx_completeio(struct mlx_command *mc) default: /* other I/O error */ device_printf(sc->mlx_dev, "I/O error - %s\n", mlx_diagnose_command(mc)); #if 0 - device_printf(sc->mlx_dev, " b_bcount %ld blkcount %ld b_blkno %d\n", - bp->b_bcount, bp->b_bcount / MLX_BLKSIZE, bp->b_blkno); + device_printf(sc->mlx_dev, " b_bcount %ld blkcount %ld b_pblkno %d\n", + bp->b_bcount, bp->b_bcount / MLX_BLKSIZE, bp->b_pblkno); device_printf(sc->mlx_dev, " %13D\n", mc->mc_mailbox, " "); #endif break; |