aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
diff options
context:
space:
mode:
authorJan Glauber <jang@linux.vnet.ibm.com>2010-12-07 21:58:01 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-10 17:28:48 -0500
commita6a5ff26975c87a97f88c6ea077c325ff20c4cf2 (patch)
treebbdf54c9b8c3d5dc4de3b3dc7903217eb0949583 /drivers/s390/net
parent91d4576bfe87980b1b86305c29912d96b96ce98e (diff)
qeth: buffer count imbalance
The used buffers counter is not incremented in case of an error so the counter can become negative. Increment the used buffers counter before checking for errors. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net')
-rw-r--r--drivers/s390/net/qeth_core_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index e6b2df0e73f5..b7d9dc0adc62 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2840,6 +2840,7 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int index,
2840 queue->card->perf_stats.outbound_do_qdio_time += 2840 queue->card->perf_stats.outbound_do_qdio_time +=
2841 qeth_get_micros() - 2841 qeth_get_micros() -
2842 queue->card->perf_stats.outbound_do_qdio_start_time; 2842 queue->card->perf_stats.outbound_do_qdio_start_time;
2843 atomic_add(count, &queue->used_buffers);
2843 if (rc) { 2844 if (rc) {
2844 queue->card->stats.tx_errors += count; 2845 queue->card->stats.tx_errors += count;
2845 /* ignore temporary SIGA errors without busy condition */ 2846 /* ignore temporary SIGA errors without busy condition */
@@ -2853,7 +2854,6 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int index,
2853 qeth_schedule_recovery(queue->card); 2854 qeth_schedule_recovery(queue->card);
2854 return; 2855 return;
2855 } 2856 }
2856 atomic_add(count, &queue->used_buffers);
2857 if (queue->card->options.performance_stats) 2857 if (queue->card->options.performance_stats)
2858 queue->card->perf_stats.bufs_sent += count; 2858 queue->card->perf_stats.bufs_sent += count;
2859} 2859}