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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Jul 2023 08:36:22 +0000 (09:36 +0100)
commitb27d0232e8897f7c896dc8ad80c9907dd57fd3f3
tree8415a87bab06611118f602f4969ccba29f956924
parentc7b75bea853daeb64fc831dbf39a6bbabcc402ac
net: hns3: fix the imp capability bit cannot exceed 32 bits issue

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>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c