Skip to content

Commit

Permalink
common/qat: fix VF to PF answer
Browse files Browse the repository at this point in the history
[ upstream commit 66c0ad1 ]

This commit fixes answer sent to physical device in
vf2pf communication.

Fixes: b17d16f ("common/qat: add PF to VF communication")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
  • Loading branch information
arekk67 authored and kevintraynor committed Oct 11, 2022
1 parent 1af7871 commit 656b357
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/common/qat/qat_pf2vf.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev,
* the message
*/
do {
rte_delay_us_sleep(5);
rte_delay_us_sleep(ADF_IOV_MSG_ACK_DELAY_US * 2);
val = ADF_CSR_RD(pmisc_bar_addr, vf_csr_off);
} while ((val & ADF_PFVF_INT) &&
(++count < ADF_IOV_MSG_ACK_MAX_RETRY));
Expand All @@ -70,6 +70,8 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev,
}

uint32_t pf_val = ADF_CSR_RD(pmisc_bar_addr, pf_csr_off);
msg &= ~ADF_PFVF_INT;
ADF_CSR_WR(pmisc_bar_addr, pf_csr_off, msg);

*(ret + i) = (uint8_t)(pf_val >> (pf2vf_msg.block_hdr > 0 ?
10 : 8) & 0xff);
Expand Down

0 comments on commit 656b357

Please sign in to comment.