From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 23:25:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0500106566B; Mon, 19 Jul 2010 23:25:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2F8B8FC12; Mon, 19 Jul 2010 23:25:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JNPJVL015303; Mon, 19 Jul 2010 23:25:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JNPJIE015301; Mon, 19 Jul 2010 23:25:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192325.o6JNPJIE015301@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 23:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210267 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 23:25:19 -0000 Author: yongari Date: Mon Jul 19 23:25:19 2010 New Revision: 210267 URL: http://svn.freebsd.org/changeset/base/210267 Log: Add KASSERT to check number of returned DMA segments. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 22:28:07 2010 (r210266) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 23:25:19 2010 (r210267) @@ -3088,6 +3088,8 @@ bce_dma_map_addr(void *arg, bus_dma_segm { bus_addr_t *busaddr = arg; + KASSERT(nseg == 1, ("%s(): Too many segments returned (%d)!", + __FUNCTION__, nseg)); /* Simulate a mapping failure. */ DBRUNIF(DB_RANDOMTRUE(dma_map_addr_failed_sim_control), error = ENOMEM);