Commit d5f397c1 authored by Hao Lan's avatar Hao Lan Committed by Jiantao Xiao
Browse files

net: hns3: fix the imp capability bit cannot exceed 32 bits issue

mainline inclusion
from mainline-v6.5-rc4
commit b27d0232
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7ON9Y
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b27d0232e8897f7c896dc8ad80c9907dd57fd3f3



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

Current only the first 32 bits of the capability flag bit are considered.
When the matching capability flag bit is greater than 31 bits,
it will get an error bit.This patch use bitmap to solve this issue.
It can handle each capability bit whitout bit width limit.

Fixes: da77aef9 ("net: hns3: create common cmdq resource allocate/free/query APIs")
Signed-off-by: default avatarHao Lan <lanhao@huawei.com>
Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarJiantao Xiao <xiaojiantao1@h-partners.com>
parent a21b75c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment