summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2012-03-14 00:26:36 +0000
committeryongari <yongari@FreeBSD.org>2012-03-14 00:26:36 +0000
commitb0dea277d7876b3df93c8bc46f5e60345430ea88 (patch)
treeb72c23271dec9066237753109bcbd89baa7387f3 /sys/dev/fxp
parent7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19 (diff)
downloadFreeBSD-src-b0dea277d7876b3df93c8bc46f5e60345430ea88.zip
FreeBSD-src-b0dea277d7876b3df93c8bc46f5e60345430ea88.tar.gz
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.
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 8a360e7..344a68e 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -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");
OpenPOWER on IntegriCloud