summaryrefslogtreecommitdiff
path: root/sys/dev/mlx/mlx_disk.c
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2020-02-07 09:22:08 +0000
committerScott Long <scottl@FreeBSD.org>2020-02-07 09:22:08 +0000
commitd176b8039e91164cd25271ff6191a4fb1a03fe97 (patch)
treed1382f2fb54cb240d3aeda803ae80070bf8ecf13 /sys/dev/mlx/mlx_disk.c
parenta2abae8dc92a5778b3405cfbc1f20eaf7a067074 (diff)
Notes
Diffstat (limited to 'sys/dev/mlx/mlx_disk.c')
-rw-r--r--sys/dev/mlx/mlx_disk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c
index 1fb0a27c9da7..bc487d1330a0 100644
--- a/sys/dev/mlx/mlx_disk.c
+++ b/sys/dev/mlx/mlx_disk.c
@@ -157,6 +157,11 @@ mlxd_strategy(struct bio *bp)
goto bad;
}
+ if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE)) {
+ bp->bio_error = EOPNOTSUPP;
+ goto bad;
+ }
+
/* XXX may only be temporarily offline - sleep? */
MLX_IO_LOCK(sc->mlxd_controller);
if (sc->mlxd_drive->ms_state == MLX_SYSD_OFFLINE) {