Re: [PATCH 05/26] atl1: print debug info if rrd error



jacliburn@xxxxxxxxxxxxx wrote:
From: Jay Cliburn <jacliburn@xxxxxxxxxxxxx>

Add some debug dev_printks if we encounter a bad receive return descriptor.

Signed-off-by: Jay Cliburn <jacliburn@xxxxxxxxxxxxx>
---
drivers/net/atlx/atl1.c | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 239641f..262d3ca 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -1127,7 +1127,26 @@ static void atl1_intr_rx(struct atl1_adapter *adapter)
if (likely(rrd->xsz.valid)) { /* packet valid */
chk_rrd:
/* check rrd status */
- if (likely(rrd->num_buf == 1))
+ if (rrd->num_buf != 1) {
+ dev_printk(KERN_DEBUG, &adapter->pdev->dev,
+ "rx_buf_len = %d\n",
+ adapter->rx_buffer_len);
+ dev_printk(KERN_DEBUG, &adapter->pdev->dev,
+ "RRD num_buf = %d\n",
+ rrd->num_buf);
+ dev_printk(KERN_DEBUG, &adapter->pdev->dev,
+ "RRD pkt_len = %d\n",
+ rrd->xsz.xsum_sz.pkt_size);
+ dev_printk(KERN_DEBUG, &adapter->pdev->dev,
+ "RRD pkt_flg = 0x%08X\n",
+ rrd->pkt_flg);
+ dev_printk(KERN_DEBUG, &adapter->pdev->dev,
+ "RRD err_flg = 0x%08X\n",
+ rrd->err_flg);
+ dev_printk(KERN_DEBUG, &adapter->pdev->dev,
+ "RRD vlan_tag = 0x%08X\n",
+ rrd->vlan_tag);
+ } else

look into netif_msg_*, which enables via ethtool very fine-grained selection of messages.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [PATCH 05/26] atl1: print debug info if rrd error
    ... Add some debug dev_printks if we encounter a bad receive return descriptor. ... goto rrd_ok; ...
    (Linux-Kernel)
  • =?Utf-8?Q?Re:_intermittent=E2=80=94delete/backspac?= =?Utf-8?Q?e_key_not_working?=
    ... Herb Tyson MS MVP ... This is governed by the "Typing replaces selection" check box Jay ... When you encounter something that's hard to delete, ... > toggle field codes to see if you're dealing with something other than ...
    (microsoft.public.word.docmanagement)
  • Re: Getting from Access to Word
    ... lewie wrote: ... view/menu/debug selection will place the debug menu at the top. ... Subsection, Page and Pathway. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Column numbers in stack trace - enhancement request
    ... When I encounter these kinds of issues during development, ... Stack traces contain only line numbers and in certain cases line number ... sufficiently helpful in narrowing down the problem. ... You can as well debug your app. ...
    (comp.lang.java.programmer)
  • Re: Getting from Access to Word
    ... OH we will need to get rid of the other code you are not using so you ... rid of the rest and then go to the debug tab and press compile. ... lewie wrote: ... view/menu/debug selection will place the debug menu at the top. ...
    (microsoft.public.access.tablesdbdesign)