From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62316A0352 for ; Mon, 4 Nov 2019 21:28:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 50BED378E; Mon, 4 Nov 2019 21:28:09 +0100 (CET) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id D68EB378E for ; Mon, 4 Nov 2019 21:28:07 +0100 (CET) Received: by mail-wr1-f65.google.com with SMTP id s1so18696591wro.0 for ; Mon, 04 Nov 2019 12:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QrOjiKlft5/b0Nun8d706XLFnB8RyvwMHM5+Ft8/+JA=; b=OHqCmyIXKSQizhHE5HrPDD3rdKEg3vtwbJTXC0+FPXNxKMQNUioSODZhGkfF7wZKHa Gnl9HN0BDv1EAj/YEdKk0JKfutot9plC/S2YJuTES9tQrhHhOLOazbPv08gYVrzQGQ8W dlC5U0ZGojpPQm3lXAOsC1Jh3KtU/8pR88jbE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QrOjiKlft5/b0Nun8d706XLFnB8RyvwMHM5+Ft8/+JA=; b=A/I75J/TpnjEbsdbSJNfpmzq74Vd8ZG6DZnaGJ1BMWxElDUvfMagLJKZgUsUYnZxNb iHzXq/3svEb4N4KXknT6y6MoI6evD0ff9EJncenZDQPOvrY/GSJce1ylpcjewfRKqTFA B+SCShTB382GCsgcTu6epivNGrLn0A22u33zWtyKsSNs75WpVpXtvwOPw683SmxzaL3C iR8SyStok8avqkc1yGKZ6pGuT8tTEeqmEQ1fG/1oO/WHFBMsPQrkXEydFoeffN9VtdCo 9TnET6Yt6ha5L9xotD2thpwJICGOBHftD6u3sRFlitagUfhmi0V/JD6NPJw8JbEA03S/ p7Fg== X-Gm-Message-State: APjAAAXTbNxla1w3cCuHFgFMTQXarn9o2vB58G9zoMpUNa5mSHZ/qDUP V3dIYtumjj9yama+wpIk91kGvg== X-Google-Smtp-Source: APXvYqyT2mNg9rUpcY+kvK7ecwUgRuG9DDqp2TZ2yae6RaPJS9Gaq9GiCULxwVFPyEWmKle8uUrWtg== X-Received: by 2002:a5d:5091:: with SMTP id a17mr23680029wrt.249.1572899287598; Mon, 04 Nov 2019 12:28:07 -0800 (PST) Received: from lrichardson-VirtualBox.dhcp.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id i3sm17995365wrw.69.2019.11.04.12.28.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2019 12:28:07 -0800 (PST) From: Lance Richardson To: dev@dpdk.org Cc: ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, Lance Richardson , stable@dpdk.org Date: Mon, 4 Nov 2019 15:27:46 -0500 Message-Id: <20191104202747.12897-4-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191104202747.12897-1-lance.richardson@broadcom.com> References: <20191104202747.12897-1-lance.richardson@broadcom.com> Subject: [dpdk-stable] [PATCH 3/4] net/bnxt: release hwrm lock before returning X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 Kumar Khaparde Signed-off-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 ab6cb1dc3..bb4dcf4b2 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.17.1