diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-12 20:17:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-12 20:17:55 -0500 |
commit | 9457b24a0955bbdd2e89220a75de69fe09501bba (patch) | |
tree | cb484848e14cc2705c4513ad3ec1f0420a4d55db /drivers/s390 | |
parent | 80ef913f5e6a84551545016cea709f5e96d0cda6 (diff) | |
parent | 0597d1b99fcfc2c0eada09a698f85ed413d4ba84 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (66 commits)
can-bcm: fix minor heap overflow
gianfar: Do not call device_set_wakeup_enable() under a spinlock
ipv6: Warn users if maximum number of routes is reached.
docs: Add neigh/gc_thresh3 and route/max_size documentation.
axnet_cs: fix resume problem for some Ax88790 chip
ipv6: addrconf: don't remove address state on ifdown if the address is being kept
tcp: Don't change unlocked socket state in tcp_v4_err().
x25: Prevent crashing when parsing bad X.25 facilities
cxgb4vf: add call to Firmware to reset VF State.
cxgb4vf: Fail open if link_start() fails.
cxgb4vf: flesh out PCI Device ID Table ...
cxgb4vf: fix some errors in Gather List to skb conversion
cxgb4vf: fix bug in Generic Receive Offload
cxgb4vf: don't implement trivial (and incorrect) ndo_select_queue()
ixgbe: Look inside vlan when determining offload protocol.
bnx2x: Look inside vlan when determining checksum proto.
vlan: Add function to retrieve EtherType from vlan packets.
virtio-net: init link state correctly
ucc_geth: Fix deadlock
ucc_geth: Do not bring the whole IF down when TX failure.
...
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_core.h | 9 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 55 |
2 files changed, 9 insertions, 55 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 6be43eb126b4..f47a714538db 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -440,7 +440,6 @@ struct qeth_qdio_out_q { | |||
440 | * index of buffer to be filled by driver; state EMPTY or PACKING | 440 | * index of buffer to be filled by driver; state EMPTY or PACKING |
441 | */ | 441 | */ |
442 | int next_buf_to_fill; | 442 | int next_buf_to_fill; |
443 | int sync_iqdio_error; | ||
444 | /* | 443 | /* |
445 | * number of buffers that are currently filled (PRIMED) | 444 | * number of buffers that are currently filled (PRIMED) |
446 | * -> these buffers are hardware-owned | 445 | * -> these buffers are hardware-owned |
@@ -695,14 +694,6 @@ struct qeth_mc_mac { | |||
695 | int is_vmac; | 694 | int is_vmac; |
696 | }; | 695 | }; |
697 | 696 | ||
698 | struct qeth_skb_data { | ||
699 | __u32 magic; | ||
700 | int count; | ||
701 | }; | ||
702 | |||
703 | #define QETH_SKB_MAGIC 0x71657468 | ||
704 | #define QETH_SIGA_CC2_RETRIES 3 | ||
705 | |||
706 | struct qeth_rx { | 697 | struct qeth_rx { |
707 | int b_count; | 698 | int b_count; |
708 | int b_index; | 699 | int b_index; |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 764267062601..e6b2df0e73f5 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -877,8 +877,8 @@ out: | |||
877 | return; | 877 | return; |
878 | } | 878 | } |
879 | 879 | ||
880 | static void __qeth_clear_output_buffer(struct qeth_qdio_out_q *queue, | 880 | static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue, |
881 | struct qeth_qdio_out_buffer *buf, unsigned int qeth_skip_skb) | 881 | struct qeth_qdio_out_buffer *buf) |
882 | { | 882 | { |
883 | int i; | 883 | int i; |
884 | struct sk_buff *skb; | 884 | struct sk_buff *skb; |
@@ -887,13 +887,11 @@ static void __qeth_clear_output_buffer(struct qeth_qdio_out_q *queue, | |||
887 | if (buf->buffer->element[0].flags & 0x40) | 887 | if (buf->buffer->element[0].flags & 0x40) |
888 | atomic_dec(&queue->set_pci_flags_count); | 888 | atomic_dec(&queue->set_pci_flags_count); |
889 | 889 | ||
890 | if (!qeth_skip_skb) { | 890 | skb = skb_dequeue(&buf->skb_list); |
891 | while (skb) { | ||
892 | atomic_dec(&skb->users); | ||
893 | dev_kfree_skb_any(skb); | ||
891 | skb = skb_dequeue(&buf->skb_list); | 894 | skb = skb_dequeue(&buf->skb_list); |
892 | while (skb) { | ||
893 | atomic_dec(&skb->users); | ||
894 | dev_kfree_skb_any(skb); | ||
895 | skb = skb_dequeue(&buf->skb_list); | ||
896 | } | ||
897 | } | 895 | } |
898 | for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(queue->card); ++i) { | 896 | for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(queue->card); ++i) { |
899 | if (buf->buffer->element[i].addr && buf->is_header[i]) | 897 | if (buf->buffer->element[i].addr && buf->is_header[i]) |
@@ -909,12 +907,6 @@ static void __qeth_clear_output_buffer(struct qeth_qdio_out_q *queue, | |||
909 | atomic_set(&buf->state, QETH_QDIO_BUF_EMPTY); | 907 | atomic_set(&buf->state, QETH_QDIO_BUF_EMPTY); |
910 | } | 908 | } |
911 | 909 | ||
912 | static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue, | ||
913 | struct qeth_qdio_out_buffer *buf) | ||
914 | { | ||
915 | __qeth_clear_output_buffer(queue, buf, 0); | ||
916 | } | ||
917 | |||
918 | void qeth_clear_qdio_buffers(struct qeth_card *card) | 910 | void qeth_clear_qdio_buffers(struct qeth_card *card) |
919 | { | 911 | { |
920 | int i, j; | 912 | int i, j; |
@@ -2833,7 +2825,6 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int index, | |||
2833 | } | 2825 | } |
2834 | } | 2826 | } |
2835 | 2827 | ||
2836 | queue->sync_iqdio_error = 0; | ||
2837 | queue->card->dev->trans_start = jiffies; | 2828 | queue->card->dev->trans_start = jiffies; |
2838 | if (queue->card->options.performance_stats) { | 2829 | if (queue->card->options.performance_stats) { |
2839 | queue->card->perf_stats.outbound_do_qdio_cnt++; | 2830 | queue->card->perf_stats.outbound_do_qdio_cnt++; |
@@ -2849,10 +2840,6 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int index, | |||
2849 | queue->card->perf_stats.outbound_do_qdio_time += | 2840 | queue->card->perf_stats.outbound_do_qdio_time += |
2850 | qeth_get_micros() - | 2841 | qeth_get_micros() - |
2851 | queue->card->perf_stats.outbound_do_qdio_start_time; | 2842 | queue->card->perf_stats.outbound_do_qdio_start_time; |
2852 | if (rc > 0) { | ||
2853 | if (!(rc & QDIO_ERROR_SIGA_BUSY)) | ||
2854 | queue->sync_iqdio_error = rc & 3; | ||
2855 | } | ||
2856 | if (rc) { | 2843 | if (rc) { |
2857 | queue->card->stats.tx_errors += count; | 2844 | queue->card->stats.tx_errors += count; |
2858 | /* ignore temporary SIGA errors without busy condition */ | 2845 | /* ignore temporary SIGA errors without busy condition */ |
@@ -2916,7 +2903,7 @@ void qeth_qdio_start_poll(struct ccw_device *ccwdev, int queue, | |||
2916 | { | 2903 | { |
2917 | struct qeth_card *card = (struct qeth_card *)card_ptr; | 2904 | struct qeth_card *card = (struct qeth_card *)card_ptr; |
2918 | 2905 | ||
2919 | if (card->dev) | 2906 | if (card->dev && (card->dev->flags & IFF_UP)) |
2920 | napi_schedule(&card->napi); | 2907 | napi_schedule(&card->napi); |
2921 | } | 2908 | } |
2922 | EXPORT_SYMBOL_GPL(qeth_qdio_start_poll); | 2909 | EXPORT_SYMBOL_GPL(qeth_qdio_start_poll); |
@@ -2940,7 +2927,6 @@ void qeth_qdio_output_handler(struct ccw_device *ccwdev, | |||
2940 | struct qeth_qdio_out_q *queue = card->qdio.out_qs[__queue]; | 2927 | struct qeth_qdio_out_q *queue = card->qdio.out_qs[__queue]; |
2941 | struct qeth_qdio_out_buffer *buffer; | 2928 | struct qeth_qdio_out_buffer *buffer; |
2942 | int i; | 2929 | int i; |
2943 | unsigned qeth_send_err; | ||
2944 | 2930 | ||
2945 | QETH_CARD_TEXT(card, 6, "qdouhdl"); | 2931 | QETH_CARD_TEXT(card, 6, "qdouhdl"); |
2946 | if (qdio_error & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { | 2932 | if (qdio_error & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { |
@@ -2956,9 +2942,8 @@ void qeth_qdio_output_handler(struct ccw_device *ccwdev, | |||
2956 | } | 2942 | } |
2957 | for (i = first_element; i < (first_element + count); ++i) { | 2943 | for (i = first_element; i < (first_element + count); ++i) { |
2958 | buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; | 2944 | buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; |
2959 | qeth_send_err = qeth_handle_send_error(card, buffer, qdio_error); | 2945 | qeth_handle_send_error(card, buffer, qdio_error); |
2960 | __qeth_clear_output_buffer(queue, buffer, | 2946 | qeth_clear_output_buffer(queue, buffer); |
2961 | (qeth_send_err == QETH_SEND_ERROR_RETRY) ? 1 : 0); | ||
2962 | } | 2947 | } |
2963 | atomic_sub(count, &queue->used_buffers); | 2948 | atomic_sub(count, &queue->used_buffers); |
2964 | /* check if we need to do something on this outbound queue */ | 2949 | /* check if we need to do something on this outbound queue */ |
@@ -3183,10 +3168,7 @@ int qeth_do_send_packet_fast(struct qeth_card *card, | |||
3183 | int offset, int hd_len) | 3168 | int offset, int hd_len) |
3184 | { | 3169 | { |
3185 | struct qeth_qdio_out_buffer *buffer; | 3170 | struct qeth_qdio_out_buffer *buffer; |
3186 | struct sk_buff *skb1; | ||
3187 | struct qeth_skb_data *retry_ctrl; | ||
3188 | int index; | 3171 | int index; |
3189 | int rc; | ||
3190 | 3172 | ||
3191 | /* spin until we get the queue ... */ | 3173 | /* spin until we get the queue ... */ |
3192 | while (atomic_cmpxchg(&queue->state, QETH_OUT_Q_UNLOCKED, | 3174 | while (atomic_cmpxchg(&queue->state, QETH_OUT_Q_UNLOCKED, |
@@ -3205,25 +3187,6 @@ int qeth_do_send_packet_fast(struct qeth_card *card, | |||
3205 | atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); | 3187 | atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); |
3206 | qeth_fill_buffer(queue, buffer, skb, hdr, offset, hd_len); | 3188 | qeth_fill_buffer(queue, buffer, skb, hdr, offset, hd_len); |
3207 | qeth_flush_buffers(queue, index, 1); | 3189 | qeth_flush_buffers(queue, index, 1); |
3208 | if (queue->sync_iqdio_error == 2) { | ||
3209 | skb1 = skb_dequeue(&buffer->skb_list); | ||
3210 | while (skb1) { | ||
3211 | atomic_dec(&skb1->users); | ||
3212 | skb1 = skb_dequeue(&buffer->skb_list); | ||
3213 | } | ||
3214 | retry_ctrl = (struct qeth_skb_data *) &skb->cb[16]; | ||
3215 | if (retry_ctrl->magic != QETH_SKB_MAGIC) { | ||
3216 | retry_ctrl->magic = QETH_SKB_MAGIC; | ||
3217 | retry_ctrl->count = 0; | ||
3218 | } | ||
3219 | if (retry_ctrl->count < QETH_SIGA_CC2_RETRIES) { | ||
3220 | retry_ctrl->count++; | ||
3221 | rc = dev_queue_xmit(skb); | ||
3222 | } else { | ||
3223 | dev_kfree_skb_any(skb); | ||
3224 | QETH_CARD_TEXT(card, 2, "qrdrop"); | ||
3225 | } | ||
3226 | } | ||
3227 | return 0; | 3190 | return 0; |
3228 | out: | 3191 | out: |
3229 | atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); | 3192 | atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); |