crypto: qat - enable detection of accelerators hang
authorWojciech Ziemba <wojciech.ziemba@intel.com>
Fri, 9 Apr 2021 13:56:19 +0000 (14:56 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 16 Apr 2021 11:16:34 +0000 (21:16 +1000)
commit1c4d9d5bbb5a94ff51853be1089dd48546d4f81c
tree1775603a6d988dc1ebb0a1a643b3a2c7bf617648
parent7e958d301c0db051c358001d818c8b8637131190
crypto: qat - enable detection of accelerators hang

Enable the detection of hangs by setting watchdog timers (WDTs) on
generations that supports that feature.

The default timeout value comes from HW specs. WTDs are reset each time
an accelerator wins arbitration and is able to send/read a command to/from
an accelerator.

The value has added significant margin to make sure there are no spurious
timeouts. The scope of watchdog is per QAT device.

If a timeout is detected, the firmware resets the accelerator and
returns a response descriptor with an appropriate error code.

Signed-off-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c
drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c
drivers/crypto/qat/qat_common/adf_accel_devices.h
drivers/crypto/qat/qat_common/adf_gen2_hw_data.c
drivers/crypto/qat/qat_common/adf_gen2_hw_data.h
drivers/crypto/qat/qat_common/adf_gen4_hw_data.c
drivers/crypto/qat/qat_common/adf_gen4_hw_data.h
drivers/crypto/qat/qat_common/adf_init.c