diff options
author | Jay Cliburn <jacliburn@bellsouth.net> | 2008-02-02 20:50:10 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-03-17 07:49:25 -0400 |
commit | 235ffa136c09c56db0c6c5fc5b5832749a72f557 (patch) | |
tree | 269e64ebec006703fdd02d9ea1d3f36ac14aa945 /drivers | |
parent | 460578bfe4dffbdc6eec9fcbd0fe0bb4f9f82188 (diff) |
atl1: print debug info if rrd error
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 51eca233e1f1..4e4cb23c1836 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -1144,14 +1144,32 @@ chk_rrd: | |||
1144 | /* check rrd status */ | 1144 | /* check rrd status */ |
1145 | if (likely(rrd->num_buf == 1)) | 1145 | if (likely(rrd->num_buf == 1)) |
1146 | goto rrd_ok; | 1146 | goto rrd_ok; |
1147 | else if (netif_msg_rx_err(adapter)) { | ||
1148 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, | ||
1149 | "unexpected RRD buffer count\n"); | ||
1150 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, | ||
1151 | "rx_buf_len = %d\n", | ||
1152 | adapter->rx_buffer_len); | ||
1153 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, | ||
1154 | "RRD num_buf = %d\n", | ||
1155 | rrd->num_buf); | ||
1156 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, | ||
1157 | "RRD pkt_len = %d\n", | ||
1158 | rrd->xsz.xsum_sz.pkt_size); | ||
1159 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, | ||
1160 | "RRD pkt_flg = 0x%08X\n", | ||
1161 | rrd->pkt_flg); | ||
1162 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, | ||
1163 | "RRD err_flg = 0x%08X\n", | ||
1164 | rrd->err_flg); | ||
1165 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, | ||
1166 | "RRD vlan_tag = 0x%08X\n", | ||
1167 | rrd->vlan_tag); | ||
1168 | } | ||
1147 | 1169 | ||
1148 | /* rrd seems to be bad */ | 1170 | /* rrd seems to be bad */ |
1149 | if (unlikely(i-- > 0)) { | 1171 | if (unlikely(i-- > 0)) { |
1150 | /* rrd may not be DMAed completely */ | 1172 | /* rrd may not be DMAed completely */ |
1151 | if (netif_msg_rx_err(adapter)) | ||
1152 | dev_printk(KERN_DEBUG, | ||
1153 | &adapter->pdev->dev, | ||
1154 | "unexpected RRD count\n"); | ||
1155 | udelay(1); | 1173 | udelay(1); |
1156 | goto chk_rrd; | 1174 | goto chk_rrd; |
1157 | } | 1175 | } |