Commit 1db85d0e authored by Julian Wiedmann's avatar Julian Wiedmann Committed by Vasily Gorbik

s390/qdio: refactor ACK processing for primed SBALs

inbound_primed() currently has two code paths - one for QEBSM that knows
how to deal with multiple ACKs, and a non-QEBSM path that strictly
assumes a single ACK on the queue.

In preparation for a subsequent patch, slightly adjust the non-QEBSM
path so that it can manage a queue with multiple ACKs.
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 9de6c087
...@@ -466,15 +466,14 @@ static inline void inbound_primed(struct qdio_q *q, unsigned int start, ...@@ -466,15 +466,14 @@ static inline void inbound_primed(struct qdio_q *q, unsigned int start,
* or by the next inbound run. * or by the next inbound run.
*/ */
new = add_buf(start, count - 1); new = add_buf(start, count - 1);
if (q->u.in.ack_count) { set_buf_state(q, new, SLSB_P_INPUT_ACK);
/* reset the previous ACK but first set the new one */
set_buf_state(q, new, SLSB_P_INPUT_ACK); /* delete the previous ACKs */
set_buf_state(q, q->u.in.ack_start, SLSB_P_INPUT_NOT_INIT); if (q->u.in.ack_count)
} else { set_buf_states(q, q->u.in.ack_start, SLSB_P_INPUT_NOT_INIT,
q->u.in.ack_count = 1; q->u.in.ack_count);
set_buf_state(q, new, SLSB_P_INPUT_ACK);
}
q->u.in.ack_count = 1;
q->u.in.ack_start = new; q->u.in.ack_start = new;
count--; count--;
if (!count) if (!count)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment