RDMA/bnxt_re: Fix stats counters
authorNaresh Kumar PBS <nareshkumar.pbs@broadcom.com>
Sun, 11 Jul 2021 13:31:36 +0000 (06:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Aug 2021 10:46:41 +0000 (12:46 +0200)
commite6a06a13ec6f6a9b88d5fdc11e3ea0cc8860890e
tree8ffcb67ba8b9f64e14a6e953fbb3aa8412622ac2
parentc8667cb406fdae6718e7dbd4d0b2c85ad1eb9d9d
RDMA/bnxt_re: Fix stats counters

[ Upstream commit 0c23af52ccd1605926480b5dfd1dd857ef604611 ]

Statistical counters are not incrementing in some adapter versions with
newer FW. This is due to the stats context length mismatch between FW and
driver. Since the L2 driver updates the length correctly, use the stats
length from L2 driver while allocating the DMA'able memory and creating
the stats context.

Fixes: 9d6b648c3112 ("bnxt_en: Update firmware interface spec to 1.10.1.65.")
Link: https://lore.kernel.org/r/1626010296-6076-1-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Naresh Kumar PBS <nareshkumar.pbs@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/bnxt_re/qplib_res.c
drivers/infiniband/hw/bnxt_re/qplib_res.h