diff options
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r-- | drivers/net/ucc_geth.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 933fcfbf35e1..d3f39e86eb95 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/dma-mapping.h> | 26 | #include <linux/dma-mapping.h> |
27 | #include <linux/fsl_devices.h> | ||
28 | #include <linux/mii.h> | 27 | #include <linux/mii.h> |
29 | #include <linux/phy.h> | 28 | #include <linux/phy.h> |
30 | #include <linux/workqueue.h> | 29 | #include <linux/workqueue.h> |
@@ -223,10 +222,10 @@ static struct sk_buff *get_new_skb(struct ucc_geth_private *ugeth, | |||
223 | (((unsigned)skb->data) & (UCC_GETH_RX_DATA_BUF_ALIGNMENT - | 222 | (((unsigned)skb->data) & (UCC_GETH_RX_DATA_BUF_ALIGNMENT - |
224 | 1))); | 223 | 1))); |
225 | 224 | ||
226 | skb->dev = ugeth->dev; | 225 | skb->dev = ugeth->ndev; |
227 | 226 | ||
228 | out_be32(&((struct qe_bd __iomem *)bd)->buf, | 227 | out_be32(&((struct qe_bd __iomem *)bd)->buf, |
229 | dma_map_single(&ugeth->dev->dev, | 228 | dma_map_single(ugeth->dev, |
230 | skb->data, | 229 | skb->data, |
231 | ugeth->ug_info->uf_info.max_rx_buf_length + | 230 | ugeth->ug_info->uf_info.max_rx_buf_length + |
232 | UCC_GETH_RX_DATA_BUF_ALIGNMENT, | 231 | UCC_GETH_RX_DATA_BUF_ALIGNMENT, |
@@ -1872,7 +1871,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth) | |||
1872 | continue; | 1871 | continue; |
1873 | for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) { | 1872 | for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) { |
1874 | if (ugeth->tx_skbuff[i][j]) { | 1873 | if (ugeth->tx_skbuff[i][j]) { |
1875 | dma_unmap_single(&ugeth->dev->dev, | 1874 | dma_unmap_single(ugeth->dev, |
1876 | in_be32(&((struct qe_bd __iomem *)bd)->buf), | 1875 | in_be32(&((struct qe_bd __iomem *)bd)->buf), |
1877 | (in_be32((u32 __iomem *)bd) & | 1876 | (in_be32((u32 __iomem *)bd) & |
1878 | BD_LENGTH_MASK), | 1877 | BD_LENGTH_MASK), |
@@ -1900,7 +1899,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth) | |||
1900 | bd = ugeth->p_rx_bd_ring[i]; | 1899 | bd = ugeth->p_rx_bd_ring[i]; |
1901 | for (j = 0; j < ugeth->ug_info->bdRingLenRx[i]; j++) { | 1900 | for (j = 0; j < ugeth->ug_info->bdRingLenRx[i]; j++) { |
1902 | if (ugeth->rx_skbuff[i][j]) { | 1901 | if (ugeth->rx_skbuff[i][j]) { |
1903 | dma_unmap_single(&ugeth->dev->dev, | 1902 | dma_unmap_single(ugeth->dev, |
1904 | in_be32(&((struct qe_bd __iomem *)bd)->buf), | 1903 | in_be32(&((struct qe_bd __iomem *)bd)->buf), |
1905 | ugeth->ug_info-> | 1904 | ugeth->ug_info-> |
1906 | uf_info.max_rx_buf_length + | 1905 | uf_info.max_rx_buf_length + |
@@ -3071,7 +3070,7 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3071 | 3070 | ||
3072 | /* set up the buffer descriptor */ | 3071 | /* set up the buffer descriptor */ |
3073 | out_be32(&((struct qe_bd __iomem *)bd)->buf, | 3072 | out_be32(&((struct qe_bd __iomem *)bd)->buf, |
3074 | dma_map_single(&ugeth->dev->dev, skb->data, | 3073 | dma_map_single(ugeth->dev, skb->data, |
3075 | skb->len, DMA_TO_DEVICE)); | 3074 | skb->len, DMA_TO_DEVICE)); |
3076 | 3075 | ||
3077 | /* printk(KERN_DEBUG"skb->data is 0x%x\n",skb->data); */ | 3076 | /* printk(KERN_DEBUG"skb->data is 0x%x\n",skb->data); */ |
@@ -3127,7 +3126,7 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit | |||
3127 | 3126 | ||
3128 | ugeth_vdbg("%s: IN", __func__); | 3127 | ugeth_vdbg("%s: IN", __func__); |
3129 | 3128 | ||
3130 | dev = ugeth->dev; | 3129 | dev = ugeth->ndev; |
3131 | 3130 | ||
3132 | /* collect received buffers */ | 3131 | /* collect received buffers */ |
3133 | bd = ugeth->rxBd[rxQ]; | 3132 | bd = ugeth->rxBd[rxQ]; |
@@ -3161,7 +3160,7 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit | |||
3161 | skb_put(skb, length); | 3160 | skb_put(skb, length); |
3162 | 3161 | ||
3163 | /* Tell the skb what kind of packet this is */ | 3162 | /* Tell the skb what kind of packet this is */ |
3164 | skb->protocol = eth_type_trans(skb, ugeth->dev); | 3163 | skb->protocol = eth_type_trans(skb, ugeth->ndev); |
3165 | 3164 | ||
3166 | dev->stats.rx_bytes += length; | 3165 | dev->stats.rx_bytes += length; |
3167 | /* Send the packet up the stack */ | 3166 | /* Send the packet up the stack */ |
@@ -3432,7 +3431,7 @@ static int ucc_geth_close(struct net_device *dev) | |||
3432 | 3431 | ||
3433 | ucc_geth_stop(ugeth); | 3432 | ucc_geth_stop(ugeth); |
3434 | 3433 | ||
3435 | free_irq(ugeth->ug_info->uf_info.irq, ugeth->dev); | 3434 | free_irq(ugeth->ug_info->uf_info.irq, ugeth->ndev); |
3436 | 3435 | ||
3437 | netif_stop_queue(dev); | 3436 | netif_stop_queue(dev); |
3438 | 3437 | ||
@@ -3446,7 +3445,7 @@ static void ucc_geth_timeout_work(struct work_struct *work) | |||
3446 | struct net_device *dev; | 3445 | struct net_device *dev; |
3447 | 3446 | ||
3448 | ugeth = container_of(work, struct ucc_geth_private, timeout_work); | 3447 | ugeth = container_of(work, struct ucc_geth_private, timeout_work); |
3449 | dev = ugeth->dev; | 3448 | dev = ugeth->ndev; |
3450 | 3449 | ||
3451 | ugeth_vdbg("%s: IN", __func__); | 3450 | ugeth_vdbg("%s: IN", __func__); |
3452 | 3451 | ||
@@ -3756,7 +3755,8 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3756 | memcpy(dev->dev_addr, mac_addr, 6); | 3755 | memcpy(dev->dev_addr, mac_addr, 6); |
3757 | 3756 | ||
3758 | ugeth->ug_info = ug_info; | 3757 | ugeth->ug_info = ug_info; |
3759 | ugeth->dev = dev; | 3758 | ugeth->dev = device; |
3759 | ugeth->ndev = dev; | ||
3760 | ugeth->node = np; | 3760 | ugeth->node = np; |
3761 | 3761 | ||
3762 | return 0; | 3762 | return 0; |