Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2012 00:26:36 +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: r232951 - head/sys/dev/fxp
Message-ID:  <201203140026.q2E0QawP069537@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203140026.q2E0QawP069537>