aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ucc_geth.c
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2008-05-15 18:00:21 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-05-22 06:19:24 -0400
commit7f80202bb964dd9c5b408af8100c7f0fd39a15c7 (patch)
tree0ed3bf90918dc2f3c1d574aa4ac8a7b3aa6c7318 /drivers/net/ucc_geth.c
parent940608be2e6117c17c19b203f7393ced4d02590a (diff)
ucc_geth: Fix arguments to dma map/unmap functions
We were passing NULL as the device. When we actually start supporting more interesting memory configurations, this will break things, so we proactively are fixing the bug. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r--drivers/net/ucc_geth.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index ca0bdac07a78..fb0b918e5ccb 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -237,7 +237,7 @@ static struct sk_buff *get_new_skb(struct ucc_geth_private *ugeth,
237 skb->dev = ugeth->dev; 237 skb->dev = ugeth->dev;
238 238
239 out_be32(&((struct qe_bd __iomem *)bd)->buf, 239 out_be32(&((struct qe_bd __iomem *)bd)->buf,
240 dma_map_single(NULL, 240 dma_map_single(&ugeth->dev->dev,
241 skb->data, 241 skb->data,
242 ugeth->ug_info->uf_info.max_rx_buf_length + 242 ugeth->ug_info->uf_info.max_rx_buf_length +
243 UCC_GETH_RX_DATA_BUF_ALIGNMENT, 243 UCC_GETH_RX_DATA_BUF_ALIGNMENT,
@@ -2158,7 +2158,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)
2158 continue; 2158 continue;
2159 for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) { 2159 for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) {
2160 if (ugeth->tx_skbuff[i][j]) { 2160 if (ugeth->tx_skbuff[i][j]) {
2161 dma_unmap_single(NULL, 2161 dma_unmap_single(&ugeth->dev->dev,
2162 in_be32(&((struct qe_bd __iomem *)bd)->buf), 2162 in_be32(&((struct qe_bd __iomem *)bd)->buf),
2163 (in_be32((u32 __iomem *)bd) & 2163 (in_be32((u32 __iomem *)bd) &
2164 BD_LENGTH_MASK), 2164 BD_LENGTH_MASK),
@@ -2186,7 +2186,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)
2186 bd = ugeth->p_rx_bd_ring[i]; 2186 bd = ugeth->p_rx_bd_ring[i];
2187 for (j = 0; j < ugeth->ug_info->bdRingLenRx[i]; j++) { 2187 for (j = 0; j < ugeth->ug_info->bdRingLenRx[i]; j++) {
2188 if (ugeth->rx_skbuff[i][j]) { 2188 if (ugeth->rx_skbuff[i][j]) {
2189 dma_unmap_single(NULL, 2189 dma_unmap_single(&ugeth->dev->dev,
2190 in_be32(&((struct qe_bd __iomem *)bd)->buf), 2190 in_be32(&((struct qe_bd __iomem *)bd)->buf),
2191 ugeth->ug_info-> 2191 ugeth->ug_info->
2192 uf_info.max_rx_buf_length + 2192 uf_info.max_rx_buf_length +
@@ -3406,7 +3406,8 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
3406 3406
3407 /* set up the buffer descriptor */ 3407 /* set up the buffer descriptor */
3408 out_be32(&((struct qe_bd __iomem *)bd)->buf, 3408 out_be32(&((struct qe_bd __iomem *)bd)->buf,
3409 dma_map_single(NULL, skb->data, skb->len, DMA_TO_DEVICE)); 3409 dma_map_single(&ugeth->dev->dev, skb->data,
3410 skb->len, DMA_TO_DEVICE));
3410 3411
3411 /* printk(KERN_DEBUG"skb->data is 0x%x\n",skb->data); */ 3412 /* printk(KERN_DEBUG"skb->data is 0x%x\n",skb->data); */
3412 3413