aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2012-04-30 05:49:45 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-21 09:39:59 -0700
commitec2b1ddb8f9c4efd78f4bd0d832ab4a35eed4659 (patch)
tree05ec9dd3d27e4706566fde0ce4106e8218b44941 /drivers/net/sky2.c
parentff422223cc56542d31575afd05b02bd1493abf4b (diff)
downloadkernel_samsung_tuna-ec2b1ddb8f9c4efd78f4bd0d832ab4a35eed4659.zip
kernel_samsung_tuna-ec2b1ddb8f9c4efd78f4bd0d832ab4a35eed4659.tar.gz
kernel_samsung_tuna-ec2b1ddb8f9c4efd78f4bd0d832ab4a35eed4659.tar.bz2
sky2: propogate rx hash when packet is copied
[ Upstream commit 3f42941b5d1d13542b1a755a9e4f633aa72e4d3e ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 80df3a8..88e287f 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2344,8 +2344,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2,
skb_copy_from_linear_data(re->skb, skb->data, length);
skb->ip_summed = re->skb->ip_summed;
skb->csum = re->skb->csum;
+ skb->rxhash = re->skb->rxhash;
+
pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr,
length, PCI_DMA_FROMDEVICE);
+ re->skb->rxhash = 0;
re->skb->ip_summed = CHECKSUM_NONE;
skb_put(skb, length);
}