Commit d08f90ea authored by Chengchang Tang's avatar Chengchang Tang Committed by Juan Zhou
Browse files

RDMA/hns: Fix missing reset notification by user space driver

driver inclusion
category: bugfix
bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/I83L7U



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

Currently, the driver notifies user mode whether a reset has occurred
through setting a shared variable to non-zero value. However, if the
user fails to obtain this variable in time, the notification will be
lost because this variable will be clear after completes the reset.

This patch adds a new reset variable to ensure that the user mode can
obtain whether the driver has been reset at any time. A non-zero value
will be assigned to this variable, which will permanently become 0 once
a reset occurs. During reset, the driver will assign 0 to this variable.
After reset, this variable will be remapped to a page of all zeros. The
userspace driver can judge whether the driver has been reset by whether
this variable is 0.

Fixes: e8b1fec4 ("RDMA/hns: Kernel notify usr space to stop ring db")
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
parent c6fd990a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment