diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2008-07-17 11:16:48 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-17 11:22:10 -0400 |
commit | 779e6e1c724d30e0fd1baca78b852e41e3a23c1d (patch) | |
tree | b7fc4f0f01b66c3c65226cc627edd501e00ab44f /drivers/s390/net | |
parent | dae39843f478d181da5b5e1c2c703dfcaaf838c1 (diff) |
[S390] qdio: new qdio driver.
List of major changes:
- split qdio driver into several files
- seperation of thin interrupt code
- improved handling for multiple thin interrupt devices
- inbound and outbound processing now always runs in tasklet context
- significant less tasklet schedules per interrupt needed
- merged qebsm with non-qebsm handling
- cleanup qdio interface and added kerneldoc
- coding style
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Utz Bacher <utz.bacher@de.ibm.com>
Reviewed-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/net')
-rw-r--r-- | drivers/s390/net/qeth_core.h | 12 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 87 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 26 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 25 |
4 files changed, 60 insertions, 90 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 699ac11debd8..1895dbb553cd 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -239,11 +239,6 @@ static inline int qeth_is_ipa_enabled(struct qeth_ipa_info *ipa, | |||
239 | /*not used unless the microcode gets patched*/ | 239 | /*not used unless the microcode gets patched*/ |
240 | #define QETH_PCI_TIMER_VALUE(card) 3 | 240 | #define QETH_PCI_TIMER_VALUE(card) 3 |
241 | 241 | ||
242 | #define QETH_MIN_INPUT_THRESHOLD 1 | ||
243 | #define QETH_MAX_INPUT_THRESHOLD 500 | ||
244 | #define QETH_MIN_OUTPUT_THRESHOLD 1 | ||
245 | #define QETH_MAX_OUTPUT_THRESHOLD 300 | ||
246 | |||
247 | /* priority queing */ | 242 | /* priority queing */ |
248 | #define QETH_PRIOQ_DEFAULT QETH_NO_PRIO_QUEUEING | 243 | #define QETH_PRIOQ_DEFAULT QETH_NO_PRIO_QUEUEING |
249 | #define QETH_DEFAULT_QUEUE 2 | 244 | #define QETH_DEFAULT_QUEUE 2 |
@@ -811,17 +806,14 @@ int qeth_send_ipa_cmd(struct qeth_card *, struct qeth_cmd_buffer *, | |||
811 | struct qeth_cmd_buffer *qeth_get_ipacmd_buffer(struct qeth_card *, | 806 | struct qeth_cmd_buffer *qeth_get_ipacmd_buffer(struct qeth_card *, |
812 | enum qeth_ipa_cmds, enum qeth_prot_versions); | 807 | enum qeth_ipa_cmds, enum qeth_prot_versions); |
813 | int qeth_query_setadapterparms(struct qeth_card *); | 808 | int qeth_query_setadapterparms(struct qeth_card *); |
814 | int qeth_check_qdio_errors(struct qdio_buffer *, unsigned int, | 809 | int qeth_check_qdio_errors(struct qdio_buffer *, unsigned int, const char *); |
815 | unsigned int, const char *); | ||
816 | void qeth_queue_input_buffer(struct qeth_card *, int); | 810 | void qeth_queue_input_buffer(struct qeth_card *, int); |
817 | struct sk_buff *qeth_core_get_next_skb(struct qeth_card *, | 811 | struct sk_buff *qeth_core_get_next_skb(struct qeth_card *, |
818 | struct qdio_buffer *, struct qdio_buffer_element **, int *, | 812 | struct qdio_buffer *, struct qdio_buffer_element **, int *, |
819 | struct qeth_hdr **); | 813 | struct qeth_hdr **); |
820 | void qeth_schedule_recovery(struct qeth_card *); | 814 | void qeth_schedule_recovery(struct qeth_card *); |
821 | void qeth_qdio_output_handler(struct ccw_device *, unsigned int, | 815 | void qeth_qdio_output_handler(struct ccw_device *, unsigned int, |
822 | unsigned int, unsigned int, | 816 | int, int, int, unsigned long); |
823 | unsigned int, int, int, | ||
824 | unsigned long); | ||
825 | void qeth_clear_ipacmd_list(struct qeth_card *); | 817 | void qeth_clear_ipacmd_list(struct qeth_card *); |
826 | int qeth_qdio_clear_card(struct qeth_card *, int); | 818 | int qeth_qdio_clear_card(struct qeth_card *, int); |
827 | void qeth_clear_working_pool_list(struct qeth_card *); | 819 | void qeth_clear_working_pool_list(struct qeth_card *); |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 0ac54dc638c2..c3ad89e302bd 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -2073,7 +2073,7 @@ static void qeth_create_qib_param_field_blkt(struct qeth_card *card, | |||
2073 | static int qeth_qdio_activate(struct qeth_card *card) | 2073 | static int qeth_qdio_activate(struct qeth_card *card) |
2074 | { | 2074 | { |
2075 | QETH_DBF_TEXT(SETUP, 3, "qdioact"); | 2075 | QETH_DBF_TEXT(SETUP, 3, "qdioact"); |
2076 | return qdio_activate(CARD_DDEV(card), 0); | 2076 | return qdio_activate(CARD_DDEV(card)); |
2077 | } | 2077 | } |
2078 | 2078 | ||
2079 | static int qeth_dm_act(struct qeth_card *card) | 2079 | static int qeth_dm_act(struct qeth_card *card) |
@@ -2349,16 +2349,11 @@ int qeth_init_qdio_queues(struct qeth_card *card) | |||
2349 | card->qdio.in_q->next_buf_to_init = | 2349 | card->qdio.in_q->next_buf_to_init = |
2350 | card->qdio.in_buf_pool.buf_count - 1; | 2350 | card->qdio.in_buf_pool.buf_count - 1; |
2351 | rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0, 0, | 2351 | rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0, 0, |
2352 | card->qdio.in_buf_pool.buf_count - 1, NULL); | 2352 | card->qdio.in_buf_pool.buf_count - 1); |
2353 | if (rc) { | 2353 | if (rc) { |
2354 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | 2354 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); |
2355 | return rc; | 2355 | return rc; |
2356 | } | 2356 | } |
2357 | rc = qdio_synchronize(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0); | ||
2358 | if (rc) { | ||
2359 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); | ||
2360 | return rc; | ||
2361 | } | ||
2362 | /* outbound queue */ | 2357 | /* outbound queue */ |
2363 | for (i = 0; i < card->qdio.no_out_queues; ++i) { | 2358 | for (i = 0; i < card->qdio.no_out_queues; ++i) { |
2364 | memset(card->qdio.out_qs[i]->qdio_bufs, 0, | 2359 | memset(card->qdio.out_qs[i]->qdio_bufs, 0, |
@@ -2559,9 +2554,9 @@ int qeth_query_setadapterparms(struct qeth_card *card) | |||
2559 | EXPORT_SYMBOL_GPL(qeth_query_setadapterparms); | 2554 | EXPORT_SYMBOL_GPL(qeth_query_setadapterparms); |
2560 | 2555 | ||
2561 | int qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error, | 2556 | int qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error, |
2562 | unsigned int siga_error, const char *dbftext) | 2557 | const char *dbftext) |
2563 | { | 2558 | { |
2564 | if (qdio_error || siga_error) { | 2559 | if (qdio_error) { |
2565 | QETH_DBF_TEXT(TRACE, 2, dbftext); | 2560 | QETH_DBF_TEXT(TRACE, 2, dbftext); |
2566 | QETH_DBF_TEXT(QERR, 2, dbftext); | 2561 | QETH_DBF_TEXT(QERR, 2, dbftext); |
2567 | QETH_DBF_TEXT_(QERR, 2, " F15=%02X", | 2562 | QETH_DBF_TEXT_(QERR, 2, " F15=%02X", |
@@ -2569,7 +2564,6 @@ int qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error, | |||
2569 | QETH_DBF_TEXT_(QERR, 2, " F14=%02X", | 2564 | QETH_DBF_TEXT_(QERR, 2, " F14=%02X", |
2570 | buf->element[14].flags & 0xff); | 2565 | buf->element[14].flags & 0xff); |
2571 | QETH_DBF_TEXT_(QERR, 2, " qerr=%X", qdio_error); | 2566 | QETH_DBF_TEXT_(QERR, 2, " qerr=%X", qdio_error); |
2572 | QETH_DBF_TEXT_(QERR, 2, " serr=%X", siga_error); | ||
2573 | return 1; | 2567 | return 1; |
2574 | } | 2568 | } |
2575 | return 0; | 2569 | return 0; |
@@ -2622,9 +2616,8 @@ void qeth_queue_input_buffer(struct qeth_card *card, int index) | |||
2622 | card->perf_stats.inbound_do_qdio_start_time = | 2616 | card->perf_stats.inbound_do_qdio_start_time = |
2623 | qeth_get_micros(); | 2617 | qeth_get_micros(); |
2624 | } | 2618 | } |
2625 | rc = do_QDIO(CARD_DDEV(card), | 2619 | rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0, |
2626 | QDIO_FLAG_SYNC_INPUT | QDIO_FLAG_UNDER_INTERRUPT, | 2620 | queue->next_buf_to_init, count); |
2627 | 0, queue->next_buf_to_init, count, NULL); | ||
2628 | if (card->options.performance_stats) | 2621 | if (card->options.performance_stats) |
2629 | card->perf_stats.inbound_do_qdio_time += | 2622 | card->perf_stats.inbound_do_qdio_time += |
2630 | qeth_get_micros() - | 2623 | qeth_get_micros() - |
@@ -2643,14 +2636,13 @@ void qeth_queue_input_buffer(struct qeth_card *card, int index) | |||
2643 | EXPORT_SYMBOL_GPL(qeth_queue_input_buffer); | 2636 | EXPORT_SYMBOL_GPL(qeth_queue_input_buffer); |
2644 | 2637 | ||
2645 | static int qeth_handle_send_error(struct qeth_card *card, | 2638 | static int qeth_handle_send_error(struct qeth_card *card, |
2646 | struct qeth_qdio_out_buffer *buffer, unsigned int qdio_err, | 2639 | struct qeth_qdio_out_buffer *buffer, unsigned int qdio_err) |
2647 | unsigned int siga_err) | ||
2648 | { | 2640 | { |
2649 | int sbalf15 = buffer->buffer->element[15].flags & 0xff; | 2641 | int sbalf15 = buffer->buffer->element[15].flags & 0xff; |
2650 | int cc = siga_err & 3; | 2642 | int cc = qdio_err & 3; |
2651 | 2643 | ||
2652 | QETH_DBF_TEXT(TRACE, 6, "hdsnderr"); | 2644 | QETH_DBF_TEXT(TRACE, 6, "hdsnderr"); |
2653 | qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr"); | 2645 | qeth_check_qdio_errors(buffer->buffer, qdio_err, "qouterr"); |
2654 | switch (cc) { | 2646 | switch (cc) { |
2655 | case 0: | 2647 | case 0: |
2656 | if (qdio_err) { | 2648 | if (qdio_err) { |
@@ -2662,7 +2654,7 @@ static int qeth_handle_send_error(struct qeth_card *card, | |||
2662 | } | 2654 | } |
2663 | return QETH_SEND_ERROR_NONE; | 2655 | return QETH_SEND_ERROR_NONE; |
2664 | case 2: | 2656 | case 2: |
2665 | if (siga_err & QDIO_SIGA_ERROR_B_BIT_SET) { | 2657 | if (qdio_err & QDIO_ERROR_SIGA_BUSY) { |
2666 | QETH_DBF_TEXT(TRACE, 1, "SIGAcc2B"); | 2658 | QETH_DBF_TEXT(TRACE, 1, "SIGAcc2B"); |
2667 | QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); | 2659 | QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); |
2668 | return QETH_SEND_ERROR_KICK_IT; | 2660 | return QETH_SEND_ERROR_KICK_IT; |
@@ -2758,8 +2750,8 @@ static int qeth_flush_buffers_on_no_pci(struct qeth_qdio_out_q *queue) | |||
2758 | return 0; | 2750 | return 0; |
2759 | } | 2751 | } |
2760 | 2752 | ||
2761 | static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int, | 2753 | static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int index, |
2762 | int index, int count) | 2754 | int count) |
2763 | { | 2755 | { |
2764 | struct qeth_qdio_out_buffer *buf; | 2756 | struct qeth_qdio_out_buffer *buf; |
2765 | int rc; | 2757 | int rc; |
@@ -2807,12 +2799,10 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int, | |||
2807 | qeth_get_micros(); | 2799 | qeth_get_micros(); |
2808 | } | 2800 | } |
2809 | qdio_flags = QDIO_FLAG_SYNC_OUTPUT; | 2801 | qdio_flags = QDIO_FLAG_SYNC_OUTPUT; |
2810 | if (under_int) | ||
2811 | qdio_flags |= QDIO_FLAG_UNDER_INTERRUPT; | ||
2812 | if (atomic_read(&queue->set_pci_flags_count)) | 2802 | if (atomic_read(&queue->set_pci_flags_count)) |
2813 | qdio_flags |= QDIO_FLAG_PCI_OUT; | 2803 | qdio_flags |= QDIO_FLAG_PCI_OUT; |
2814 | rc = do_QDIO(CARD_DDEV(queue->card), qdio_flags, | 2804 | rc = do_QDIO(CARD_DDEV(queue->card), qdio_flags, |
2815 | queue->queue_no, index, count, NULL); | 2805 | queue->queue_no, index, count); |
2816 | if (queue->card->options.performance_stats) | 2806 | if (queue->card->options.performance_stats) |
2817 | queue->card->perf_stats.outbound_do_qdio_time += | 2807 | queue->card->perf_stats.outbound_do_qdio_time += |
2818 | qeth_get_micros() - | 2808 | qeth_get_micros() - |
@@ -2866,16 +2856,15 @@ static void qeth_check_outbound_queue(struct qeth_qdio_out_q *queue) | |||
2866 | queue->card->perf_stats.bufs_sent_pack += | 2856 | queue->card->perf_stats.bufs_sent_pack += |
2867 | flush_cnt; | 2857 | flush_cnt; |
2868 | if (flush_cnt) | 2858 | if (flush_cnt) |
2869 | qeth_flush_buffers(queue, 1, index, flush_cnt); | 2859 | qeth_flush_buffers(queue, index, flush_cnt); |
2870 | atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); | 2860 | atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); |
2871 | } | 2861 | } |
2872 | } | 2862 | } |
2873 | } | 2863 | } |
2874 | 2864 | ||
2875 | void qeth_qdio_output_handler(struct ccw_device *ccwdev, unsigned int status, | 2865 | void qeth_qdio_output_handler(struct ccw_device *ccwdev, |
2876 | unsigned int qdio_error, unsigned int siga_error, | 2866 | unsigned int qdio_error, int __queue, int first_element, |
2877 | unsigned int __queue, int first_element, int count, | 2867 | int count, unsigned long card_ptr) |
2878 | unsigned long card_ptr) | ||
2879 | { | 2868 | { |
2880 | struct qeth_card *card = (struct qeth_card *) card_ptr; | 2869 | struct qeth_card *card = (struct qeth_card *) card_ptr; |
2881 | struct qeth_qdio_out_q *queue = card->qdio.out_qs[__queue]; | 2870 | struct qeth_qdio_out_q *queue = card->qdio.out_qs[__queue]; |
@@ -2883,15 +2872,12 @@ void qeth_qdio_output_handler(struct ccw_device *ccwdev, unsigned int status, | |||
2883 | int i; | 2872 | int i; |
2884 | 2873 | ||
2885 | QETH_DBF_TEXT(TRACE, 6, "qdouhdl"); | 2874 | QETH_DBF_TEXT(TRACE, 6, "qdouhdl"); |
2886 | if (status & QDIO_STATUS_LOOK_FOR_ERROR) { | 2875 | if (qdio_error & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { |
2887 | if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) { | 2876 | QETH_DBF_TEXT(TRACE, 2, "achkcond"); |
2888 | QETH_DBF_TEXT(TRACE, 2, "achkcond"); | 2877 | QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); |
2889 | QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); | 2878 | netif_stop_queue(card->dev); |
2890 | QETH_DBF_TEXT_(TRACE, 2, "%08x", status); | 2879 | qeth_schedule_recovery(card); |
2891 | netif_stop_queue(card->dev); | 2880 | return; |
2892 | qeth_schedule_recovery(card); | ||
2893 | return; | ||
2894 | } | ||
2895 | } | 2881 | } |
2896 | if (card->options.performance_stats) { | 2882 | if (card->options.performance_stats) { |
2897 | card->perf_stats.outbound_handler_cnt++; | 2883 | card->perf_stats.outbound_handler_cnt++; |
@@ -2901,8 +2887,7 @@ void qeth_qdio_output_handler(struct ccw_device *ccwdev, unsigned int status, | |||
2901 | for (i = first_element; i < (first_element + count); ++i) { | 2887 | for (i = first_element; i < (first_element + count); ++i) { |
2902 | buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; | 2888 | buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; |
2903 | /*we only handle the KICK_IT error by doing a recovery */ | 2889 | /*we only handle the KICK_IT error by doing a recovery */ |
2904 | if (qeth_handle_send_error(card, buffer, | 2890 | if (qeth_handle_send_error(card, buffer, qdio_error) |
2905 | qdio_error, siga_error) | ||
2906 | == QETH_SEND_ERROR_KICK_IT){ | 2891 | == QETH_SEND_ERROR_KICK_IT){ |
2907 | netif_stop_queue(card->dev); | 2892 | netif_stop_queue(card->dev); |
2908 | qeth_schedule_recovery(card); | 2893 | qeth_schedule_recovery(card); |
@@ -3164,11 +3149,11 @@ int qeth_do_send_packet_fast(struct qeth_card *card, | |||
3164 | atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); | 3149 | atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); |
3165 | if (ctx == NULL) { | 3150 | if (ctx == NULL) { |
3166 | qeth_fill_buffer(queue, buffer, skb); | 3151 | qeth_fill_buffer(queue, buffer, skb); |
3167 | qeth_flush_buffers(queue, 0, index, 1); | 3152 | qeth_flush_buffers(queue, index, 1); |
3168 | } else { | 3153 | } else { |
3169 | flush_cnt = qeth_eddp_fill_buffer(queue, ctx, index); | 3154 | flush_cnt = qeth_eddp_fill_buffer(queue, ctx, index); |
3170 | WARN_ON(buffers_needed != flush_cnt); | 3155 | WARN_ON(buffers_needed != flush_cnt); |
3171 | qeth_flush_buffers(queue, 0, index, flush_cnt); | 3156 | qeth_flush_buffers(queue, index, flush_cnt); |
3172 | } | 3157 | } |
3173 | return 0; | 3158 | return 0; |
3174 | out: | 3159 | out: |
@@ -3221,8 +3206,8 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, | |||
3221 | * again */ | 3206 | * again */ |
3222 | if (atomic_read(&buffer->state) != | 3207 | if (atomic_read(&buffer->state) != |
3223 | QETH_QDIO_BUF_EMPTY){ | 3208 | QETH_QDIO_BUF_EMPTY){ |
3224 | qeth_flush_buffers(queue, 0, | 3209 | qeth_flush_buffers(queue, start_index, |
3225 | start_index, flush_count); | 3210 | flush_count); |
3226 | atomic_set(&queue->state, | 3211 | atomic_set(&queue->state, |
3227 | QETH_OUT_Q_UNLOCKED); | 3212 | QETH_OUT_Q_UNLOCKED); |
3228 | return -EBUSY; | 3213 | return -EBUSY; |
@@ -3253,7 +3238,7 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, | |||
3253 | flush_count += tmp; | 3238 | flush_count += tmp; |
3254 | out: | 3239 | out: |
3255 | if (flush_count) | 3240 | if (flush_count) |
3256 | qeth_flush_buffers(queue, 0, start_index, flush_count); | 3241 | qeth_flush_buffers(queue, start_index, flush_count); |
3257 | else if (!atomic_read(&queue->set_pci_flags_count)) | 3242 | else if (!atomic_read(&queue->set_pci_flags_count)) |
3258 | atomic_xchg(&queue->state, QETH_OUT_Q_LOCKED_FLUSH); | 3243 | atomic_xchg(&queue->state, QETH_OUT_Q_LOCKED_FLUSH); |
3259 | /* | 3244 | /* |
@@ -3274,7 +3259,7 @@ out: | |||
3274 | if (!flush_count && !atomic_read(&queue->set_pci_flags_count)) | 3259 | if (!flush_count && !atomic_read(&queue->set_pci_flags_count)) |
3275 | flush_count += qeth_flush_buffers_on_no_pci(queue); | 3260 | flush_count += qeth_flush_buffers_on_no_pci(queue); |
3276 | if (flush_count) | 3261 | if (flush_count) |
3277 | qeth_flush_buffers(queue, 0, start_index, flush_count); | 3262 | qeth_flush_buffers(queue, start_index, flush_count); |
3278 | } | 3263 | } |
3279 | /* at this point the queue is UNLOCKED again */ | 3264 | /* at this point the queue is UNLOCKED again */ |
3280 | if (queue->card->options.performance_stats && do_pack) | 3265 | if (queue->card->options.performance_stats && do_pack) |
@@ -3686,10 +3671,6 @@ static int qeth_qdio_establish(struct qeth_card *card) | |||
3686 | init_data.q_format = qeth_get_qdio_q_format(card); | 3671 | init_data.q_format = qeth_get_qdio_q_format(card); |
3687 | init_data.qib_param_field_format = 0; | 3672 | init_data.qib_param_field_format = 0; |
3688 | init_data.qib_param_field = qib_param_field; | 3673 | init_data.qib_param_field = qib_param_field; |
3689 | init_data.min_input_threshold = QETH_MIN_INPUT_THRESHOLD; | ||
3690 | init_data.max_input_threshold = QETH_MAX_INPUT_THRESHOLD; | ||
3691 | init_data.min_output_threshold = QETH_MIN_OUTPUT_THRESHOLD; | ||
3692 | init_data.max_output_threshold = QETH_MAX_OUTPUT_THRESHOLD; | ||
3693 | init_data.no_input_qs = 1; | 3674 | init_data.no_input_qs = 1; |
3694 | init_data.no_output_qs = card->qdio.no_out_queues; | 3675 | init_data.no_output_qs = card->qdio.no_out_queues; |
3695 | init_data.input_handler = card->discipline.input_handler; | 3676 | init_data.input_handler = card->discipline.input_handler; |
@@ -3751,8 +3732,9 @@ static int qeth_core_driver_group(const char *buf, struct device *root_dev, | |||
3751 | 3732 | ||
3752 | int qeth_core_hardsetup_card(struct qeth_card *card) | 3733 | int qeth_core_hardsetup_card(struct qeth_card *card) |
3753 | { | 3734 | { |
3735 | struct qdio_ssqd_desc *qdio_ssqd; | ||
3754 | int retries = 3; | 3736 | int retries = 3; |
3755 | int mpno; | 3737 | int mpno = 0; |
3756 | int rc; | 3738 | int rc; |
3757 | 3739 | ||
3758 | QETH_DBF_TEXT(SETUP, 2, "hrdsetup"); | 3740 | QETH_DBF_TEXT(SETUP, 2, "hrdsetup"); |
@@ -3784,7 +3766,10 @@ retry: | |||
3784 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); | 3766 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); |
3785 | return rc; | 3767 | return rc; |
3786 | } | 3768 | } |
3787 | mpno = qdio_get_ssqd_pct(CARD_DDEV(card)); | 3769 | |
3770 | qdio_ssqd = qdio_get_ssqd_desc(CARD_DDEV(card)); | ||
3771 | if (qdio_ssqd) | ||
3772 | mpno = qdio_ssqd->pcnt; | ||
3788 | if (mpno) | 3773 | if (mpno) |
3789 | mpno = min(mpno - 1, QETH_MAX_PORTNO); | 3774 | mpno = min(mpno - 1, QETH_MAX_PORTNO); |
3790 | if (card->info.portno > mpno) { | 3775 | if (card->info.portno > mpno) { |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index f682f7b14480..3fbc3bdec0c5 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -726,8 +726,7 @@ tx_drop: | |||
726 | } | 726 | } |
727 | 727 | ||
728 | static void qeth_l2_qdio_input_handler(struct ccw_device *ccwdev, | 728 | static void qeth_l2_qdio_input_handler(struct ccw_device *ccwdev, |
729 | unsigned int status, unsigned int qdio_err, | 729 | unsigned int qdio_err, unsigned int queue, |
730 | unsigned int siga_err, unsigned int queue, | ||
731 | int first_element, int count, unsigned long card_ptr) | 730 | int first_element, int count, unsigned long card_ptr) |
732 | { | 731 | { |
733 | struct net_device *net_dev; | 732 | struct net_device *net_dev; |
@@ -742,23 +741,20 @@ static void qeth_l2_qdio_input_handler(struct ccw_device *ccwdev, | |||
742 | card->perf_stats.inbound_cnt++; | 741 | card->perf_stats.inbound_cnt++; |
743 | card->perf_stats.inbound_start_time = qeth_get_micros(); | 742 | card->perf_stats.inbound_start_time = qeth_get_micros(); |
744 | } | 743 | } |
745 | if (status & QDIO_STATUS_LOOK_FOR_ERROR) { | 744 | if (qdio_err & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { |
746 | if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) { | 745 | QETH_DBF_TEXT(TRACE, 1, "qdinchk"); |
747 | QETH_DBF_TEXT(TRACE, 1, "qdinchk"); | 746 | QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); |
748 | QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); | 747 | QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", first_element, |
749 | QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", first_element, | 748 | count); |
750 | count); | 749 | QETH_DBF_TEXT_(TRACE, 1, "%04X", queue); |
751 | QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", queue, status); | 750 | qeth_schedule_recovery(card); |
752 | qeth_schedule_recovery(card); | 751 | return; |
753 | return; | ||
754 | } | ||
755 | } | 752 | } |
756 | for (i = first_element; i < (first_element + count); ++i) { | 753 | for (i = first_element; i < (first_element + count); ++i) { |
757 | index = i % QDIO_MAX_BUFFERS_PER_Q; | 754 | index = i % QDIO_MAX_BUFFERS_PER_Q; |
758 | buffer = &card->qdio.in_q->bufs[index]; | 755 | buffer = &card->qdio.in_q->bufs[index]; |
759 | if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && | 756 | if (!(qdio_err && |
760 | qeth_check_qdio_errors(buffer->buffer, | 757 | qeth_check_qdio_errors(buffer->buffer, qdio_err, "qinerr"))) |
761 | qdio_err, siga_err, "qinerr"))) | ||
762 | qeth_l2_process_inbound_buffer(card, buffer, index); | 758 | qeth_l2_process_inbound_buffer(card, buffer, index); |
763 | /* clear buffer and give back to hardware */ | 759 | /* clear buffer and give back to hardware */ |
764 | qeth_put_buffer_pool_entry(card, buffer->pool_entry); | 760 | qeth_put_buffer_pool_entry(card, buffer->pool_entry); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 06deaee50f6d..22f64aa6dd1f 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2939,8 +2939,7 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) | |||
2939 | } | 2939 | } |
2940 | 2940 | ||
2941 | static void qeth_l3_qdio_input_handler(struct ccw_device *ccwdev, | 2941 | static void qeth_l3_qdio_input_handler(struct ccw_device *ccwdev, |
2942 | unsigned int status, unsigned int qdio_err, | 2942 | unsigned int qdio_err, unsigned int queue, int first_element, |
2943 | unsigned int siga_err, unsigned int queue, int first_element, | ||
2944 | int count, unsigned long card_ptr) | 2943 | int count, unsigned long card_ptr) |
2945 | { | 2944 | { |
2946 | struct net_device *net_dev; | 2945 | struct net_device *net_dev; |
@@ -2955,23 +2954,21 @@ static void qeth_l3_qdio_input_handler(struct ccw_device *ccwdev, | |||
2955 | card->perf_stats.inbound_cnt++; | 2954 | card->perf_stats.inbound_cnt++; |
2956 | card->perf_stats.inbound_start_time = qeth_get_micros(); | 2955 | card->perf_stats.inbound_start_time = qeth_get_micros(); |
2957 | } | 2956 | } |
2958 | if (status & QDIO_STATUS_LOOK_FOR_ERROR) { | 2957 | if (qdio_err & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { |
2959 | if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) { | 2958 | QETH_DBF_TEXT(TRACE, 1, "qdinchk"); |
2960 | QETH_DBF_TEXT(TRACE, 1, "qdinchk"); | 2959 | QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); |
2961 | QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); | 2960 | QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", |
2962 | QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", | 2961 | first_element, count); |
2963 | first_element, count); | 2962 | QETH_DBF_TEXT_(TRACE, 1, "%04X", queue); |
2964 | QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", queue, status); | 2963 | qeth_schedule_recovery(card); |
2965 | qeth_schedule_recovery(card); | 2964 | return; |
2966 | return; | ||
2967 | } | ||
2968 | } | 2965 | } |
2969 | for (i = first_element; i < (first_element + count); ++i) { | 2966 | for (i = first_element; i < (first_element + count); ++i) { |
2970 | index = i % QDIO_MAX_BUFFERS_PER_Q; | 2967 | index = i % QDIO_MAX_BUFFERS_PER_Q; |
2971 | buffer = &card->qdio.in_q->bufs[index]; | 2968 | buffer = &card->qdio.in_q->bufs[index]; |
2972 | if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && | 2969 | if (!(qdio_err && |
2973 | qeth_check_qdio_errors(buffer->buffer, | 2970 | qeth_check_qdio_errors(buffer->buffer, |
2974 | qdio_err, siga_err, "qinerr"))) | 2971 | qdio_err, "qinerr"))) |
2975 | qeth_l3_process_inbound_buffer(card, buffer, index); | 2972 | qeth_l3_process_inbound_buffer(card, buffer, index); |
2976 | /* clear buffer and give back to hardware */ | 2973 | /* clear buffer and give back to hardware */ |
2977 | qeth_put_buffer_pool_entry(card, buffer->pool_entry); | 2974 | qeth_put_buffer_pool_entry(card, buffer->pool_entry); |