From: Sneha Narnakaje <[email protected]>

This patch fixes the NETDEV WATCHDOG timeout issue with dm9000 ethernet
driver on DM355, while using the NFS as root filesystem.
In the patch I have replaced the spin_lock/spin_unlock calls with dm9000
specific disable/enable interrupt calls, in the dm9000 hard_start_xmit
routine. Though it seems to be a generic issue discussed in the netdev list,
this fix may not be a permanent solution, yet we can proceed with other drivers
on DM355.
I have also enabled the dm9000 option in the DM355 default configuration.

Signed-off-by: Sneha Narnakaje <[email protected]>
---
 arch/arm/configs/davinci_dm355_defconfig |    6 ++++--
 drivers/net/dm9000.c                     |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/configs/davinci_dm355_defconfig 
b/arch/arm/configs/davinci_dm355_defconfig
index ac303e2..e104c41 100644
--- a/arch/arm/configs/davinci_dm355_defconfig
+++ b/arch/arm/configs/davinci_dm355_defconfig
@@ -494,11 +494,13 @@ CONFIG_TUN=m
 # CONFIG_VETH is not set
 # CONFIG_PHYLIB is not set
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
+CONFIG_MII=y
 # CONFIG_AX88796 is not set
 # CONFIG_SMC91X is not set
 # CONFIG_TI_DAVINCI_EMAC is not set
-# CONFIG_DM9000 is not set
+CONFIG_DM9000=y
+CONFIG_DM9000_DEBUGLEVEL=4
+# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
 # CONFIG_IBM_NEW_EMAC_ZMII is not set
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 5a9083e..ff7e24a 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -758,7 +758,8 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device 
*dev)
        if (db->tx_pkt_cnt > 1)
                return 1;
 
-       spin_lock_irqsave(&db->lock, flags);
+       /* Disable all interrupts */
+       iow(db, DM9000_IMR, IMR_PAR);
 
        /* Move data to DM9000 TX RAM */
        writeb(DM9000_MWCMD, db->io_addr);
@@ -783,7 +784,8 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device 
*dev)
                netif_stop_queue(dev);
        }
 
-       spin_unlock_irqrestore(&db->lock, flags);
+       /* Re-enable interrupt */
+       iow(db, DM9000_IMR, IMR_PAR | IMR_PTM | IMR_PRM);
 
        /* free this SKB */
        dev_kfree_skb(skb);
-- 
1.5.2.5

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to