summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-08-09 12:43:47 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-08-09 12:43:47 +0000
commitacf800f7dc984e146da5feadb92154a4adb3cf9d (patch)
tree92dd7ecfa556f9fb1782c17a41cc336f03e6f56c /sys/dev
parent7f33089a1dfc27644a310c960fe208475cfc5461 (diff)
remove oce_dmamap_sync wrapper
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_oce.c21
-rw-r--r--sys/dev/pci/ocevar.h4
2 files changed, 14 insertions, 11 deletions
diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c
index 488263fb48f..1dffad18b8b 100644
--- a/sys/dev/pci/if_oce.c
+++ b/sys/dev/pci/if_oce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_oce.c,v 1.7 2012/08/08 17:50:24 mikeb Exp $ */
+/* $OpenBSD: if_oce.c,v 1.8 2012/08/09 12:43:46 mikeb Exp $ */
/*
* Copyright (c) 2012 Mike Belopuhov
@@ -652,7 +652,8 @@ retry:
return EBUSY;
}
- oce_dmamap_sync(wq->tag, pd->map, BUS_DMASYNC_PREWRITE);
+ bus_dmamap_sync(wq->tag, pd->map, 0, pd->map->dm_mapsize,
+ BUS_DMASYNC_PREWRITE);
pd->mbuf = m;
wq->packets_out = out;
@@ -755,7 +756,8 @@ oce_txeof(struct oce_wq *wq, uint32_t wqe_idx, uint32_t status)
pd = &wq->pckts[wq->packets_in];
wq->packets_in = in;
wq->ring->num_used -= (pd->nsegs + 1);
- oce_dmamap_sync(wq->tag, pd->map, BUS_DMASYNC_POSTWRITE);
+ bus_dmamap_sync(wq->tag, pd->map, 0, pd->map->dm_mapsize,
+ BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(wq->tag, pd->map);
m = pd->mbuf;
@@ -945,7 +947,8 @@ oce_rxeof(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe)
pd = &rq->pckts[rq->packets_out];
rq->packets_out = out;
- oce_dmamap_sync(rq->tag, pd->map, BUS_DMASYNC_POSTWRITE);
+ bus_dmamap_sync(rq->tag, pd->map, 0, pd->map->dm_mapsize,
+ BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(rq->tag, pd->map);
rq->pending--;
@@ -1082,7 +1085,8 @@ oce_discard_rx_comp(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe)
pd = &rq->pckts[rq->packets_out];
rq->packets_out = out;
- oce_dmamap_sync(rq->tag, pd->map, BUS_DMASYNC_POSTWRITE);
+ bus_dmamap_sync(rq->tag, pd->map, 0, pd->map->dm_mapsize,
+ BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(rq->tag, pd->map);
rq->pending--;
m_freem(pd->mbuf);
@@ -1218,7 +1222,8 @@ oce_get_buf(struct oce_rq *rq)
}
rq->packets_in = in;
- oce_dmamap_sync(rq->tag, pd->map, BUS_DMASYNC_PREREAD);
+ bus_dmamap_sync(rq->tag, pd->map, 0, pd->map->dm_mapsize,
+ BUS_DMASYNC_PREREAD);
rqe = RING_GET_PRODUCER_ITEM_VA(rq->ring, struct oce_nic_rqe);
rqe->u0.s.frag_pa_hi = ADDR_HI(segs[0].ds_addr);
@@ -2394,7 +2399,6 @@ oce_drain_rq_cq(struct oce_rq *rq)
oce_arm_cq(sc, cq->cq_id, num_cqe, FALSE);
}
-
void
oce_free_posted_rxbuf(struct oce_rq *rq)
{
@@ -2402,7 +2406,8 @@ oce_free_posted_rxbuf(struct oce_rq *rq)
while (rq->pending) {
pd = &rq->pckts[rq->packets_out];
- oce_dmamap_sync(rq->tag, pd->map, BUS_DMASYNC_POSTWRITE);
+ bus_dmamap_sync(rq->tag, pd->map, 0, pd->map->dm_mapsize,
+ BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(rq->tag, pd->map);
if (pd->mbuf != NULL) {
m_freem(pd->mbuf);
diff --git a/sys/dev/pci/ocevar.h b/sys/dev/pci/ocevar.h
index dabf6aca781..e2dbe243bb9 100644
--- a/sys/dev/pci/ocevar.h
+++ b/sys/dev/pci/ocevar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocevar.h,v 1.5 2012/08/07 17:16:26 mikeb Exp $ */
+/* $OpenBSD: ocevar.h,v 1.6 2012/08/09 12:43:46 mikeb Exp $ */
/*-
* Copyright (C) 2012 Emulex
@@ -806,8 +806,6 @@ oce_bus_write_1(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t reg,
***********************************************************/
#define oce_dma_sync(d, f) \
bus_dmamap_sync((d)->tag, (d)->map, 0, (d)->map->dm_mapsize, f)
-#define oce_dmamap_sync(t, m, f) \
- bus_dmamap_sync(t, m, 0, (m)->dm_mapsize, f)
int oce_dma_alloc(struct oce_softc *sc, bus_size_t size,
struct oce_dma_mem *dma, int flags);
void oce_dma_free(struct oce_softc *sc, struct oce_dma_mem *dma);