aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorUrsula Braun <braunu@de.ibm.com>2007-03-19 08:18:12 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-03-19 08:18:12 -0400
commitdcc49d460c4052d2fa7ba44e81d3b814b799f802 (patch)
tree7fb09ee1513188102cdae945cf8a38dda8286b78 /drivers/s390/cio
parent5851fadce8824d5d4b8fd02c22ae098401f6489e (diff)
[S390] cio: qdio slsb setup
Make sure set_slsb problems are handled correctly in qdio_do_qdio_fill_input() and qdio_do_qdio_fill_output. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/qdio.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index 5b1e3ff26c0b..05fac0733f3d 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -210,9 +210,11 @@ again:
210 goto again; 210 goto again;
211 } 211 }
212 if (rc < 0) { 212 if (rc < 0) {
213 QDIO_DBF_TEXT3(1,trace,"sqberr"); 213 QDIO_DBF_TEXT3(1,trace,"sqberr");
214 sprintf(dbf_text,"%2x,%2x,%d,%d",tmp_cnt,*cnt,ccq,q_no); 214 sprintf(dbf_text,"%2x,%2x",tmp_cnt,*cnt);
215 QDIO_DBF_TEXT3(1,trace,dbf_text); 215 QDIO_DBF_TEXT3(1,trace,dbf_text);
216 sprintf(dbf_text,"%d,%d",ccq,q_no);
217 QDIO_DBF_TEXT3(1,trace,dbf_text);
216 q->handler(q->cdev,QDIO_STATUS_ACTIVATE_CHECK_CONDITION| 218 q->handler(q->cdev,QDIO_STATUS_ACTIVATE_CHECK_CONDITION|
217 QDIO_STATUS_LOOK_FOR_ERROR, 219 QDIO_STATUS_LOOK_FOR_ERROR,
218 0, 0, 0, -1, -1, q->int_parm); 220 0, 0, 0, -1, -1, q->int_parm);
@@ -1250,7 +1252,6 @@ qdio_is_inbound_q_done(struct qdio_q *q)
1250 if (!no_used) { 1252 if (!no_used) {
1251 QDIO_DBF_TEXT4(0,trace,"inqisdnA"); 1253 QDIO_DBF_TEXT4(0,trace,"inqisdnA");
1252 QDIO_DBF_HEX4(0,trace,&q,sizeof(void*)); 1254 QDIO_DBF_HEX4(0,trace,&q,sizeof(void*));
1253 QDIO_DBF_TEXT4(0,trace,dbf_text);
1254 return 1; 1255 return 1;
1255 } 1256 }
1256 if (irq->is_qebsm) { 1257 if (irq->is_qebsm) {
@@ -3371,10 +3372,15 @@ qdio_do_qdio_fill_input(struct qdio_q *q, unsigned int qidx,
3371 unsigned int count, struct qdio_buffer *buffers) 3372 unsigned int count, struct qdio_buffer *buffers)
3372{ 3373{
3373 struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr; 3374 struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr;
3375 int tmp = 0;
3376
3374 qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1); 3377 qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1);
3375 if (irq->is_qebsm) { 3378 if (irq->is_qebsm) {
3376 while (count) 3379 while (count) {
3377 set_slsb(q, &qidx, SLSB_CU_INPUT_EMPTY, &count); 3380 tmp = set_slsb(q, &qidx, SLSB_CU_INPUT_EMPTY, &count);
3381 if (!tmp)
3382 return;
3383 }
3378 return; 3384 return;
3379 } 3385 }
3380 for (;;) { 3386 for (;;) {
@@ -3390,11 +3396,15 @@ qdio_do_qdio_fill_output(struct qdio_q *q, unsigned int qidx,
3390 unsigned int count, struct qdio_buffer *buffers) 3396 unsigned int count, struct qdio_buffer *buffers)
3391{ 3397{
3392 struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr; 3398 struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr;
3399 int tmp = 0;
3393 3400
3394 qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1); 3401 qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1);
3395 if (irq->is_qebsm) { 3402 if (irq->is_qebsm) {
3396 while (count) 3403 while (count) {
3397 set_slsb(q, &qidx, SLSB_CU_OUTPUT_PRIMED, &count); 3404 tmp = set_slsb(q, &qidx, SLSB_CU_OUTPUT_PRIMED, &count);
3405 if (!tmp)
3406 return;
3407 }
3398 return; 3408 return;
3399 } 3409 }
3400 3410