diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
commit | bcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch) | |
tree | 2f6dffd2d3e4dd67355a224de7e7a960335a92fd /drivers/net/ehea | |
parent | 11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff) | |
parent | 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff) |
Merge commit 'origin/master' into next
Conflicts:
include/linux/kvm.h
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 29 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_qmr.c | 4 |
2 files changed, 17 insertions, 16 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 41bd7aeafd82..7b62336e6736 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -189,8 +189,8 @@ static void ehea_update_firmware_handles(void) | |||
189 | for (k = 0; k < EHEA_MAX_PORTS; k++) { | 189 | for (k = 0; k < EHEA_MAX_PORTS; k++) { |
190 | struct ehea_port *port = adapter->port[k]; | 190 | struct ehea_port *port = adapter->port[k]; |
191 | 191 | ||
192 | if (!port || (port->state != EHEA_PORT_UP) | 192 | if (!port || (port->state != EHEA_PORT_UP) || |
193 | || (num_ports == 0)) | 193 | (num_ports == 0)) |
194 | continue; | 194 | continue; |
195 | 195 | ||
196 | for (l = 0; | 196 | for (l = 0; |
@@ -447,7 +447,9 @@ static int ehea_refill_rq_def(struct ehea_port_res *pr, | |||
447 | max_index_mask = q_skba->len - 1; | 447 | max_index_mask = q_skba->len - 1; |
448 | for (i = 0; i < fill_wqes; i++) { | 448 | for (i = 0; i < fill_wqes; i++) { |
449 | u64 tmp_addr; | 449 | u64 tmp_addr; |
450 | struct sk_buff *skb = netdev_alloc_skb(dev, packet_size); | 450 | struct sk_buff *skb; |
451 | |||
452 | skb = netdev_alloc_skb_ip_align(dev, packet_size); | ||
451 | if (!skb) { | 453 | if (!skb) { |
452 | q_skba->os_skbs = fill_wqes - i; | 454 | q_skba->os_skbs = fill_wqes - i; |
453 | if (q_skba->os_skbs == q_skba->len - 2) { | 455 | if (q_skba->os_skbs == q_skba->len - 2) { |
@@ -457,7 +459,6 @@ static int ehea_refill_rq_def(struct ehea_port_res *pr, | |||
457 | } | 459 | } |
458 | break; | 460 | break; |
459 | } | 461 | } |
460 | skb_reserve(skb, NET_IP_ALIGN); | ||
461 | 462 | ||
462 | skb_arr[index] = skb; | 463 | skb_arr[index] = skb; |
463 | tmp_addr = ehea_map_vaddr(skb->data); | 464 | tmp_addr = ehea_map_vaddr(skb->data); |
@@ -500,7 +501,7 @@ static int ehea_refill_rq2(struct ehea_port_res *pr, int nr_of_wqes) | |||
500 | { | 501 | { |
501 | return ehea_refill_rq_def(pr, &pr->rq2_skba, 2, | 502 | return ehea_refill_rq_def(pr, &pr->rq2_skba, 2, |
502 | nr_of_wqes, EHEA_RWQE2_TYPE, | 503 | nr_of_wqes, EHEA_RWQE2_TYPE, |
503 | EHEA_RQ2_PKT_SIZE + NET_IP_ALIGN); | 504 | EHEA_RQ2_PKT_SIZE); |
504 | } | 505 | } |
505 | 506 | ||
506 | 507 | ||
@@ -508,7 +509,7 @@ static int ehea_refill_rq3(struct ehea_port_res *pr, int nr_of_wqes) | |||
508 | { | 509 | { |
509 | return ehea_refill_rq_def(pr, &pr->rq3_skba, 3, | 510 | return ehea_refill_rq_def(pr, &pr->rq3_skba, 3, |
510 | nr_of_wqes, EHEA_RWQE3_TYPE, | 511 | nr_of_wqes, EHEA_RWQE3_TYPE, |
511 | EHEA_MAX_PACKET_SIZE + NET_IP_ALIGN); | 512 | EHEA_MAX_PACKET_SIZE); |
512 | } | 513 | } |
513 | 514 | ||
514 | static inline int ehea_check_cqe(struct ehea_cqe *cqe, int *rq_num) | 515 | static inline int ehea_check_cqe(struct ehea_cqe *cqe, int *rq_num) |
@@ -656,8 +657,8 @@ static int get_skb_hdr(struct sk_buff *skb, void **iphdr, | |||
656 | static void ehea_proc_skb(struct ehea_port_res *pr, struct ehea_cqe *cqe, | 657 | static void ehea_proc_skb(struct ehea_port_res *pr, struct ehea_cqe *cqe, |
657 | struct sk_buff *skb) | 658 | struct sk_buff *skb) |
658 | { | 659 | { |
659 | int vlan_extracted = (cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) | 660 | int vlan_extracted = ((cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) && |
660 | && pr->port->vgrp; | 661 | pr->port->vgrp); |
661 | 662 | ||
662 | if (use_lro) { | 663 | if (use_lro) { |
663 | if (vlan_extracted) | 664 | if (vlan_extracted) |
@@ -1388,8 +1389,8 @@ out: | |||
1388 | 1389 | ||
1389 | int ehea_rem_smrs(struct ehea_port_res *pr) | 1390 | int ehea_rem_smrs(struct ehea_port_res *pr) |
1390 | { | 1391 | { |
1391 | if ((ehea_rem_mr(&pr->send_mr)) | 1392 | if ((ehea_rem_mr(&pr->send_mr)) || |
1392 | || (ehea_rem_mr(&pr->recv_mr))) | 1393 | (ehea_rem_mr(&pr->recv_mr))) |
1393 | return -EIO; | 1394 | return -EIO; |
1394 | else | 1395 | else |
1395 | return 0; | 1396 | return 0; |
@@ -2030,8 +2031,8 @@ static void ehea_xmit2(struct sk_buff *skb, struct net_device *dev, | |||
2030 | write_ip_start_end(swqe, skb); | 2031 | write_ip_start_end(swqe, skb); |
2031 | 2032 | ||
2032 | if (iph->protocol == IPPROTO_UDP) { | 2033 | if (iph->protocol == IPPROTO_UDP) { |
2033 | if ((iph->frag_off & IP_MF) | 2034 | if ((iph->frag_off & IP_MF) || |
2034 | || (iph->frag_off & IP_OFFSET)) | 2035 | (iph->frag_off & IP_OFFSET)) |
2035 | /* IP fragment, so don't change cs */ | 2036 | /* IP fragment, so don't change cs */ |
2036 | swqe->tx_control &= ~EHEA_SWQE_TCP_CHECKSUM; | 2037 | swqe->tx_control &= ~EHEA_SWQE_TCP_CHECKSUM; |
2037 | else | 2038 | else |
@@ -2076,8 +2077,8 @@ static void ehea_xmit3(struct sk_buff *skb, struct net_device *dev, | |||
2076 | write_tcp_offset_end(swqe, skb); | 2077 | write_tcp_offset_end(swqe, skb); |
2077 | 2078 | ||
2078 | } else if (iph->protocol == IPPROTO_UDP) { | 2079 | } else if (iph->protocol == IPPROTO_UDP) { |
2079 | if ((iph->frag_off & IP_MF) | 2080 | if ((iph->frag_off & IP_MF) || |
2080 | || (iph->frag_off & IP_OFFSET)) | 2081 | (iph->frag_off & IP_OFFSET)) |
2081 | /* IP fragment, so don't change cs */ | 2082 | /* IP fragment, so don't change cs */ |
2082 | swqe->tx_control |= EHEA_SWQE_CRC | 2083 | swqe->tx_control |= EHEA_SWQE_CRC |
2083 | | EHEA_SWQE_IMM_DATA_PRESENT; | 2084 | | EHEA_SWQE_IMM_DATA_PRESENT; |
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index bc7c5b7abb88..18d405f78c0f 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c | |||
@@ -837,8 +837,8 @@ static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt, | |||
837 | hret = ehea_h_register_rpage_mr(adapter->handle, mr->handle, 0, | 837 | hret = ehea_h_register_rpage_mr(adapter->handle, mr->handle, 0, |
838 | 0, pt_abs, EHEA_MAX_RPAGE); | 838 | 0, pt_abs, EHEA_MAX_RPAGE); |
839 | 839 | ||
840 | if ((hret != H_SUCCESS) | 840 | if ((hret != H_SUCCESS) && |
841 | && (hret != H_PAGE_REGISTERED)) { | 841 | (hret != H_PAGE_REGISTERED)) { |
842 | ehea_h_free_resource(adapter->handle, mr->handle, | 842 | ehea_h_free_resource(adapter->handle, mr->handle, |
843 | FORCE_FREE); | 843 | FORCE_FREE); |
844 | ehea_error("register_rpage_mr failed"); | 844 | ehea_error("register_rpage_mr failed"); |