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/s390/net/netiucv.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/s390/net/netiucv.c')
-rw-r--r-- | drivers/s390/net/netiucv.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 594320ca1b7c..e10e85e85c84 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -635,7 +635,7 @@ static void netiucv_unpack_skb(struct iucv_connection *conn, | |||
635 | return; | 635 | return; |
636 | } | 636 | } |
637 | skb_put(pskb, header->next); | 637 | skb_put(pskb, header->next); |
638 | pskb->mac.raw = pskb->data; | 638 | skb_reset_mac_header(pskb); |
639 | skb = dev_alloc_skb(pskb->len); | 639 | skb = dev_alloc_skb(pskb->len); |
640 | if (!skb) { | 640 | if (!skb) { |
641 | PRINT_WARN("%s Out of memory in netiucv_unpack_skb\n", | 641 | PRINT_WARN("%s Out of memory in netiucv_unpack_skb\n", |
@@ -645,8 +645,9 @@ static void netiucv_unpack_skb(struct iucv_connection *conn, | |||
645 | privptr->stats.rx_dropped++; | 645 | privptr->stats.rx_dropped++; |
646 | return; | 646 | return; |
647 | } | 647 | } |
648 | memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len); | 648 | skb_copy_from_linear_data(pskb, skb_put(skb, pskb->len), |
649 | skb->mac.raw = skb->data; | 649 | pskb->len); |
650 | skb_reset_mac_header(skb); | ||
650 | skb->dev = pskb->dev; | 651 | skb->dev = pskb->dev; |
651 | skb->protocol = pskb->protocol; | 652 | skb->protocol = pskb->protocol; |
652 | pskb->ip_summed = CHECKSUM_UNNECESSARY; | 653 | pskb->ip_summed = CHECKSUM_UNNECESSARY; |
@@ -689,7 +690,8 @@ static void conn_action_rx(fsm_instance *fi, int event, void *arg) | |||
689 | msg->length, conn->max_buffsize); | 690 | msg->length, conn->max_buffsize); |
690 | return; | 691 | return; |
691 | } | 692 | } |
692 | conn->rx_buff->data = conn->rx_buff->tail = conn->rx_buff->head; | 693 | conn->rx_buff->data = conn->rx_buff->head; |
694 | skb_reset_tail_pointer(conn->rx_buff); | ||
693 | conn->rx_buff->len = 0; | 695 | conn->rx_buff->len = 0; |
694 | rc = iucv_message_receive(conn->path, msg, 0, conn->rx_buff->data, | 696 | rc = iucv_message_receive(conn->path, msg, 0, conn->rx_buff->data, |
695 | msg->length, NULL); | 697 | msg->length, NULL); |
@@ -735,14 +737,17 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg) | |||
735 | } | 737 | } |
736 | } | 738 | } |
737 | } | 739 | } |
738 | conn->tx_buff->data = conn->tx_buff->tail = conn->tx_buff->head; | 740 | conn->tx_buff->data = conn->tx_buff->head; |
741 | skb_reset_tail_pointer(conn->tx_buff); | ||
739 | conn->tx_buff->len = 0; | 742 | conn->tx_buff->len = 0; |
740 | spin_lock_irqsave(&conn->collect_lock, saveflags); | 743 | spin_lock_irqsave(&conn->collect_lock, saveflags); |
741 | while ((skb = skb_dequeue(&conn->collect_queue))) { | 744 | while ((skb = skb_dequeue(&conn->collect_queue))) { |
742 | header.next = conn->tx_buff->len + skb->len + NETIUCV_HDRLEN; | 745 | header.next = conn->tx_buff->len + skb->len + NETIUCV_HDRLEN; |
743 | memcpy(skb_put(conn->tx_buff, NETIUCV_HDRLEN), &header, | 746 | memcpy(skb_put(conn->tx_buff, NETIUCV_HDRLEN), &header, |
744 | NETIUCV_HDRLEN); | 747 | NETIUCV_HDRLEN); |
745 | memcpy(skb_put(conn->tx_buff, skb->len), skb->data, skb->len); | 748 | skb_copy_from_linear_data(skb, |
749 | skb_put(conn->tx_buff, skb->len), | ||
750 | skb->len); | ||
746 | txbytes += skb->len; | 751 | txbytes += skb->len; |
747 | txpackets++; | 752 | txpackets++; |
748 | stat_maxcq++; | 753 | stat_maxcq++; |
@@ -1164,8 +1169,8 @@ static int netiucv_transmit_skb(struct iucv_connection *conn, | |||
1164 | * Copy the skb to a new allocated skb in lowmem only if the | 1169 | * Copy the skb to a new allocated skb in lowmem only if the |
1165 | * data is located above 2G in memory or tailroom is < 2. | 1170 | * data is located above 2G in memory or tailroom is < 2. |
1166 | */ | 1171 | */ |
1167 | unsigned long hi = | 1172 | unsigned long hi = ((unsigned long)(skb_tail_pointer(skb) + |
1168 | ((unsigned long)(skb->tail + NETIUCV_HDRLEN)) >> 31; | 1173 | NETIUCV_HDRLEN)) >> 31; |
1169 | int copied = 0; | 1174 | int copied = 0; |
1170 | if (hi || (skb_tailroom(skb) < 2)) { | 1175 | if (hi || (skb_tailroom(skb) < 2)) { |
1171 | nskb = alloc_skb(skb->len + NETIUCV_HDRLEN + | 1176 | nskb = alloc_skb(skb->len + NETIUCV_HDRLEN + |