* [PATCH] sky2: incorrect length on receive packets
@ 2006-10-03 23:39 Stephen Hemminger
2006-10-05 10:43 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2006-10-03 23:39 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
The previous change to do fragmented receive (post 2.6.18) introduced a bug
where packets are passed up with size set to the size of the receive buffer
not the actual received data. IP silently trims this so it didn't show up
right away.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
---
drivers/net/sky2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- sky2.orig/drivers/net/sky2.c 2006-10-03 16:35:09.000000000 -0700
+++ sky2/drivers/net/sky2.c 2006-10-03 16:35:23.000000000 -0700
@@ -1907,7 +1907,7 @@
pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr,
length, PCI_DMA_FROMDEVICE);
re->skb->ip_summed = CHECKSUM_NONE;
- __skb_put(skb, length);
+ skb_put(skb, length);
}
return skb;
}
@@ -1970,7 +1970,7 @@
if (skb_shinfo(skb)->nr_frags)
skb_put_frags(skb, hdr_space, length);
else
- skb_put(skb, hdr_space);
+ skb_put(skb, length);
return skb;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-05 10:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-03 23:39 [PATCH] sky2: incorrect length on receive packets Stephen Hemminger
2006-10-05 10:43 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).