diff options
author | marius <marius@FreeBSD.org> | 2011-11-17 22:56:40 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2011-11-17 22:56:40 +0000 |
commit | b983b40eb07d9b3683a86b2f004fe6cdd0cdd4ad (patch) | |
tree | 0bfe5fc23c725c1566ca0cdf75e31d4358419a5c /sys/dev/sfxge/sfxge_tx.c | |
parent | 80bb061555075b1eb14b95d396539d4d87d3db1b (diff) | |
download | FreeBSD-src-b983b40eb07d9b3683a86b2f004fe6cdd0cdd4ad.zip FreeBSD-src-b983b40eb07d9b3683a86b2f004fe6cdd0cdd4ad.tar.gz |
Fix compilation on ILP32.
Diffstat (limited to 'sys/dev/sfxge/sfxge_tx.c')
-rw-r--r-- | sys/dev/sfxge/sfxge_tx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c index 5f0aece..801787a 100644 --- a/sys/dev/sfxge/sfxge_tx.c +++ b/sys/dev/sfxge/sfxge_tx.c @@ -135,7 +135,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *txq) /* Acquire the put list. */ putp = &stdp->std_put; - put = atomic_readandclear_long(putp); + put = atomic_readandclear_ptr(putp); mbuf = (void *)put; if (mbuf == NULL) @@ -484,7 +484,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, struct mbuf *mbuf, int locked) return ENOBUFS; mbuf->m_pkthdr.csum_data = old_len + 1; mbuf->m_nextpkt = (void *)old; - } while (atomic_cmpset_long(putp, old, new) == 0); + } while (atomic_cmpset_ptr(putp, old, new) == 0); } return (0); @@ -1323,9 +1323,9 @@ sfxge_tx_qinit(struct sfxge_softc *sc, unsigned int txq_index, &txq->buf_base_id); /* Create a DMA tag for packet mappings. */ - if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000, 0x3FFFFFFFFFFFULL, - BUS_SPACE_MAXADDR, NULL, NULL, 0x11000, - SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL, + if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000, + MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL, + NULL, 0x11000, SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL, &txq->packet_dma_tag) != 0) { device_printf(sc->dev, "Couldn't allocate txq DMA tag\n"); rc = ENOMEM; |