22e4dda06d
When the device needs a reset, e.g. when an uncorrectable PCIe AER event occurs, various services/data structures need to be cleaned up, the hardware reset and the services/data structures initialized and started. The code to perform the cleanup and initialization was not performed when a device reset was done. This patch moves some of the initialization code out of the .probe entry- point into a separate function that is now called during probe as well as after the hardware has been reset. Similarly, a new function is added for first cleaning up these services/data structures prior to resetting. The new functions are adf_dev_init() and adf_dev_shutdown(), respectively, for which there are already prototypes but no actual functions just yet and are now called when the device is reset and during probe/cleanup of the driver. The down and up flows via ioctl calls has similarly been updated. In addition, there are two other bugs in the reset flow - one in the logic for determining whether to schedule a device reset upon receiving an uncorrectable AER event which prevents the reset flow from being initiated, and another with clearing the status bit indicating a device is configured (when resetting the device the configuration remains across the reset so the bit should not be cleared, otherwise, the necessary services will not be re-started in adf_dev_start() after the reset - clear the bit only when actually deleting the configuration). Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
||
---|---|---|
.. | ||
adf_accel_devices.h | ||
adf_accel_engine.c | ||
adf_aer.c | ||
adf_cfg_common.h | ||
adf_cfg_strings.h | ||
adf_cfg_user.h | ||
adf_cfg.c | ||
adf_cfg.h | ||
adf_common_drv.h | ||
adf_ctl_drv.c | ||
adf_dev_mgr.c | ||
adf_init.c | ||
adf_transport_access_macros.h | ||
adf_transport_debug.c | ||
adf_transport_internal.h | ||
adf_transport.c | ||
adf_transport.h | ||
icp_qat_fw_init_admin.h | ||
icp_qat_fw_la.h | ||
icp_qat_fw_loader_handle.h | ||
icp_qat_fw.h | ||
icp_qat_hal.h | ||
icp_qat_hw.h | ||
icp_qat_uclo.h | ||
Makefile | ||
qat_algs.c | ||
qat_crypto.c | ||
qat_crypto.h | ||
qat_hal.c | ||
qat_uclo.c |