Commit 917b6be3 authored by Weili Qian's avatar Weili Qian Committed by JiangShui
Browse files

crypto: hisilicon/qm - fix the pf2vf timeout when device reset

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7BJW9


CVE: NA

----------------------------------------------------------------------

When funcitons communicate with each other, if the mailbox operation fails,
funciton cannot obtain the message from the communication source.
If the vf does not receive the message from pf to stop function when reset,
it will cause the vf to be unavailable.

For the device reset scenario:
1. Increase the QM_DEVICE_DOWN state. Before IO operation,
check the state to avoid mailbox busy during communication.
2. When vf obtains pf message, if the mailbox fails, it is
considered to be a device reset, and stop function directly.
When pf sends reset message to vf, if the mailbox fails, it
still send interrupt event to vf.
3. Increase the response time of PF waiting for vf.

Fixes: 46fdbecf ("crypto: hisilicon/qm - enable PF and VFs communication")
Signed-off-by: default avatarWeili Qian <qianweili@huawei.com>
Signed-off-by: default avatarJiangShui Yang <yangjiangshui@h-partners.com>
parent 87484bc1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment