From: Riccardo Ghetta Date: Sun, 7 Jun 2009 19:47:58 +0000 (+0000) Subject: sis190: fix for x86_64 (bug 11509) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=744c6b2976778ac6944e580fc413842df85be84e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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. Signed-off-by: Riccardo Ghetta Signed-off-by: David S. Miller --- diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 13b8ca41d571..9ea13c09f009 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -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;