aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/ctcmain.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-27 12:26:46 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-27 12:26:46 -0400
commit15c54033964a943de7b0763efd3bd0ede7326395 (patch)
tree840b292612d1b5396d5bab5bde537a9013db3ceb /drivers/s390/net/ctcmain.c
parentad5da3cf39a5b11a198929be1f2644e17ecd767e (diff)
parent912a41a4ab935ce8c4308428ec13fc7f8b1f18f4 (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/s390/net/ctcmain.c')
-rw-r--r--drivers/s390/net/ctcmain.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
index 570a960bfb5b..b20fd0681733 100644
--- a/drivers/s390/net/ctcmain.c
+++ b/drivers/s390/net/ctcmain.c
@@ -455,7 +455,7 @@ ctc_unpack_skb(struct channel *ch, struct sk_buff *pskb)
455 return; 455 return;
456 } 456 }
457 skb_put(pskb, header->length); 457 skb_put(pskb, header->length);
458 pskb->mac.raw = pskb->data; 458 skb_reset_mac_header(pskb);
459 len -= header->length; 459 len -= header->length;
460 skb = dev_alloc_skb(pskb->len); 460 skb = dev_alloc_skb(pskb->len);
461 if (!skb) { 461 if (!skb) {
@@ -472,8 +472,9 @@ ctc_unpack_skb(struct channel *ch, struct sk_buff *pskb)
472 privptr->stats.rx_dropped++; 472 privptr->stats.rx_dropped++;
473 return; 473 return;
474 } 474 }
475 memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len); 475 skb_copy_from_linear_data(pskb, skb_put(skb, pskb->len),
476 skb->mac.raw = skb->data; 476 pskb->len);
477 skb_reset_mac_header(skb);
477 skb->dev = pskb->dev; 478 skb->dev = pskb->dev;
478 skb->protocol = pskb->protocol; 479 skb->protocol = pskb->protocol;
479 pskb->ip_summed = CHECKSUM_UNNECESSARY; 480 pskb->ip_summed = CHECKSUM_UNNECESSARY;
@@ -706,7 +707,8 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg)
706 spin_unlock(&ch->collect_lock); 707 spin_unlock(&ch->collect_lock);
707 return; 708 return;
708 } 709 }
709 ch->trans_skb->tail = ch->trans_skb->data = ch->trans_skb_data; 710 ch->trans_skb->data = ch->trans_skb_data;
711 skb_reset_tail_pointer(ch->trans_skb);
710 ch->trans_skb->len = 0; 712 ch->trans_skb->len = 0;
711 if (ch->prof.maxmulti < (ch->collect_len + 2)) 713 if (ch->prof.maxmulti < (ch->collect_len + 2))
712 ch->prof.maxmulti = ch->collect_len + 2; 714 ch->prof.maxmulti = ch->collect_len + 2;
@@ -715,8 +717,9 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg)
715 *((__u16 *) skb_put(ch->trans_skb, 2)) = ch->collect_len + 2; 717 *((__u16 *) skb_put(ch->trans_skb, 2)) = ch->collect_len + 2;
716 i = 0; 718 i = 0;
717 while ((skb = skb_dequeue(&ch->collect_queue))) { 719 while ((skb = skb_dequeue(&ch->collect_queue))) {
718 memcpy(skb_put(ch->trans_skb, skb->len), skb->data, 720 skb_copy_from_linear_data(skb, skb_put(ch->trans_skb,
719 skb->len); 721 skb->len),
722 skb->len);
720 privptr->stats.tx_packets++; 723 privptr->stats.tx_packets++;
721 privptr->stats.tx_bytes += skb->len - LL_HEADER_LENGTH; 724 privptr->stats.tx_bytes += skb->len - LL_HEADER_LENGTH;
722 atomic_dec(&skb->users); 725 atomic_dec(&skb->users);
@@ -831,7 +834,8 @@ ch_action_rx(fsm_instance * fi, int event, void *arg)
831 ctc_unpack_skb(ch, skb); 834 ctc_unpack_skb(ch, skb);
832 } 835 }
833 again: 836 again:
834 skb->data = skb->tail = ch->trans_skb_data; 837 skb->data = ch->trans_skb_data;
838 skb_reset_tail_pointer(skb);
835 skb->len = 0; 839 skb->len = 0;
836 if (ctc_checkalloc_buffer(ch, 1)) 840 if (ctc_checkalloc_buffer(ch, 1))
837 return; 841 return;
@@ -2223,7 +2227,8 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
2223 * IDAL support in CTC is broken, so we have to 2227 * IDAL support in CTC is broken, so we have to
2224 * care about skb's above 2G ourselves. 2228 * care about skb's above 2G ourselves.
2225 */ 2229 */
2226 hi = ((unsigned long) skb->tail + LL_HEADER_LENGTH) >> 31; 2230 hi = ((unsigned long)skb_tail_pointer(skb) +
2231 LL_HEADER_LENGTH) >> 31;
2227 if (hi) { 2232 if (hi) {
2228 nskb = alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); 2233 nskb = alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);
2229 if (!nskb) { 2234 if (!nskb) {
@@ -2259,11 +2264,12 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
2259 return -EBUSY; 2264 return -EBUSY;
2260 } 2265 }
2261 2266
2262 ch->trans_skb->tail = ch->trans_skb->data; 2267 skb_reset_tail_pointer(ch->trans_skb);
2263 ch->trans_skb->len = 0; 2268 ch->trans_skb->len = 0;
2264 ch->ccw[1].count = skb->len; 2269 ch->ccw[1].count = skb->len;
2265 memcpy(skb_put(ch->trans_skb, skb->len), skb->data, 2270 skb_copy_from_linear_data(skb, skb_put(ch->trans_skb,
2266 skb->len); 2271 skb->len),
2272 skb->len);
2267 atomic_dec(&skb->users); 2273 atomic_dec(&skb->users);
2268 dev_kfree_skb_irq(skb); 2274 dev_kfree_skb_irq(skb);
2269 ccw_idx = 0; 2275 ccw_idx = 0;