linux/drivers/infiniband/hw
Weihang Li d4d8138741 RDMA/hns: Fix error with to_hr_hem_entries_count()
For ilog2(x), if x is 0 and not a constant variable, it will return
-1. And there will be an error as below:

 hns3 0000:7d:00.0 hns_0: Local work queue 0x8 catast error, sub_event type is: 2

So modify to_hr_hem_entries_shift() to return 0 if conut is 0.

Fixes: 54d6638765 ("RDMA/hns: Optimize WQE buffer size calculating process")
Link: https://lore.kernel.org/r/1588931159-56875-6-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-05-19 20:54:58 -03:00
..
bnxt_re RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
cxgb4 Linux 5.6-rc4 2020-03-04 13:11:06 -04:00
efa RDMA/efa: Count admin commands errors 2020-05-02 20:32:14 -03:00
hfi1 RDMA 5.7 pull request 2020-04-01 18:18:18 -07:00
hns RDMA/hns: Fix error with to_hr_hem_entries_count() 2020-05-19 20:54:58 -03:00
i40iw i40iw: Report correct firmware version 2020-03-18 13:53:44 -03:00
mlx4 RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
mlx5 RDMA/mlx5: Update mlx5_ib driver name 2020-05-17 20:40:20 -03:00
mthca RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
ocrdma RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
qedr RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
qib IB/qib: Remove unused variable ret 2020-04-14 16:34:17 -03:00
usnic RDMA/providers: Fix return value when QP type isn't supported 2020-03-04 12:13:42 -04:00
vmw_pvrdma RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
Makefile RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00