From d176b8039e91164cd25271ff6191a4fb1a03fe97 Mon Sep 17 00:00:00 2001 From: Scott Long Date: Fri, 7 Feb 2020 09:22:08 +0000 Subject: Ever since the block layer expanded its command syntax beyond just BIO_READ and BIO_WRITE, we've handled this expanded syntax poorly in drivers when the driver doesn't support a particular command. Do a sweep and fix that. Reported by: imp --- sys/dev/amr/amr.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/dev/amr') diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index 375fa6c533e5..2e77c3e4befc 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -1315,6 +1315,10 @@ amr_bio_command(struct amr_softc *sc, struct amr_command **acp) ac->ac_flags |= AMR_CMD_PRIORITY | AMR_CMD_DATAOUT; cmd = AMR_CMD_FLUSH; break; + default: + biofinish(bio, NULL, EOPNOTSUPP); + amr_releasecmd(ac); + return (0); } amrd = (struct amrd_softc *)bio->bio_disk->d_drv1; driveno = amrd->amrd_drive - sc->amr_drive; -- cgit v1.3