diff options
author | Warner Losh <imp@FreeBSD.org> | 2023-07-21 16:11:37 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2023-07-21 16:11:37 +0000 |
commit | ff4633d9f897c2247bc67930740509a1ba315c81 (patch) | |
tree | f059fb0bdb049fddff2d0ba37676761a2c1f924d | |
parent | b4993704d6bbc3d2e563a7f7f41619ca292ad5b4 (diff) | |
download | src-ff4633d9f897c2247bc67930740509a1ba315c81.tar.gz src-ff4633d9f897c2247bc67930740509a1ba315c81.zip |
cam_periph: Comment about why we need to reset cbfcnp
Just spent a few minutes puzzling out why we do this. Add a comment to
remind my future self (and other intersted folk) why we do the reset
here when we'd set it a few lines above.
Sponsored by: Netflix
-rw-r--r-- | sys/cam/cam_periph.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 9ff3d156023d..0de73cffdc1f 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1298,6 +1298,11 @@ cam_periph_runccb(union ccb *ccb, if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) error = 0; else if (error_routine != NULL) { + /* + * cbfcnp is modified by cam_periph_ccbwait so + * reset it before we call the error routine + * which may call xpt_done. + */ ccb->ccb_h.cbfcnp = cam_periph_done; error = (*error_routine)(ccb, camflags, sense_flags); } else |