Loading
RDMA/hns: Fix wrong output of sysfs scc pram when configuration failed
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAL7SX ---------------------------------------------------------------------- param[] in struct hns_roce_scc_param is used to store and show scc params both. But when the configuration to HW fails, the params stored in this array will become different from the ones in HW. Add an member latest_param[] to struct hns_roce_scc_param to store the latest configured value of scc params. It will be modified only after the configuration has succeeded to ensure the shown result from sysfs is always the correct param in HW even if the previous configuration failed. The original member param[] is only used to store the temporary value of sysfs input now. Fixes: 523f34d8 ("RDMA/hns: Support congestion control algorithm parameter configuration") Signed-off-by:Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by:
Xinghai Cen <cenxinghai@h-partners.com>