Skip to contentSkip to conversation

sis190: fix for x86_64 (bug 11509)

PATCH Applied Riccardo Ghetta 2 participants 3 messages Jun 8, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sis190: fix for x86_64 (bug 11509)

Corrected dma sync handling on small packets. Should fix
http://bugzilla.kernel.org/show_bug.cgi?id=11509
Note:
While this bug was reported only on x86_64, it could have affected any architecture.

---
 drivers/net/sis190.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/sis190.c +2 -2
index f0d73ab..8a98524 100644
@@ -540,8 +540,8 @@ static bool sis190_try_rx_copy(struct sis190_private *tp,
 	if (!skb)
 		goto out;
 
-	pci_dma_sync_single_for_device(tp->pci_dev, addr, pkt_size,
-				       PCI_DMA_FROMDEVICE);
+	pci_dma_sync_single_for_cpu(tp->pci_dev, addr, tp->rx_buf_sz,
+				PCI_DMA_FROMDEVICE);
 	skb_reserve(skb, 2);
 	skb_copy_to_linear_data(skb, sk_buff[0]->data, pkt_size);
 	*sk_buff = skb;
Signature · 1 line
1.6.2.4
author
#2 lore raw
Quoted 1 line · David Miller

Applied to net-next-2.6

Thank you.
Riccardo