aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichal Kalderon <Michal.Kalderon@cavium.com>2018-01-23 04:33:47 -0500
committerDavid S. Miller <davem@davemloft.net>2018-01-24 16:44:21 -0500
commit1fe280a056dff50774bd59c3e61187cf8c0ccf10 (patch)
tree1fb0c5810fb0cf7b81e1e0ab9e1b3d9d76e63e5a /drivers
parent4de49474b18936d62797d1dd451c6c4db1a7b119 (diff)
qed: Free reserved MR tid
A tid was allocated for reserved MR during initialization but not freed. This lead to an annoying output message during rdma unload flow. Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_rdma.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.c b/drivers/net/ethernet/qlogic/qed/qed_rdma.c
index 9d6e2d43d4de..b7abb8205d3a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_rdma.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.c
@@ -358,10 +358,27 @@ static void qed_rdma_resc_free(struct qed_hwfn *p_hwfn)
358 kfree(p_rdma_info); 358 kfree(p_rdma_info);
359} 359}
360 360
361static void qed_rdma_free_tid(void *rdma_cxt, u32 itid)
362{
363 struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
364
365 DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "itid = %08x\n", itid);
366
367 spin_lock_bh(&p_hwfn->p_rdma_info->lock);
368 qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->tid_map, itid);
369 spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
370}
371
372static void qed_rdma_free_reserved_lkey(struct qed_hwfn *p_hwfn)
373{
374 qed_rdma_free_tid(p_hwfn, p_hwfn->p_rdma_info->dev->reserved_lkey);
375}
376
361static void qed_rdma_free(struct qed_hwfn *p_hwfn) 377static void qed_rdma_free(struct qed_hwfn *p_hwfn)
362{ 378{
363 DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Freeing RDMA\n"); 379 DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Freeing RDMA\n");
364 380
381 qed_rdma_free_reserved_lkey(p_hwfn);
365 qed_rdma_resc_free(p_hwfn); 382 qed_rdma_resc_free(p_hwfn);
366} 383}
367 384
@@ -794,17 +811,6 @@ static struct qed_rdma_device *qed_rdma_query_device(void *rdma_cxt)
794 return p_hwfn->p_rdma_info->dev; 811 return p_hwfn->p_rdma_info->dev;
795} 812}
796 813
797static void qed_rdma_free_tid(void *rdma_cxt, u32 itid)
798{
799 struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
800
801 DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "itid = %08x\n", itid);
802
803 spin_lock_bh(&p_hwfn->p_rdma_info->lock);
804 qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->tid_map, itid);
805 spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
806}
807
808static void qed_rdma_cnq_prod_update(void *rdma_cxt, u8 qz_offset, u16 prod) 814static void qed_rdma_cnq_prod_update(void *rdma_cxt, u8 qz_offset, u16 prod)
809{ 815{
810 struct qed_hwfn *p_hwfn; 816 struct qed_hwfn *p_hwfn;