Skip to content

Commit

Permalink
s390/zcrypt: Fix AP queue handling if queue is full
Browse files Browse the repository at this point in the history
When the AP queue depth of requests was reached additional requests
have been ignored. These request are stuck in the request queue.

The AP queue handling now push the next waiting request into the
queue after fetching a previous serviced and finished reply.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Ingo Tuchscherer authored and Martin Schwidefsky committed Nov 27, 2015
1 parent 78c4a49 commit 2bc53b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/s390/crypto/ap_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,10 @@ static enum ap_wait ap_sm_read(struct ap_device *ap_dev)
status = ap_sm_recv(ap_dev);
switch (status.response_code) {
case AP_RESPONSE_NORMAL:
if (ap_dev->queue_count > 0)
if (ap_dev->queue_count > 0) {
ap_dev->state = AP_STATE_WORKING;
return AP_WAIT_AGAIN;
}
ap_dev->state = AP_STATE_IDLE;
return AP_WAIT_NONE;
case AP_RESPONSE_NO_PENDING_REPLY:
Expand Down

0 comments on commit 2bc53b8

Please sign in to comment.