aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>2015-11-27 02:33:27 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-11-27 03:23:29 -0500
commit2bc53b8046ce9a1543204b6c6da1ab95e4caac76 (patch)
tree88a7e1d773fd04399c071087c6fb39912c42a70d
parent78c4a49a69e910a162b05e4e8727b9bdbf948f13 (diff)
s390/zcrypt: Fix AP queue handling if queue is full
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>
-rw-r--r--drivers/s390/crypto/ap_bus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 61f768518a34..24ec282e15d8 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -599,8 +599,10 @@ static enum ap_wait ap_sm_read(struct ap_device *ap_dev)
599 status = ap_sm_recv(ap_dev); 599 status = ap_sm_recv(ap_dev);
600 switch (status.response_code) { 600 switch (status.response_code) {
601 case AP_RESPONSE_NORMAL: 601 case AP_RESPONSE_NORMAL:
602 if (ap_dev->queue_count > 0) 602 if (ap_dev->queue_count > 0) {
603 ap_dev->state = AP_STATE_WORKING;
603 return AP_WAIT_AGAIN; 604 return AP_WAIT_AGAIN;
605 }
604 ap_dev->state = AP_STATE_IDLE; 606 ap_dev->state = AP_STATE_IDLE;
605 return AP_WAIT_NONE; 607 return AP_WAIT_NONE;
606 case AP_RESPONSE_NO_PENDING_REPLY: 608 case AP_RESPONSE_NO_PENDING_REPLY: