aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2018-05-01 17:48:50 +0000
committerScott Long <scottl@FreeBSD.org>2018-05-01 17:48:50 +0000
commit7631477269f3f92c6517594de2a152b5792eff36 (patch)
treeea5e670390a66c52a7626b6171368b0ca22f491b
parentdced0d18217c1b21dbbd4654e812d7c9b86e0618 (diff)
downloadsrc-7631477269f3f92c6517594de2a152b5792eff36.tar.gz
src-7631477269f3f92c6517594de2a152b5792eff36.zip
Add and fix comments for cam_periph_runccb()
Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=333147
-rw-r--r--sys/cam/cam_periph.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index d7ea119f4d54..fa1ba62bacc6 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -1148,6 +1148,10 @@ cam_periph_ccbwait(union ccb *ccb)
ccb->ccb_h.status, ccb->ccb_h.pinfo.index));
}
+/*
+ * Dispatch a CCB and wait for it to complete. If the CCB has set a
+ * callback function (ccb->ccb_h.cbfcnp), it will be overwritten and lost.
+ */
int
cam_periph_runccb(union ccb *ccb,
int (*error_routine)(union ccb *ccb,
@@ -1201,9 +1205,9 @@ cam_periph_runccb(union ccb *ccb,
/*
* If we're polling, then we need to ensure that we have ample resources
- * in the periph.
- * cam_periph_error can reschedule the ccb by calling xpt_action and returning
- * ERESTART, so we have to effect the polling in the do loop below.
+ * in the periph. cam_periph_error can reschedule the ccb by calling
+ * xpt_action and returning ERESTART, so we have to effect the polling
+ * in the do loop below.
*/
if (must_poll) {
timeout = xpt_poll_setup(ccb);