summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-10-16 01:46:59 +0000
committermsmith <msmith@FreeBSD.org>1999-10-16 01:46:59 +0000
commit6adeae4800a697fb643ef89410887955d2bfd6f6 (patch)
tree9ff5b4a3d29123243f4e908b24642732397ee89d /sys/dev/mlx
parentfcdace9ad84e50540274fcb3eb5f8223f1ab9fe9 (diff)
downloadFreeBSD-src-6adeae4800a697fb643ef89410887955d2bfd6f6.zip
FreeBSD-src-6adeae4800a697fb643ef89410887955d2bfd6f6.tar.gz
Save the drive device_t correctly so we can print it later.
The drive number is 5 bits, not 4, in the read/write command.
Diffstat (limited to 'sys/dev/mlx')
-rw-r--r--sys/dev/mlx/mlx.c3
-rw-r--r--sys/dev/mlx/mlx_disk.c1
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index 95b83c9..84a36bb 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -1630,7 +1630,7 @@ mlx_startio(struct mlx_softc *sc)
*/
mlx_make_type5(mc, cmd,
blkcount & 0xff, /* xfer length low byte */
- (driveno << 4) | ((blkcount >> 8) & 0x0f), /* target and length high nybble */
+ (driveno << 3) | ((blkcount >> 8) & 0x07), /* target and length high 3 bits */
bp->b_blkno, /* physical block number */
mc->mc_sgphys, /* location of SG list */
mc->mc_nsgent & 0x3f); /* size of SG list (top 2 bits clear) */
@@ -1662,7 +1662,6 @@ mlx_completeio(struct mlx_command *mc)
switch(mc->mc_status) {
case MLX_STATUS_RDWROFFLINE: /* system drive has gone offline */
device_printf(mlxd->mlxd_dev, "drive offline\n");
- device_printf(sc->mlx_dev, "drive offline\n");
/* should signal this with a return code */
mlxd->mlxd_drive->ms_state = MLX_SYSD_OFFLINE;
break;
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c
index 9e2f571..20d0136 100644
--- a/sys/dev/mlx/mlx_disk.c
+++ b/sys/dev/mlx/mlx_disk.c
@@ -253,6 +253,7 @@ mlxd_attach(device_t dev)
sc->mlxd_controller = (struct mlx_softc *)device_get_softc(parent);
sc->mlxd_unit = device_get_unit(dev);
sc->mlxd_drive = device_get_ivars(dev);
+ sc->mlxd_dev = dev;
switch(sc->mlxd_drive->ms_state) {
case MLX_SYSD_ONLINE:
OpenPOWER on IntegriCloud