aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 0431e9ed0fac..718cf77e345a 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -130,8 +130,8 @@ static void free_skb_resources(struct gfar_private *priv);
130static void gfar_set_multi(struct net_device *dev); 130static void gfar_set_multi(struct net_device *dev);
131static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr); 131static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr);
132static void gfar_configure_serdes(struct net_device *dev); 132static void gfar_configure_serdes(struct net_device *dev);
133extern int gfar_local_mdio_write(struct gfar_mii *regs, int mii_id, int regnum, u16 value); 133extern int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id, int regnum, u16 value);
134extern int gfar_local_mdio_read(struct gfar_mii *regs, int mii_id, int regnum); 134extern int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum);
135#ifdef CONFIG_GFAR_NAPI 135#ifdef CONFIG_GFAR_NAPI
136static int gfar_poll(struct napi_struct *napi, int budget); 136static int gfar_poll(struct napi_struct *napi, int budget);
137#endif 137#endif
@@ -605,7 +605,7 @@ void stop_gfar(struct net_device *dev)
605 605
606 free_skb_resources(priv); 606 free_skb_resources(priv);
607 607
608 dma_free_coherent(NULL, 608 dma_free_coherent(&dev->dev,
609 sizeof(struct txbd8)*priv->tx_ring_size 609 sizeof(struct txbd8)*priv->tx_ring_size
610 + sizeof(struct rxbd8)*priv->rx_ring_size, 610 + sizeof(struct rxbd8)*priv->rx_ring_size,
611 priv->tx_bd_base, 611 priv->tx_bd_base,
@@ -626,7 +626,7 @@ static void free_skb_resources(struct gfar_private *priv)
626 for (i = 0; i < priv->tx_ring_size; i++) { 626 for (i = 0; i < priv->tx_ring_size; i++) {
627 627
628 if (priv->tx_skbuff[i]) { 628 if (priv->tx_skbuff[i]) {
629 dma_unmap_single(NULL, txbdp->bufPtr, 629 dma_unmap_single(&priv->dev->dev, txbdp->bufPtr,
630 txbdp->length, 630 txbdp->length,
631 DMA_TO_DEVICE); 631 DMA_TO_DEVICE);
632 dev_kfree_skb_any(priv->tx_skbuff[i]); 632 dev_kfree_skb_any(priv->tx_skbuff[i]);
@@ -643,7 +643,7 @@ static void free_skb_resources(struct gfar_private *priv)
643 if(priv->rx_skbuff != NULL) { 643 if(priv->rx_skbuff != NULL) {
644 for (i = 0; i < priv->rx_ring_size; i++) { 644 for (i = 0; i < priv->rx_ring_size; i++) {
645 if (priv->rx_skbuff[i]) { 645 if (priv->rx_skbuff[i]) {
646 dma_unmap_single(NULL, rxbdp->bufPtr, 646 dma_unmap_single(&priv->dev->dev, rxbdp->bufPtr,
647 priv->rx_buffer_size, 647 priv->rx_buffer_size,
648 DMA_FROM_DEVICE); 648 DMA_FROM_DEVICE);
649 649
@@ -708,7 +708,7 @@ int startup_gfar(struct net_device *dev)
708 gfar_write(&regs->imask, IMASK_INIT_CLEAR); 708 gfar_write(&regs->imask, IMASK_INIT_CLEAR);
709 709
710 /* Allocate memory for the buffer descriptors */ 710 /* Allocate memory for the buffer descriptors */
711 vaddr = (unsigned long) dma_alloc_coherent(NULL, 711 vaddr = (unsigned long) dma_alloc_coherent(&dev->dev,
712 sizeof (struct txbd8) * priv->tx_ring_size + 712 sizeof (struct txbd8) * priv->tx_ring_size +
713 sizeof (struct rxbd8) * priv->rx_ring_size, 713 sizeof (struct rxbd8) * priv->rx_ring_size,
714 &addr, GFP_KERNEL); 714 &addr, GFP_KERNEL);
@@ -919,7 +919,7 @@ err_irq_fail:
919rx_skb_fail: 919rx_skb_fail:
920 free_skb_resources(priv); 920 free_skb_resources(priv);
921tx_skb_fail: 921tx_skb_fail:
922 dma_free_coherent(NULL, 922 dma_free_coherent(&dev->dev,
923 sizeof(struct txbd8)*priv->tx_ring_size 923 sizeof(struct txbd8)*priv->tx_ring_size
924 + sizeof(struct rxbd8)*priv->rx_ring_size, 924 + sizeof(struct rxbd8)*priv->rx_ring_size,
925 priv->tx_bd_base, 925 priv->tx_bd_base,
@@ -1053,7 +1053,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
1053 1053
1054 /* Set buffer length and pointer */ 1054 /* Set buffer length and pointer */
1055 txbdp->length = skb->len; 1055 txbdp->length = skb->len;
1056 txbdp->bufPtr = dma_map_single(NULL, skb->data, 1056 txbdp->bufPtr = dma_map_single(&dev->dev, skb->data,
1057 skb->len, DMA_TO_DEVICE); 1057 skb->len, DMA_TO_DEVICE);
1058 1058
1059 /* Save the skb pointer so we can free it later */ 1059 /* Save the skb pointer so we can free it later */
@@ -1332,7 +1332,7 @@ struct sk_buff * gfar_new_skb(struct net_device *dev, struct rxbd8 *bdp)
1332 */ 1332 */
1333 skb_reserve(skb, alignamount); 1333 skb_reserve(skb, alignamount);
1334 1334
1335 bdp->bufPtr = dma_map_single(NULL, skb->data, 1335 bdp->bufPtr = dma_map_single(&dev->dev, skb->data,
1336 priv->rx_buffer_size, DMA_FROM_DEVICE); 1336 priv->rx_buffer_size, DMA_FROM_DEVICE);
1337 1337
1338 bdp->length = 0; 1338 bdp->length = 0;