HI all:
The DM9000 network phy chip on my DM355 board has some issues, during our
testing, we found the system always hung up by ksoftirqd/0 which consumed 98%
CPU, then I do some modifications at "dm9000_start_xmit()", use
"spin_lock_irqsave(&db->lock, irq_flag);", spin_unlock_irqrestore(&db->lock,
irq_flag); the code is below:
/driver/net/dm9000.c
.........................................................................................................................
static int
dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
unsigned long irq_flag; //steven 03-11-09
board_info_t *db = (board_info_t *) dev->priv;
if (db->tx_pkt_cnt > 1)
return 1;
spin_lock_irqsave(&db->lock, irq_flag); //steven 03-11-09
/* Move data to DM9000 TX RAM */
writeb(DM9000_MWCMD, db->io_addr);
(db->outblk)(db->io_data, skb->data, skb->len);
db->stats.tx_bytes += skb->len;
db->tx_pkt_cnt++; //steven 03-11-09
if ( 1 == db->tx_pkt_cnt ) {
/* Set TX length to DM9000 */
iow(db, DM9000_TXPLL, skb->len & 0xff);
iow(db, DM9000_TXPLH, (skb->len >> 8) & 0xff);
/* Issue TX polling command */
iow(db, DM9000_TCR, TCR_TXREQ); /* Cleared after TX complete */
dev->trans_start = jiffies; /* save the time stamp */
} else {
/* Second packet */
db->queue_pkt_len = skb->len;
netif_stop_queue(dev); //steven 03-11-09
}
spin_unlock_irqrestore(&db->lock, irq_flag); //steven 03-11-09
/* free this SKB */
dev_kfree_skb(skb);
return 0;
}
....................................................................................................................
We connected our two same DM355 boards to different two computers, and they
run same program at yesterday. Today, we found the two boards both have one
prompts :"NETDEV WATCHDOG: eth0: transmit timed out", and one board is still
running, but another board has hung up, the ksoftirqd/0 consumes 99% CPU.
I don't know the reason about it, is there somebody who has the same issue?
BESTREGARDS
Steven
_________________________________________________________________
MSN安全保护中心,免费修复系统漏洞,保护MSN安全!
http://im.live.cn/safe/_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source