aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2012-04-30 01:49:45 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-01 13:39:13 -0400
commit3f42941b5d1d13542b1a755a9e4f633aa72e4d3e (patch)
tree351d5db0f926e3659cb8586f849468723bc4c80a /drivers/net/ethernet
parentd961949660fa1c1b7eb0c3a3c157989c90f14e8e (diff)
sky2: propogate rx hash when packet is copied
When a small packet is received, the driver copies it to a new skb to allow reusing the full size Rx buffer. The copy was propogating the checksum offload but not the receive hash information. The bug is impact was mostly harmless and therefore not observed until reviewing this area of code. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/marvell/sky2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index c9b504e2dfc3..0ced3117abc6 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -2494,8 +2494,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2,
2494 skb_copy_from_linear_data(re->skb, skb->data, length); 2494 skb_copy_from_linear_data(re->skb, skb->data, length);
2495 skb->ip_summed = re->skb->ip_summed; 2495 skb->ip_summed = re->skb->ip_summed;
2496 skb->csum = re->skb->csum; 2496 skb->csum = re->skb->csum;
2497 skb->rxhash = re->skb->rxhash;
2498
2497 pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, 2499 pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr,
2498 length, PCI_DMA_FROMDEVICE); 2500 length, PCI_DMA_FROMDEVICE);
2501 re->skb->rxhash = 0;
2499 re->skb->ip_summed = CHECKSUM_NONE; 2502 re->skb->ip_summed = CHECKSUM_NONE;
2500 skb_put(skb, length); 2503 skb_put(skb, length);
2501 } 2504 }