Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139795
b: refs/heads/master
c: 461cadb
h: refs/heads/master
i:
  139793: 6e267d5
  139791: 3468281
v: v3
  • Loading branch information
Grant Likely authored and David S. Miller committed Apr 2, 2009
1 parent af0e214 commit 81ffcd8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa9a86ddc8ecd2830a5e773facc250f110300ae7
refs/heads/master: 461cadbc62b098b49b55de10605d330c8b494889
19 changes: 12 additions & 7 deletions trunk/drivers/net/fec_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ static void mpc52xx_fec_free_rx_buffers(struct net_device *dev, struct bcom_task
struct sk_buff *skb;

skb = bcom_retrieve_buffer(s, NULL, (struct bcom_bd **)&bd);
dma_unmap_single(&dev->dev, bd->skb_pa, skb->len, DMA_FROM_DEVICE);
dma_unmap_single(dev->dev.parent, bd->skb_pa, skb->len,
DMA_FROM_DEVICE);
kfree_skb(skb);
}
}
Expand All @@ -150,7 +151,7 @@ static int mpc52xx_fec_alloc_rx_buffers(struct net_device *dev, struct bcom_task
bd = (struct bcom_fec_bd *)bcom_prepare_next_buffer(rxtsk);

bd->status = FEC_RX_BUFFER_SIZE;
bd->skb_pa = dma_map_single(&dev->dev, skb->data,
bd->skb_pa = dma_map_single(dev->dev.parent, skb->data,
FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE);

bcom_submit_next_buffer(rxtsk, skb);
Expand Down Expand Up @@ -388,7 +389,8 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *d
bcom_prepare_next_buffer(priv->tx_dmatsk);

bd->status = skb->len | BCOM_FEC_TX_BD_TFD | BCOM_FEC_TX_BD_TC;
bd->skb_pa = dma_map_single(&dev->dev, skb->data, skb->len, DMA_TO_DEVICE);
bd->skb_pa = dma_map_single(dev->dev.parent, skb->data, skb->len,
DMA_TO_DEVICE);

bcom_submit_next_buffer(priv->tx_dmatsk, skb);

Expand Down Expand Up @@ -430,7 +432,8 @@ static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id)
struct bcom_fec_bd *bd;
skb = bcom_retrieve_buffer(priv->tx_dmatsk, NULL,
(struct bcom_bd **)&bd);
dma_unmap_single(&dev->dev, bd->skb_pa, skb->len, DMA_TO_DEVICE);
dma_unmap_single(dev->dev.parent, bd->skb_pa, skb->len,
DMA_TO_DEVICE);

dev_kfree_skb_irq(skb);
}
Expand All @@ -455,7 +458,8 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)

rskb = bcom_retrieve_buffer(priv->rx_dmatsk, &status,
(struct bcom_bd **)&bd);
dma_unmap_single(&dev->dev, bd->skb_pa, rskb->len, DMA_FROM_DEVICE);
dma_unmap_single(dev->dev.parent, bd->skb_pa, rskb->len,
DMA_FROM_DEVICE);

/* Test for errors in received frame */
if (status & BCOM_FEC_RX_BD_ERRORS) {
Expand All @@ -464,7 +468,8 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)
bcom_prepare_next_buffer(priv->rx_dmatsk);

bd->status = FEC_RX_BUFFER_SIZE;
bd->skb_pa = dma_map_single(&dev->dev, rskb->data,
bd->skb_pa = dma_map_single(dev->dev.parent,
rskb->data,
FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE);

bcom_submit_next_buffer(priv->rx_dmatsk, rskb);
Expand Down Expand Up @@ -499,7 +504,7 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)
bcom_prepare_next_buffer(priv->rx_dmatsk);

bd->status = FEC_RX_BUFFER_SIZE;
bd->skb_pa = dma_map_single(&dev->dev, skb->data,
bd->skb_pa = dma_map_single(dev->dev.parent, skb->data,
FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE);

bcom_submit_next_buffer(priv->rx_dmatsk, skb);
Expand Down

0 comments on commit 81ffcd8

Please sign in to comment.