crypto: qat - leverage read_poll_timeout in PFVF send
authorMarco Chiappero <marco.chiappero@intel.com>
Thu, 16 Dec 2021 09:13:22 +0000 (09:13 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 24 Dec 2021 03:18:25 +0000 (14:18 +1100)
commit1c94d8035905c10f4930708a9944f2ee65d26f47
tree7176e7e0ccfa4d4764b80112ee2187fd9ceb2196
parent952f4e81274131eda4ab0d751d6f2700b0356542
crypto: qat - leverage read_poll_timeout in PFVF send

Replace the polling loop, waiting for the remote end to acknowledge
the reception of the message, with the equivalent and standard
read_poll_timeout() in adf_gen2_pfvf_send().

Also, the use of the read_poll_timeout():
- implies the use of microseconds for the timings, so update the previous
  values from ms to us
- allows to leverage the return value for both success and error,
  removing the need for the reset of the 'ret' variable soon after the
  'start' label.

Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Co-developed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/adf_gen2_pfvf.c