Date: Mon, 19 Jul 2010 23:25:19 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r210267 - head/sys/dev/bce Message-ID: <201007192325.o6JNPJIE015301@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007192325.o6JNPJIE015301>