Skip to content

Commit

Permalink
sis190: fix for x86_64 (bug 11509)
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Riccardo Ghetta authored and David S. Miller committed Jun 8, 2009
1 parent 365da87 commit 744c6b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/sis190.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,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;
Expand Down

0 comments on commit 744c6b2

Please sign in to comment.