Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2900286pxb; Tue, 24 Aug 2021 10:10:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6/bQWx9uhjhFnXCyx9CUMc0NV8xgPg3yanwGX4qbH+QkdnycogGuq0M0GZqWtmr2IS6yc X-Received: by 2002:a5d:8506:: with SMTP id q6mr31724444ion.53.1629825041381; Tue, 24 Aug 2021 10:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629825041; cv=none; d=google.com; s=arc-20160816; b=VhoixOep5V+ujVkjqp77IyrAhAbF0cMPsMd/ahzqYZKJvGCTJ3l7GV+raYkyeAnYN4 Wz9tAkh+FCDEaLhrC/BSIYkC+HDaE9tlT9gLDnkrSYs316oLwCIMq+rlySQ2ReJuHHS4 rsIuVBCTr9vPE4ruIUltMXBYy3LmKLGC5xIt9qcvfRBTZIQP83hQoaosoO+bptnJjpYU v1EORgqsrPIgsSFz/TRFB5NFeYn/Bf6MiNdEIJPxHGyRu9Oxo8n+Oz181vY4dLdLDjr0 Kd5kR4GLWxkmYLsbYxVzWdVMsvARmtwjiBE2YcNvFb2/1vIGDmfRJ8YMtnxYwwgfHagS AhIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0y6H4GZlCr4Gc3zVjMAoHx8sla6q0S5HfsTnyg8WHxY=; b=tDkjMKro+Zbraop7/ghg1BmhnU14bNRdkTUUUHMxkXIbi4+IpPOeM0fNddsY9RhNU/ ViPWtCyiqupz/G/icQxYnnxKoyLADageCnfnk5u8ORYBm1vq1XVPIv3s0LicwsccbTV2 C19jX6G6KF6e4COjQwxKIzFaoWKIhyJX7fmkFHxA9FNnTiPV4KBJ+yaQUJaekZWyv8hr FctkTFr9cttpgME6iOZKKGE7vA1LBmImaE/mEeIrYvxGdWJJeKBGSagwuz7AAqUonOhz MSiRZ8cCjp3a32Q3P/4wogmT6dN6eRCIK7/tRQb3kEK8jVE7xij2N3do8fiD5NZDi8f6 pwWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EAx1nJVS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o1si10618395jat.2.2021.08.24.10.10.28; Tue, 24 Aug 2021 10:10:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EAx1nJVS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239816AbhHXRJb (ORCPT + 99 others); Tue, 24 Aug 2021 13:09:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:46598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238861AbhHXRHG (ORCPT ); Tue, 24 Aug 2021 13:07:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD9F161A07; Tue, 24 Aug 2021 16:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824399; bh=muyIKomV58ypttprz4sDMH/VDekGp6TxEGG0wNCA/eY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EAx1nJVSp4OdWCb7Eom88C2BrpXvZkl7EdkG/VJGsi9V9E93/09DFGZ5Gx7ci6YwT DVH27BSIT5PvfWbMmFqEiD7ExGQSu+0VqN/miHbtoGyygS5mD2K+xyVEyTtavZhJE9 qtZ8TG9w5loVkjh3POskL1h6wTTOOc0VcmHEiUutgXkQCHfk/FUsLR8UClRTfIglcs U6kKO0nLdskePk8UtjQIVO39ZskLqcTXvsckcAYpNmdATeqkEu12sRkfR6dS3HZMWM X2EW1CYoH5bComNW0y4lghcd+eKfM4XUyhqzJvLT5P8od0S1A+KAuicF+aWXemBIOO ufx30MwXwV0tA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jakub Kicinski , Michael Chan , Edwin Peer , Sasha Levin Subject: [PATCH 5.10 50/98] bnxt: disable napi before canceling DIM Date: Tue, 24 Aug 2021 12:58:20 -0400 Message-Id: <20210824165908.709932-51-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824165908.709932-1-sashal@kernel.org> References: <20210824165908.709932-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.61-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.10.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.10.61-rc1 X-KernelTest-Deadline: 2021-08-26T16:58+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski [ Upstream commit 01cca6b9330ac7460de44eeeb3a0607f8aae69ff ] napi schedules DIM, napi has to be disabled first, then DIM canceled. Noticed while reading the code. Fixes: 0bc0b97fca73 ("bnxt_en: cleanup DIM work on device shutdown") Fixes: 6a8788f25625 ("bnxt_en: add support for software dynamic interrupt moderation") Reviewed-by: Michael Chan Reviewed-by: Edwin Peer Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 65e41612b9da..621346656af3 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -8855,10 +8855,9 @@ static void bnxt_disable_napi(struct bnxt *bp) for (i = 0; i < bp->cp_nr_rings; i++) { struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; + napi_disable(&bp->bnapi[i]->napi); if (bp->bnapi[i]->rx_ring) cancel_work_sync(&cpr->dim.work); - - napi_disable(&bp->bnapi[i]->napi); } } -- 2.30.2