From owner-svn-src-head@freebsd.org Tue May 1 17:48:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 459D2FB1F4C; Tue, 1 May 2018 17:48:51 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D96FC7F212; Tue, 1 May 2018 17:48:50 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF7692541C; Tue, 1 May 2018 17:48:50 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w41HmocJ051683; Tue, 1 May 2018 17:48:50 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w41HmoxI051682; Tue, 1 May 2018 17:48:50 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201805011748.w41HmoxI051682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Tue, 1 May 2018 17:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333147 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 333147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2018 17:48:51 -0000 Author: scottl Date: Tue May 1 17:48:50 2018 New Revision: 333147 URL: https://svnweb.freebsd.org/changeset/base/333147 Log: Add and fix comments for cam_periph_runccb() Sponsored by: Netflix Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Tue May 1 17:39:20 2018 (r333146) +++ head/sys/cam/cam_periph.c Tue May 1 17:48:50 2018 (r333147) @@ -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);