Commit 4be5de25 authored by Roger Luethi's avatar Roger Luethi Committed by Jeff Garzik

[PATCH] via-rhine: execute bounce buffers code on Rhine-I only

Patch suggested by Yang Wu (pin xue <pinxue@gmail.com>).
Signed-off-by: default avatarRoger Luethi <rl@hellgate.ch>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent ff768cd7
...@@ -469,7 +469,7 @@ struct rhine_private { ...@@ -469,7 +469,7 @@ struct rhine_private {
struct sk_buff *tx_skbuff[TX_RING_SIZE]; struct sk_buff *tx_skbuff[TX_RING_SIZE];
dma_addr_t tx_skbuff_dma[TX_RING_SIZE]; dma_addr_t tx_skbuff_dma[TX_RING_SIZE];
/* Tx bounce buffers */ /* Tx bounce buffers (Rhine-I only) */
unsigned char *tx_buf[TX_RING_SIZE]; unsigned char *tx_buf[TX_RING_SIZE];
unsigned char *tx_bufs; unsigned char *tx_bufs;
dma_addr_t tx_bufs_dma; dma_addr_t tx_bufs_dma;
...@@ -1043,6 +1043,7 @@ static void alloc_tbufs(struct net_device* dev) ...@@ -1043,6 +1043,7 @@ static void alloc_tbufs(struct net_device* dev)
rp->tx_ring[i].desc_length = cpu_to_le32(TXDESC); rp->tx_ring[i].desc_length = cpu_to_le32(TXDESC);
next += sizeof(struct tx_desc); next += sizeof(struct tx_desc);
rp->tx_ring[i].next_desc = cpu_to_le32(next); rp->tx_ring[i].next_desc = cpu_to_le32(next);
if (rp->quirks & rqRhineI)
rp->tx_buf[i] = &rp->tx_bufs[i * PKT_BUF_SZ]; rp->tx_buf[i] = &rp->tx_bufs[i * PKT_BUF_SZ];
} }
rp->tx_ring[i-1].next_desc = cpu_to_le32(rp->tx_ring_dma); rp->tx_ring[i-1].next_desc = cpu_to_le32(rp->tx_ring_dma);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment