projects/linux·commit fa2e2d31

RDMA/hns: Fix dip entries leak on devices newer than hip09

fa2e2d31 · Junxian Huang <[email protected]> · 2025-08-12 20:26:02 +08:00

DIP algorithm is also supported on devices newer than hip09, so free
dip entries too.

Fixes: f91696f2f053 ("RDMA/hns: Support congestion control type selection according to the FW")
Signed-off-by: Junxian Huang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
Commit
fa2e2d31ee3b7212079323b4b09201ef68af3a97
Parents
111aea04

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/infiniband/hw/hns/hns_roce_hw_v2.cmodified+1−1View file

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

View file
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 244a478..f82bdd4 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -3043,7 +3043,7 @@ static void hns_roce_v2_exit(struct hns_roce_dev *hr_dev)
if (!hr_dev->is_vf)
hns_roce_free_link_table(hr_dev);
- if (hr_dev->pci_dev->revision == PCI_REVISION_ID_HIP09)
+ if (hr_dev->pci_dev->revision >= PCI_REVISION_ID_HIP09)
free_dip_entry(hr_dev);
}