diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
commit | 15c54033964a943de7b0763efd3bd0ede7326395 (patch) | |
tree | 840b292612d1b5396d5bab5bde537a9013db3ceb /drivers/net/sungem.c | |
parent | ad5da3cf39a5b11a198929be1f2644e17ecd767e (diff) | |
parent | 912a41a4ab935ce8c4308428ec13fc7f8b1f18f4 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (448 commits)
[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)
[IPV6]: Fix thinko in ipv6_rthdr_rcv() changes.
[IPV4]: Add multipath cached to feature-removal-schedule.txt
[WIRELESS] cfg80211: Clarify locking comment.
[WIRELESS] cfg80211: Fix locking in wiphy_new.
[WEXT] net_device: Don't include wext bits if not required.
[WEXT]: Misc code cleanups.
[WEXT]: Reduce inline abuse.
[WEXT]: Move EXPORT_SYMBOL statements where they belong.
[WEXT]: Cleanup early ioctl call path.
[WEXT]: Remove options.
[WEXT]: Remove dead debug code.
[WEXT]: Clean up how wext is called.
[WEXT]: Move to net/wireless
[AFS]: Eliminate cmpxchg() usage in vlocation code.
[RXRPC]: Fix pointers passed to bitops.
[RXRPC]: Remove bogus atomic_* overrides.
[AFS]: Fix u64 printing in debug logging.
[AFS]: Add "directory write" support.
[AFS]: Implement the CB.InitCallBackState3 operation.
...
Diffstat (limited to 'drivers/net/sungem.c')
-rw-r--r-- | drivers/net/sungem.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 08ea61db46fe..9df1038ec6bb 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -845,11 +845,10 @@ static int gem_rx(struct gem *gp, int work_to_do) | |||
845 | goto drop_it; | 845 | goto drop_it; |
846 | } | 846 | } |
847 | 847 | ||
848 | copy_skb->dev = gp->dev; | ||
849 | skb_reserve(copy_skb, 2); | 848 | skb_reserve(copy_skb, 2); |
850 | skb_put(copy_skb, len); | 849 | skb_put(copy_skb, len); |
851 | pci_dma_sync_single_for_cpu(gp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); | 850 | pci_dma_sync_single_for_cpu(gp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); |
852 | memcpy(copy_skb->data, skb->data, len); | 851 | skb_copy_from_linear_data(skb, copy_skb->data, len); |
853 | pci_dma_sync_single_for_device(gp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); | 852 | pci_dma_sync_single_for_device(gp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); |
854 | 853 | ||
855 | /* We'll reuse the original ring buffer. */ | 854 | /* We'll reuse the original ring buffer. */ |
@@ -1029,10 +1028,8 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1029 | 1028 | ||
1030 | ctrl = 0; | 1029 | ctrl = 0; |
1031 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 1030 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
1032 | u64 csum_start_off, csum_stuff_off; | 1031 | const u64 csum_start_off = skb_transport_offset(skb); |
1033 | 1032 | const u64 csum_stuff_off = csum_start_off + skb->csum_offset; | |
1034 | csum_start_off = (u64) (skb->h.raw - skb->data); | ||
1035 | csum_stuff_off = csum_start_off + skb->csum_offset; | ||
1036 | 1033 | ||
1037 | ctrl = (TXDCTRL_CENAB | | 1034 | ctrl = (TXDCTRL_CENAB | |
1038 | (csum_start_off << 15) | | 1035 | (csum_start_off << 15) | |