Commit 171c33e5 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dscc4: debug messages

From: Francois Romieu <romieu@fr.zoreil.com>

More conditional debug messages.
parent b3ddbe8f
...@@ -1385,6 +1385,8 @@ static irqreturn_t dscc4_irq(int irq, void *token, struct pt_regs *ptregs) ...@@ -1385,6 +1385,8 @@ static irqreturn_t dscc4_irq(int irq, void *token, struct pt_regs *ptregs)
handled = 0; handled = 0;
goto out; goto out;
} }
if (debug > 3)
printk(KERN_DEBUG "%s: GSTAR = 0x%08x\n", DRV_NAME, state);
writel(state, ioaddr + GSTAR); writel(state, ioaddr + GSTAR);
if (state & Arf) { if (state & Arf) {
...@@ -1431,6 +1433,9 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv, ...@@ -1431,6 +1433,9 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv,
cur = dpriv->iqtx_current%IRQ_RING_SIZE; cur = dpriv->iqtx_current%IRQ_RING_SIZE;
state = dpriv->iqtx[cur]; state = dpriv->iqtx[cur];
if (!state) { if (!state) {
if (debug > 4)
printk(KERN_DEBUG "%s: Tx ISR = 0x%08x\n", dev->name,
state);
if ((debug > 1) && (loop > 1)) if ((debug > 1) && (loop > 1))
printk(KERN_DEBUG "%s: Tx irq loop=%d\n", dev->name, loop); printk(KERN_DEBUG "%s: Tx irq loop=%d\n", dev->name, loop);
if (loop && netif_queue_stopped(dev)) if (loop && netif_queue_stopped(dev))
...@@ -1554,6 +1559,7 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv, ...@@ -1554,6 +1559,7 @@ static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv,
goto try; goto try;
} }
if (state & Cd) { if (state & Cd) {
if (debug > 0)
printk(KERN_INFO "%s: CD transition\n", dev->name); printk(KERN_INFO "%s: CD transition\n", dev->name);
if (!(state &= ~Cd)) /* DEBUG */ if (!(state &= ~Cd)) /* DEBUG */
goto try; goto try;
...@@ -1596,6 +1602,9 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv, ...@@ -1596,6 +1602,9 @@ static inline void dscc4_rx_irq(struct dscc4_pci_priv *priv,
if (!(state & SccEvt)){ if (!(state & SccEvt)){
struct RxFD *rx_fd; struct RxFD *rx_fd;
if (debug > 4)
printk(KERN_DEBUG "%s: Rx ISR = 0x%08x\n", dev->name,
state);
state &= 0x00ffffff; state &= 0x00ffffff;
if (state & Err) { /* Hold or reset */ if (state & Err) { /* Hold or reset */
printk(KERN_DEBUG "%s: Rx ERR\n", dev->name); printk(KERN_DEBUG "%s: Rx ERR\n", dev->name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment