Skip to content

Commit 411b010

Browse files
Tony Krowiakhcahca
authored andcommitted
s390/vfio-ap: wait for response code 05 to clear on queue reset
Response code 05, AP busy, is a valid response code for a ZAPQ or TAPQ. Instead of returning error -EIO when a ZAPQ fails with response code 05, let's wait until the queue is no longer busy and try the ZAPQ again. Signed-off-by: Tony Krowiak <[email protected]> Acked-by: Janosch Frank <[email protected]> Tested-by: Viktor Mihajlovski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Carstens <[email protected]>
1 parent 7aa7b2a commit 411b010

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/s390/crypto/vfio_ap_ops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,7 @@ static int apq_status_check(int apqn, struct ap_queue_status *status)
16111611
case AP_RESPONSE_DECONFIGURED:
16121612
return 0;
16131613
case AP_RESPONSE_RESET_IN_PROGRESS:
1614+
case AP_RESPONSE_BUSY:
16141615
return -EBUSY;
16151616
default:
16161617
WARN(true,
@@ -1663,6 +1664,7 @@ static int vfio_ap_mdev_reset_queue(struct vfio_ap_queue *q)
16631664
}
16641665
break;
16651666
case AP_RESPONSE_RESET_IN_PROGRESS:
1667+
case AP_RESPONSE_BUSY:
16661668
/*
16671669
* There is a reset issued by another process in progress. Let's wait
16681670
* for that to complete. Since we have no idea whether it was a RAPQ or

0 commit comments

Comments
 (0)