net: hns3: fix the imp capability bit cannot exceed 32 bits issue
mainline inclusion from mainline-v6.5-rc4 commit b27d0232e8897f7c896dc8ad80c9907dd57fd3f3 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: NHao Lan <lanhao@huawei.com> Signed-off-by: NJijie Shao <shaojijie@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
Showing
想要评论请 注册 或 登录