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");
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to