rndis_host: Poll status channel before control channel
[safe/jmp/linux-2.6] / drivers / net / sh_eth.c
index ed52c00..586ed09 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/cache.h>
 #include <linux/io.h>
 #include <linux/pm_runtime.h>
+#include <linux/slab.h>
 #include <asm/cacheflush.h>
 
 #include "sh_eth.h"
@@ -110,7 +111,7 @@ static void sh_eth_reset(struct net_device *ndev)
                mdelay(1);
                cnt--;
        }
-       if (cnt < 0)
+       if (cnt == 0)
                printk(KERN_ERR "Device reset fail\n");
 
        /* Table Init */
@@ -1147,8 +1148,6 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
        if (!(ctrl_inl(ndev->base_addr + EDTRR) & EDTRR_TRNS))
                ctrl_outl(EDTRR_TRNS, ndev->base_addr + EDTRR);
 
-       ndev->trans_start = jiffies;
-
        return NETDEV_TX_OK;
 }