mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
crypto: qat - fix recovery flow for VFs
When the PFVF protocol was updated to support version 5, i.e.
ADF_PFVF_COMPAT_FALLBACK, the compatibility version for the VF was
updated without supporting the message RESTARTING_COMPLETE required for
such version.
Add support for the ADF_VF2PF_MSGTYPE_RESTARTING_COMPLETE message in the
VF drivers. This message is sent by the VF driver to the PF to notify
the completion of the shutdown flow.
Fixes: ec26f8e6c7 ("crypto: qat - update PFVF protocol for recovery")
Signed-off-by: Michal Witwicki <michal.witwicki@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
b6c7d36292
commit
6f1b523634
|
|
@ -48,6 +48,20 @@ void adf_vf2pf_notify_shutdown(struct adf_accel_dev *accel_dev)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(adf_vf2pf_notify_shutdown);
|
EXPORT_SYMBOL_GPL(adf_vf2pf_notify_shutdown);
|
||||||
|
|
||||||
|
void adf_vf2pf_notify_restart_complete(struct adf_accel_dev *accel_dev)
|
||||||
|
{
|
||||||
|
struct pfvf_message msg = { .type = ADF_VF2PF_MSGTYPE_RESTARTING_COMPLETE };
|
||||||
|
|
||||||
|
/* Check compatibility version */
|
||||||
|
if (accel_dev->vf.pf_compat_ver < ADF_PFVF_COMPAT_FALLBACK)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (adf_send_vf2pf_msg(accel_dev, msg))
|
||||||
|
dev_err(&GET_DEV(accel_dev),
|
||||||
|
"Failed to send Restarting complete event to PF\n");
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(adf_vf2pf_notify_restart_complete);
|
||||||
|
|
||||||
int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev)
|
int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev)
|
||||||
{
|
{
|
||||||
u8 pf_version;
|
u8 pf_version;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#if defined(CONFIG_PCI_IOV)
|
#if defined(CONFIG_PCI_IOV)
|
||||||
int adf_vf2pf_notify_init(struct adf_accel_dev *accel_dev);
|
int adf_vf2pf_notify_init(struct adf_accel_dev *accel_dev);
|
||||||
void adf_vf2pf_notify_shutdown(struct adf_accel_dev *accel_dev);
|
void adf_vf2pf_notify_shutdown(struct adf_accel_dev *accel_dev);
|
||||||
|
void adf_vf2pf_notify_restart_complete(struct adf_accel_dev *accel_dev);
|
||||||
int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev);
|
int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev);
|
||||||
int adf_vf2pf_get_capabilities(struct adf_accel_dev *accel_dev);
|
int adf_vf2pf_get_capabilities(struct adf_accel_dev *accel_dev);
|
||||||
int adf_vf2pf_get_ring_to_svc(struct adf_accel_dev *accel_dev);
|
int adf_vf2pf_get_ring_to_svc(struct adf_accel_dev *accel_dev);
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
#include "adf_cfg.h"
|
#include "adf_cfg.h"
|
||||||
#include "adf_cfg_strings.h"
|
#include "adf_cfg_strings.h"
|
||||||
#include "adf_cfg_common.h"
|
#include "adf_cfg_common.h"
|
||||||
|
#include "adf_pfvf_vf_msg.h"
|
||||||
#include "adf_transport_access_macros.h"
|
#include "adf_transport_access_macros.h"
|
||||||
#include "adf_transport_internal.h"
|
#include "adf_transport_internal.h"
|
||||||
|
|
||||||
|
|
@ -75,6 +76,7 @@ static void adf_dev_stop_async(struct work_struct *work)
|
||||||
|
|
||||||
/* Re-enable PF2VF interrupts */
|
/* Re-enable PF2VF interrupts */
|
||||||
adf_enable_pf2vf_interrupts(accel_dev);
|
adf_enable_pf2vf_interrupts(accel_dev);
|
||||||
|
adf_vf2pf_notify_restart_complete(accel_dev);
|
||||||
kfree(stop_data);
|
kfree(stop_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user