]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/pxa168_eth.c
Merge branch 'master' into tk71
[mv-sheeva.git] / drivers / net / pxa168_eth.c
index 85eddda276bdf350f17660fd2361b86e059b9001..1b63c8aef121cb6dd723e08c69cbfa4c334f698b 100644 (file)
@@ -4,6 +4,7 @@
  *
  * Copyright (C) 2010 Marvell International Ltd.
  *             Sachin Sanap <ssanap@marvell.com>
+ *             Zhangfei Gao <zgao6@marvell.com>
  *             Philip Rakity <prakity@marvell.com>
  *             Mark Brown <markb@marvell.com>
  *
@@ -42,8 +43,6 @@
 #include <linux/types.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
-#include <linux/delay.h>
-#include <linux/dma-mapping.h>
 #include <asm/cacheflush.h>
 #include <linux/pxa168_eth.h>
 
@@ -850,7 +849,6 @@ static int rxq_process(struct net_device *dev, int budget)
                        skb->protocol = eth_type_trans(skb, dev);
                        netif_receive_skb(skb);
                }
-               dev->last_rx = jiffies;
        }
        /* Fill RX ring with skb's */
        rxq_refill(dev);
@@ -1452,16 +1450,11 @@ static void pxa168_get_drvinfo(struct net_device *dev,
        strncpy(info->bus_info, "N/A", 32);
 }
 
-static u32 pxa168_get_link(struct net_device *dev)
-{
-       return !!netif_carrier_ok(dev);
-}
-
 static const struct ethtool_ops pxa168_ethtool_ops = {
        .get_settings = pxa168_get_settings,
        .set_settings = pxa168_set_settings,
        .get_drvinfo = pxa168_get_drvinfo,
-       .get_link = pxa168_get_link,
+       .get_link = ethtool_op_get_link,
 };
 
 static const struct net_device_ops pxa168_eth_netdev_ops = {
@@ -1609,7 +1602,7 @@ static int pxa168_eth_remove(struct platform_device *pdev)
        mdiobus_unregister(pep->smi_bus);
        mdiobus_free(pep->smi_bus);
        unregister_netdev(dev);
-       flush_scheduled_work();
+       cancel_work_sync(&pep->tx_timeout_task);
        free_netdev(dev);
        platform_set_drvdata(pdev, NULL);
        return 0;