git: a2784b47e481 - stable/13 - mpr/mps: Minor state machine fix
Alexander Motin
mav at FreeBSD.org
Fri Sep 3 00:43:13 UTC 2021
The branch stable/13 has been updated by mav:
URL: https://cgit.FreeBSD.org/src/commit/?id=a2784b47e481c86ec6011639158016d626828626
commit a2784b47e481c86ec6011639158016d626828626
Author: Warner Losh <imp at FreeBSD.org>
AuthorDate: 2021-06-03 19:46:19 +0000
Commit: Alexander Motin <mav at FreeBSD.org>
CommitDate: 2021-09-03 00:34:22 +0000
mpr/mps: Minor state machine fix
When a DMA chain can't be loaded, set the state to STATE_INQUEUE so that
the mp[rs]_complete_command can properly fail the command.
Sponsored by: Netflix
(cherry picked from commit 33755dbb207878c10fd99de39dadf89fad713bc7)
---
sys/dev/mpr/mpr.c | 1 +
sys/dev/mps/mps.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c
index c43eccb7cb36..796f74c2547b 100644
--- a/sys/dev/mpr/mpr.c
+++ b/sys/dev/mpr/mpr.c
@@ -3703,6 +3703,7 @@ 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;
+ cm->cm_state = MPR_CM_STATE_INQUEUE;
mpr_complete_command(sc, cm);
return;
}
diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c
index 3adb16416fa9..b4e0142204ef 100644
--- a/sys/dev/mps/mps.c
+++ b/sys/dev/mps/mps.c
@@ -2978,6 +2978,7 @@ mps_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
mps_dprint(sc, MPS_INFO, "Out of chain frames, "
"consider increasing hw.mps.max_chains.\n");
cm->cm_flags |= MPS_CM_FLAGS_CHAIN_FAILED;
+ cm->cm_state = MPS_CM_STATE_INQUEUE;
mps_complete_command(sc, cm);
return;
}
More information about the dev-commits-src-branches
mailing list