Use bus_get_dma_tag() to obtain the parent DMA tag.
Reviewed by: sam, sephe, thompsa Approved by: re (kensmith)
This commit is contained in:
parent
7e23029ae6
commit
36ffd4ba6d
@ -410,9 +410,10 @@ rt2560_alloc_tx_ring(struct rt2560_softc *sc, struct rt2560_tx_ring *ring,
|
||||
ring->cur = ring->next = 0;
|
||||
ring->cur_encrypt = ring->next_encrypt = 0;
|
||||
|
||||
error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
|
||||
BUS_SPACE_MAXADDR, NULL, NULL, count * RT2560_TX_DESC_SIZE, 1,
|
||||
count * RT2560_TX_DESC_SIZE, 0, NULL, NULL, &ring->desc_dmat);
|
||||
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 4, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
|
||||
count * RT2560_TX_DESC_SIZE, 1, count * RT2560_TX_DESC_SIZE,
|
||||
0, NULL, NULL, &ring->desc_dmat);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "could not create desc DMA tag\n");
|
||||
goto fail;
|
||||
@ -441,9 +442,10 @@ rt2560_alloc_tx_ring(struct rt2560_softc *sc, struct rt2560_tx_ring *ring,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
|
||||
BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, RT2560_MAX_SCATTER,
|
||||
MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
|
||||
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
|
||||
MCLBYTES, RT2560_MAX_SCATTER, MCLBYTES, 0, NULL, NULL,
|
||||
&ring->data_dmat);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "could not create data DMA tag\n");
|
||||
goto fail;
|
||||
@ -552,9 +554,10 @@ rt2560_alloc_rx_ring(struct rt2560_softc *sc, struct rt2560_rx_ring *ring,
|
||||
ring->cur = ring->next = 0;
|
||||
ring->cur_decrypt = 0;
|
||||
|
||||
error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
|
||||
BUS_SPACE_MAXADDR, NULL, NULL, count * RT2560_RX_DESC_SIZE, 1,
|
||||
count * RT2560_RX_DESC_SIZE, 0, NULL, NULL, &ring->desc_dmat);
|
||||
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 4, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
|
||||
count * RT2560_RX_DESC_SIZE, 1, count * RT2560_RX_DESC_SIZE,
|
||||
0, NULL, NULL, &ring->desc_dmat);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "could not create desc DMA tag\n");
|
||||
goto fail;
|
||||
@ -586,9 +589,9 @@ rt2560_alloc_rx_ring(struct rt2560_softc *sc, struct rt2560_rx_ring *ring,
|
||||
/*
|
||||
* Pre-allocate Rx buffers and populate Rx ring.
|
||||
*/
|
||||
error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
|
||||
BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL,
|
||||
NULL, &ring->data_dmat);
|
||||
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES,
|
||||
1, MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "could not create data DMA tag\n");
|
||||
goto fail;
|
||||
|
@ -445,9 +445,10 @@ rt2661_alloc_tx_ring(struct rt2661_softc *sc, struct rt2661_tx_ring *ring,
|
||||
ring->queued = 0;
|
||||
ring->cur = ring->next = ring->stat = 0;
|
||||
|
||||
error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
|
||||
BUS_SPACE_MAXADDR, NULL, NULL, count * RT2661_TX_DESC_SIZE, 1,
|
||||
count * RT2661_TX_DESC_SIZE, 0, NULL, NULL, &ring->desc_dmat);
|
||||
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 4, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
|
||||
count * RT2661_TX_DESC_SIZE, 1, count * RT2661_TX_DESC_SIZE,
|
||||
0, NULL, NULL, &ring->desc_dmat);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "could not create desc DMA tag\n");
|
||||
goto fail;
|
||||
@ -476,9 +477,9 @@ rt2661_alloc_tx_ring(struct rt2661_softc *sc, struct rt2661_tx_ring *ring,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
|
||||
BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, RT2661_MAX_SCATTER,
|
||||
MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
|
||||
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES,
|
||||
RT2661_MAX_SCATTER, MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "could not create data DMA tag\n");
|
||||
goto fail;
|
||||
@ -585,9 +586,10 @@ rt2661_alloc_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring,
|
||||
ring->count = count;
|
||||
ring->cur = ring->next = 0;
|
||||
|
||||
error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
|
||||
BUS_SPACE_MAXADDR, NULL, NULL, count * RT2661_RX_DESC_SIZE, 1,
|
||||
count * RT2661_RX_DESC_SIZE, 0, NULL, NULL, &ring->desc_dmat);
|
||||
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 4, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
|
||||
count * RT2661_RX_DESC_SIZE, 1, count * RT2661_RX_DESC_SIZE,
|
||||
0, NULL, NULL, &ring->desc_dmat);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "could not create desc DMA tag\n");
|
||||
goto fail;
|
||||
@ -619,9 +621,9 @@ rt2661_alloc_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring,
|
||||
/*
|
||||
* Pre-allocate Rx buffers and populate Rx ring.
|
||||
*/
|
||||
error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
|
||||
BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL,
|
||||
NULL, &ring->data_dmat);
|
||||
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES,
|
||||
1, MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "could not create data DMA tag\n");
|
||||
goto fail;
|
||||
|
Loading…
x
Reference in New Issue
Block a user