Skip to content

Commit 21db65e

Browse files
intmcherbertx
authored andcommitted
crypto: qat - move pfvf collision detection values
Keep adf_pf2vf_msg.h as much as possible focused on the protocol definition. Instead, collision parameters are an implementation detail which should stay close to the code consuming them, therefore move them to adf_pf2vf_msg.c. Signed-off-by: Marco Chiappero <[email protected]> Reviewed-by: Giovanni Cabiddu <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 6e680f9 commit 21db65e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

drivers/crypto/qat/qat_common/adf_pf2vf_msg.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
#include "adf_common_drv.h"
66
#include "adf_pf2vf_msg.h"
77

8+
#define ADF_IOV_MSG_COLLISION_DETECT_DELAY 10
9+
#define ADF_IOV_MSG_ACK_DELAY 2
10+
#define ADF_IOV_MSG_ACK_MAX_RETRY 100
11+
#define ADF_IOV_MSG_RETRY_DELAY 5
12+
#define ADF_IOV_MSG_MAX_RETRIES 3
13+
#define ADF_IOV_MSG_RESP_TIMEOUT (ADF_IOV_MSG_ACK_DELAY * \
14+
ADF_IOV_MSG_ACK_MAX_RETRY + \
15+
ADF_IOV_MSG_COLLISION_DETECT_DELAY)
16+
817
void adf_enable_vf2pf_interrupts(struct adf_accel_dev *accel_dev, u32 vf_mask)
918
{
1019
struct adf_hw_device_data *hw_data = accel_dev->hw_device;

drivers/crypto/qat/qat_common/adf_pf2vf_msg.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,4 @@
9090
/* VF->PF Compatible Version Request */
9191
#define ADF_VF2PF_COMPAT_VER_REQ_SHIFT 22
9292

93-
/* Collision detection */
94-
#define ADF_IOV_MSG_COLLISION_DETECT_DELAY 10
95-
#define ADF_IOV_MSG_ACK_DELAY 2
96-
#define ADF_IOV_MSG_ACK_MAX_RETRY 100
97-
#define ADF_IOV_MSG_RETRY_DELAY 5
98-
#define ADF_IOV_MSG_MAX_RETRIES 3
99-
#define ADF_IOV_MSG_RESP_TIMEOUT (ADF_IOV_MSG_ACK_DELAY * \
100-
ADF_IOV_MSG_ACK_MAX_RETRY + \
101-
ADF_IOV_MSG_COLLISION_DETECT_DELAY)
10293
#endif /* ADF_IOV_MSG_H */

0 commit comments

Comments
 (0)