From 67678ec0769fd4df3d9c7aceb5e6da6e7f0ce7a6 Mon Sep 17 00:00:00 2001 From: Lance Richardson Date: Mon, 4 Nov 2019 15:27:46 -0500 Subject: [PATCH] net/bnxt: release HWRM lock before returning The function bnxt_vnic_rss_configure_thor() returns early when all receive queues are stopped without releasing the hwrm spinlock, which causes subsequent HWRM operations to hang. Fix by ensuring that the lock is released before returning from this function. Fixes: 38412304b50a ("net/bnxt: enable RSS for thor-based controllers") Cc: stable@dpdk.org Signed-off-by: Lance Richardson Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index ab6cb1dc3c..bb4dcf4b27 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -4337,8 +4337,10 @@ bnxt_vnic_rss_configure_thor(struct bnxt *bp, struct bnxt_vnic_info *vnic) } /* Return if no rings are active. */ - if (cnt == max_rings) + if (cnt == max_rings) { + HWRM_UNLOCK(); return 0; + } /* Add rx/cp ring pair to RSS table. */ rxr = rxqs[k]->rx_ring; -- 2.20.1