net: hns3: fix the imp capability bit cannot exceed 32 bits issue
authorHao Lan <lanhao@huawei.com>
Thu, 20 Jul 2023 02:05:07 +0000 (10:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:23:58 +0000 (10:23 +0200)
commitb93161779b4539b0114d914b4160ac77a428fc4a
tree3c6751c7420b5d71267b3c0ad0ed6e6b05a71096
parente3339d44e0167d11598aec17800ecf7f241c8667
net: hns3: fix the imp capability bit cannot exceed 32 bits issue

[ Upstream commit 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: da77aef9cc58 ("net: hns3: create common cmdq resource allocate/free/query APIs")
Signed-off-by: Hao Lan <lanhao@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c