From patchwork Thu May 12 00:01:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Jiang X-Patchwork-Id: 12846748 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19B76C433EF for ; Thu, 12 May 2022 00:01:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349515AbiELABP (ORCPT ); Wed, 11 May 2022 20:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbiELABP (ORCPT ); Wed, 11 May 2022 20:01:15 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4674254680 for ; Wed, 11 May 2022 17:01:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652313674; x=1683849674; h=subject:from:to:cc:date:message-id:mime-version: content-transfer-encoding; bh=HCHC7nijNKk9kMDLR+OraHFjGqatMBrbmvrqSA3+pqI=; b=eE8wvVykRvzUfzJuf55EDvs/TURhS2eYkjf/tBhlxDNK6blRjBvsyUkn /Qrfwhq930mqUPvT/GSkMEwrLVHfZPStkIskHfalwLcWmj5Y+8p2iA3bS vjmmCmySBgxMcXSuJj9O/z/8YBhytU6U91oRNqv0wSdJZ2q01AZr3AW1I gXx0vwOpRj7VTSgvGUT2/dWX84hlaQ/E5mTUrqNtQjO4rzGM++3QsV/+M hYKJ+icyq3Xnn5DPmszUXh7Swi9DLY4WhGTrDappsMmlZlGhpSwbabl7C vQQ2XarGwZE02E/IDLOXsCpzU9Iw+xtyRWxyVMahINdpshd17a4GnQD3n w==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="267429922" X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="267429922" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 17:01:13 -0700 X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="542529528" Received: from djiang5-desk3.ch.intel.com ([143.182.136.137]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 17:01:13 -0700 Subject: [PATCH] dmaengine: idxd: free irq before wq type is reset From: Dave Jiang To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org Date: Wed, 11 May 2022 17:01:13 -0700 Message-ID: <165231367316.986407.11001767338124941736.stgit@djiang5-desk3.ch.intel.com> User-Agent: StGit/1.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Call idxd_wq_free_irq() in the drv_disable_wq() function before idxd_wq_reset() is called. Otherwise the wq type is reset and the irq does not get freed. Fixes: 63c14ae6c161 ("dmaengine: idxd: refactor wq driver enable/disable operations") Signed-off-by: Dave Jiang --- drivers/dma/idxd/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index 4617219376f7..d1dba2a3af5d 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -1385,9 +1385,9 @@ void drv_disable_wq(struct idxd_wq *wq) idxd_wq_free_resources(wq); idxd_wq_unmap_portal(wq); idxd_wq_drain(wq); + idxd_wq_free_irq(wq); idxd_wq_reset(wq); percpu_ref_exit(&wq->wq_active); - idxd_wq_free_irq(wq); wq->type = IDXD_WQT_NONE; wq->client_count = 0; }