summaryrefslogtreecommitdiff
path: root/sys/dev/twe/twe.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/twe/twe.c
parenta2abae8dc92a5778b3405cfbc1f20eaf7a067074 (diff)
Notes
Diffstat (limited to 'sys/dev/twe/twe.c')
-rw-r--r--sys/dev/twe/twe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c
index 1419d4ffa836..97778ad839b8 100644
--- a/sys/dev/twe/twe.c
+++ b/sys/dev/twe/twe.c
@@ -439,9 +439,13 @@ twe_startio(struct twe_softc *sc)
if (bp->bio_cmd == BIO_READ) {
tr->tr_flags |= TWE_CMD_DATAIN;
cmd->io.opcode = TWE_OP_READ;
- } else {
+ } else if (bp->bio_cmd == BIO_WRITE) {
tr->tr_flags |= TWE_CMD_DATAOUT;
cmd->io.opcode = TWE_OP_WRITE;
+ } else {
+ twe_release_request(tr);
+ biofinish(bp, NULL, EOPNOTSUPP);
+ break;
}
/* build a suitable I/O command (assumes 512-byte rounded transfers) */