mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jay Cliburn <jacliburn@bellsouth.net>
To: jeff@garzik.org
Cc: csnook@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jay Cliburn <jacliburn@bellsouth.net>
Subject: [PATCH 08/10] atl1: print debug info if rrd error
Date: Sat,  2 Feb 2008 19:50:10 -0600	[thread overview]
Message-ID: <1202003412-4028-8-git-send-email-jacliburn@bellsouth.net> (raw)
In-Reply-To: <1202003412-4028-1-git-send-email-jacliburn@bellsouth.net>

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

Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Acked-by: Chris Snook <csnook@redhat.com>
---
 drivers/net/atlx/atl1.c |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 51eca23..4e4cb23 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -1144,14 +1144,32 @@ chk_rrd:
 			/* check rrd status */
 			if (likely(rrd->num_buf == 1))
 				goto rrd_ok;
+			else if (netif_msg_rx_err(adapter)) {
+				dev_printk(KERN_DEBUG, &adapter->pdev->dev,
+					"unexpected RRD buffer count\n");
+				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);
+			}
 
 			/* rrd seems to be bad */
 			if (unlikely(i-- > 0)) {
 				/* rrd may not be DMAed completely */
-				if (netif_msg_rx_err(adapter))
-					dev_printk(KERN_DEBUG,
-						&adapter->pdev->dev,
-						"unexpected RRD count\n");
 				udelay(1);
 				goto chk_rrd;
 			}
-- 
1.5.3.8


  parent reply	other threads:[~2008-02-03  1:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-03  1:50 [PATCH 01/10] atl1: relocate atl1 driver to /drivers/net/atlx Jay Cliburn
2008-02-03  1:50 ` [PATCH 02/10] atl1: move common functions to atlx files Jay Cliburn
2008-02-03  1:50 ` [PATCH 03/10] atl1: fix broken TSO Jay Cliburn
2008-02-03  1:50 ` [PATCH 04/10] atl1: add ethtool register dump Jay Cliburn
2008-02-03  1:50 ` [PATCH 05/10] atl1: simplify tx packet descriptor Jay Cliburn
2008-02-03  1:50 ` [PATCH 06/10] atl1: use csum_start Jay Cliburn
2008-02-03  1:50 ` [PATCH 07/10] atl1: use netif_msg Jay Cliburn
2008-02-03  1:50 ` Jay Cliburn [this message]
2008-02-03  1:50 ` [PATCH 09/10] atl1: make functions static Jay Cliburn
2008-02-03  1:50 ` [PATCH 10/10] atl1: reduce forward declarations Jay Cliburn
2008-02-11 15:57   ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1202003412-4028-8-git-send-email-jacliburn@bellsouth.net \
    --to=jacliburn@bellsouth.net \
    --cc=csnook@redhat.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®