diff options
author | yongari <yongari@FreeBSD.org> | 2013-07-17 01:34:25 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2013-07-17 01:34:25 +0000 |
commit | 09a8106a6978d4b2c86c1a1b17416aabea02a4c1 (patch) | |
tree | f7c7b4c45dc43b8b5ce262c3850a769e50ba5caa /sys/dev/ae/if_ae.c | |
parent | c904a3d6dbb6ac2cf8f9a96c8f90a446d80cb9a2 (diff) | |
download | FreeBSD-src-09a8106a6978d4b2c86c1a1b17416aabea02a4c1.zip FreeBSD-src-09a8106a6978d4b2c86c1a1b17416aabea02a4c1.tar.gz |
Avoid magic constant.
No functional change.
Diffstat (limited to 'sys/dev/ae/if_ae.c')
-rw-r--r-- | sys/dev/ae/if_ae.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/ae/if_ae.c b/sys/dev/ae/if_ae.c index 306a296..f10763b 100644 --- a/sys/dev/ae/if_ae.c +++ b/sys/dev/ae/if_ae.c @@ -585,7 +585,7 @@ ae_init_locked(ae_softc_t *sc) val = eaddr[0] << 8 | eaddr[1]; AE_WRITE_4(sc, AE_EADDR1_REG, val); - bzero(sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + 120); + bzero(sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING); bzero(sc->txd_base, AE_TXD_BUFSIZE_DEFAULT); bzero(sc->txs_base, AE_TXS_COUNT_DEFAULT * 4); /* @@ -1145,8 +1145,8 @@ ae_alloc_rings(ae_softc_t *sc) */ error = bus_dma_tag_create(sc->dma_parent_tag, 128, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, - NULL, NULL, AE_RXD_COUNT_DEFAULT * 1536 + 120, 1, - AE_RXD_COUNT_DEFAULT * 1536 + 120, 0, NULL, NULL, + NULL, NULL, AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING, 1, + AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING, 0, NULL, NULL, &sc->dma_rxd_tag); if (error != 0) { device_printf(sc->dev, "could not creare TxS DMA tag.\n"); @@ -1205,15 +1205,15 @@ ae_alloc_rings(ae_softc_t *sc) return (error); } error = bus_dmamap_load(sc->dma_rxd_tag, sc->dma_rxd_map, - sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + 120, ae_dmamap_cb, - &busaddr, BUS_DMA_NOWAIT); + sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING, + ae_dmamap_cb, &busaddr, BUS_DMA_NOWAIT); if (error != 0 || busaddr == 0) { device_printf(sc->dev, "could not load DMA map for RxD ring.\n"); return (error); } - sc->dma_rxd_busaddr = busaddr + 120; - sc->rxd_base = (ae_rxd_t *)(sc->rxd_base_dma + 120); + sc->dma_rxd_busaddr = busaddr + AE_RXD_PADDING; + sc->rxd_base = (ae_rxd_t *)(sc->rxd_base_dma + AE_RXD_PADDING); return (0); } |