crypto: qat - fix undetected PFVF timeout in ACK loop
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Wed, 17 Nov 2021 14:30:35 +0000 (14:30 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Nov 2021 05:20:44 +0000 (16:20 +1100)
commit5002200b4fedd7e90e4fbc2e5c42a4b3351df814
tree05f2ab2abe0b51699989b9c1b94d2200116c0347
parentc79391c696da0151c6ec8cb8a31edfa8bbe68f24
crypto: qat - fix undetected PFVF timeout in ACK loop

If the remote function did not ACK the reception of a message, the
function __adf_iov_putmsg() could detect it as a collision.

This was due to the fact that the collision and the timeout checks after
the ACK loop were in the wrong order. The timeout must be checked at the
end of the loop, so fix by swapping the order of the two checks.

Fixes: 9b768e8a3909 ("crypto: qat - detect PFVF collision after ACK")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Co-developed-by: Marco Chiappero <marco.chiappero@intel.com>
Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/adf_pf2vf_msg.c