Thread (10 messages) 10 messages, 3 authors, 2010-09-01

Re: via-velocity dma-debug warnings again. (2.6.35.2)

From: Simon Kagstrom <hidden>
Date: 2010-08-31 09:21:03
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

On Mon, 30 Aug 2010 21:13:49 -0400
Dave Jones [off-list ref] wrote:
I installed the Fedora 14 alpha, which is based on 2.6.35.2, and hit
the following trace..

WARNING: at lib/dma-debug.c:811 check_unmap+0x212/0x59b()
Hardware name:  
via-velocity 0000:00:0e.0: DMA-API: device driver frees DMA memory with different size [device address=0x00000000194ba27e] [map size=66 bytes] [unmap size=182 bytes]
I can't reproduce it here, but does the patch below help for you?

// Simon
From 81fe86ef9e4be4be43cc75e8320384a0708cef1a Mon Sep 17 00:00:00 2001
From: Simon Kagstrom <redacted>
Date: Tue, 31 Aug 2010 08:41:26 +0200
Subject: [PATCH] via-velocity: Correct packet length on tx free

Signed-off-by: Simon Kagstrom <redacted>
---
 drivers/net/via-velocity.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index fd69095..305192e 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -1721,7 +1721,7 @@ static void velocity_free_tx_buf(struct velocity_info *vptr,
 			/* For scatter-gather */
 			if (skb_shinfo(skb)->nr_frags > 0)
 				pktlen = max_t(size_t, pktlen,
-						td->td_buf[i].size & ~TD_QUEUE);
+						skb_headlen(skb));
 
 			pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i],
 					le16_to_cpu(pktlen), PCI_DMA_TODEVICE);
-- 
1.7.0.4

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help