aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorJan Glauber <jang@linux.vnet.ibm.com>2009-03-26 10:24:28 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-03-26 10:24:21 -0400
commit3fdf1e18cbc7c58f2d5604315ddae3596725bc6a (patch)
treeb5c145145d55b278b7ae4fcbf544518895a00ca7 /drivers/s390
parent700e982f28f5e13cef8eea93ac8c6702f699d894 (diff)
[S390] qdio: move ACK to newest buffer for devices without QEBSM
The ACKnowledgement state should be set on the newest SBAL so an adapter interrupt surpression check needs to scan fewer SBALs. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/qdio_main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index 8e6bc9cddfa0..61ba765936a6 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -440,12 +440,16 @@ static inline void inbound_primed(struct qdio_q *q, int count)
440 /* reset the previous ACK but first set the new one */ 440 /* reset the previous ACK but first set the new one */
441 set_buf_state(q, new, SLSB_P_INPUT_ACK); 441 set_buf_state(q, new, SLSB_P_INPUT_ACK);
442 set_buf_state(q, q->last_move_ftc, SLSB_P_INPUT_NOT_INIT); 442 set_buf_state(q, q->last_move_ftc, SLSB_P_INPUT_NOT_INIT);
443 } 443 } else {
444 else {
445 q->u.in.polling = 1; 444 q->u.in.polling = 1;
446 set_buf_state(q, q->first_to_check, SLSB_P_INPUT_ACK); 445 set_buf_state(q, new, SLSB_P_INPUT_ACK);
447 } 446 }
448 447
448 /*
449 * last_move_ftc points to the ACK'ed buffer and not to the last turns
450 * first_to_check like for qebsm. Since it is only used to check if
451 * the queue front moved in qdio_inbound_q_done this is not a problem.
452 */
449 q->last_move_ftc = new; 453 q->last_move_ftc = new;
450 count--; 454 count--;
451 if (!count) 455 if (!count)
@@ -455,7 +459,7 @@ static inline void inbound_primed(struct qdio_q *q, int count)
455 * Need to change all PRIMED buffers to NOT_INIT, otherwise 459 * Need to change all PRIMED buffers to NOT_INIT, otherwise
456 * we're loosing initiative in the thinint code. 460 * we're loosing initiative in the thinint code.
457 */ 461 */
458 set_buf_states(q, next_buf(q->first_to_check), SLSB_P_INPUT_NOT_INIT, 462 set_buf_states(q, q->first_to_check, SLSB_P_INPUT_NOT_INIT,
459 count); 463 count);
460} 464}
461 465
@@ -1480,7 +1484,6 @@ static void handle_inbound(struct qdio_q *q, unsigned int callflags,
1480 if (q->u.in.ack_count <= 0) { 1484 if (q->u.in.ack_count <= 0) {
1481 q->u.in.polling = 0; 1485 q->u.in.polling = 0;
1482 q->u.in.ack_count = 0; 1486 q->u.in.ack_count = 0;
1483 /* TODO: must we set last_move_ftc to something meaningful? */
1484 goto set; 1487 goto set;
1485 } 1488 }
1486 q->last_move_ftc = add_buf(q->last_move_ftc, diff); 1489 q->last_move_ftc = add_buf(q->last_move_ftc, diff);