[patch 14/60] qdio: improve error handling for unexpected buffer states

From: Martin Schwidefsky
Date: Thu Nov 27 2008 - 05:37:05 EST


From: Jan Glauber <jang@xxxxxxxxxxxxxxxxxx>

In case of a qdio internal problem regarding the buffer handling
advance the queue and report the problem with WARN_ON instead
of getting stuck.

Signed-off-by: Jan Glauber <jang@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
---

drivers/s390/cio/qdio_main.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Index: quilt-2.6/drivers/s390/cio/qdio_main.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/qdio_main.c
+++ quilt-2.6/drivers/s390/cio/qdio_main.c
@@ -476,9 +476,12 @@ check_next:
atomic_sub(count, &q->nr_buf_used);
break;
case SLSB_CU_INPUT_EMPTY:
+ DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in nop");
+ break;
case SLSB_P_INPUT_NOT_INIT:
case SLSB_P_INPUT_ACK:
- DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in nop");
+ WARN_ON(1);
+ q->first_to_check++;
break;
default:
BUG();
@@ -648,6 +651,9 @@ check_next:
DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "out primed:%1d", q->nr);
break;
case SLSB_P_OUTPUT_NOT_INIT:
+ WARN_ON(1);
+ q->first_to_check++;
+ break;
case SLSB_P_OUTPUT_HALTED:
break;
default:

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/