|
5 | 5 | #include "adf_common_drv.h"
|
6 | 6 | #include "adf_pf2vf_msg.h"
|
7 | 7 |
|
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) |
| 8 | +#define ADF_PFVF_MSG_COLLISION_DETECT_DELAY 10 |
| 9 | +#define ADF_PFVF_MSG_ACK_DELAY 2 |
| 10 | +#define ADF_PFVF_MSG_ACK_MAX_RETRY 100 |
| 11 | +#define ADF_PFVF_MSG_RETRY_DELAY 5 |
| 12 | +#define ADF_PFVF_MSG_MAX_RETRIES 3 |
| 13 | +#define ADF_PFVF_MSG_RESP_TIMEOUT (ADF_PFVF_MSG_ACK_DELAY * \ |
| 14 | + ADF_PFVF_MSG_ACK_MAX_RETRY + \ |
| 15 | + ADF_PFVF_MSG_COLLISION_DETECT_DELAY) |
16 | 16 |
|
17 | 17 | void adf_enable_vf2pf_interrupts(struct adf_accel_dev *accel_dev, u32 vf_mask)
|
18 | 18 | {
|
@@ -103,9 +103,9 @@ static int __adf_iov_putmsg(struct adf_accel_dev *accel_dev, u32 msg, u8 vf_nr)
|
103 | 103 |
|
104 | 104 | /* Wait for confirmation from remote func it received the message */
|
105 | 105 | do {
|
106 |
| - msleep(ADF_IOV_MSG_ACK_DELAY); |
| 106 | + msleep(ADF_PFVF_MSG_ACK_DELAY); |
107 | 107 | val = ADF_CSR_RD(pmisc_bar_addr, pf2vf_offset);
|
108 |
| - } while ((val & int_bit) && (count++ < ADF_IOV_MSG_ACK_MAX_RETRY)); |
| 108 | + } while ((val & int_bit) && (count++ < ADF_PFVF_MSG_ACK_MAX_RETRY)); |
109 | 109 |
|
110 | 110 | if (val != msg) {
|
111 | 111 | dev_dbg(&GET_DEV(accel_dev),
|
@@ -146,8 +146,8 @@ int adf_iov_putmsg(struct adf_accel_dev *accel_dev, u32 msg, u8 vf_nr)
|
146 | 146 | do {
|
147 | 147 | ret = __adf_iov_putmsg(accel_dev, msg, vf_nr);
|
148 | 148 | if (ret)
|
149 |
| - msleep(ADF_IOV_MSG_RETRY_DELAY); |
150 |
| - } while (ret && (count++ < ADF_IOV_MSG_MAX_RETRIES)); |
| 149 | + msleep(ADF_PFVF_MSG_RETRY_DELAY); |
| 150 | + } while (ret && (count++ < ADF_PFVF_MSG_MAX_RETRIES)); |
151 | 151 |
|
152 | 152 | return ret;
|
153 | 153 | }
|
@@ -277,7 +277,7 @@ void adf_pf2vf_notify_restarting(struct adf_accel_dev *accel_dev)
|
277 | 277 |
|
278 | 278 | static int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev)
|
279 | 279 | {
|
280 |
| - unsigned long timeout = msecs_to_jiffies(ADF_IOV_MSG_RESP_TIMEOUT); |
| 280 | + unsigned long timeout = msecs_to_jiffies(ADF_PFVF_MSG_RESP_TIMEOUT); |
281 | 281 | struct adf_hw_device_data *hw_data = accel_dev->hw_device;
|
282 | 282 | u32 msg = 0;
|
283 | 283 | int ret;
|
|
0 commit comments