From owner-svn-src-head@FreeBSD.ORG Wed Mar 14 00:26:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB50A106564A; Wed, 14 Mar 2012 00:26:36 +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 DAE008FC14; Wed, 14 Mar 2012 00:26:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E0QajJ069539; Wed, 14 Mar 2012 00:26:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E0QawP069537; Wed, 14 Mar 2012 00:26:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201203140026.q2E0QawP069537@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Mar 2012 00:26:36 +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: r232951 - head/sys/dev/fxp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 14 Mar 2012 00:26:37 -0000 Author: yongari Date: Wed Mar 14 00:26:36 2012 New Revision: 232951 URL: http://svn.freebsd.org/changeset/base/232951 Log: fxp(4) does not handle deferred dma map loading. Tell bus_dmamap_load(9) that it should return immediately with error when there are insufficient mapping resources. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:09:36 2012 (r232950) +++ head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:26:36 2012 (r232951) @@ -681,7 +681,8 @@ fxp_attach(device_t dev) goto fail; } error = bus_dmamap_load(sc->fxp_stag, sc->fxp_smap, sc->fxp_stats, - sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr, 0); + sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr, + BUS_DMA_NOWAIT); if (error) { device_printf(dev, "could not load the stats DMA buffer\n"); goto fail; @@ -705,7 +706,7 @@ fxp_attach(device_t dev) error = bus_dmamap_load(sc->cbl_tag, sc->cbl_map, sc->fxp_desc.cbl_list, FXP_TXCB_SZ, fxp_dma_map_addr, - &sc->fxp_desc.cbl_addr, 0); + &sc->fxp_desc.cbl_addr, BUS_DMA_NOWAIT); if (error) { device_printf(dev, "could not load TxCB DMA buffer\n"); goto fail; @@ -729,7 +730,8 @@ fxp_attach(device_t dev) goto fail; } error = bus_dmamap_load(sc->mcs_tag, sc->mcs_map, sc->mcsp, - sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr, 0); + sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr, + BUS_DMA_NOWAIT); if (error) { device_printf(dev, "can't load the multicast setup DMA buffer\n");