aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mpr
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-04-28 17:13:58 +0000
committerWarner Losh <imp@FreeBSD.org>2022-04-28 17:19:39 +0000
commitc5041b4ee8c3385cec03e6ccf73af78cadfe8d90 (patch)
tree486f457c356a78ab7a7a98b1a0aebf477cbc2784 /sys/dev/mpr
parent65c87a6c81f52a8328d81ba9ede5662d9df23a0c (diff)
Diffstat (limited to 'sys/dev/mpr')
-rw-r--r--sys/dev/mpr/mpr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c
index 0f4c5c906216..b4d3f3269dba 100644
--- a/sys/dev/mpr/mpr.c
+++ b/sys/dev/mpr/mpr.c
@@ -3704,6 +3704,12 @@ mpr_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
mpr_dprint(sc, MPR_INFO, "Out of chain frames, "
"consider increasing hw.mpr.max_chains.\n");
cm->cm_flags |= MPR_CM_FLAGS_CHAIN_FAILED;
+ /*
+ * mpr_complete_command can only be called on commands
+ * that are in the queue. Since this is an error path
+ * which gets called before we enqueue, update the state
+ * to meet this requirement before we complete it.
+ */
cm->cm_state = MPR_CM_STATE_INQUEUE;
mpr_complete_command(sc, cm);
return;