From patchwork Wed Jun 26 02:25:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Gong X-Patchwork-Id: 11016769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C20B14C0 for ; Wed, 26 Jun 2019 02:26:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 697CB28355 for ; Wed, 26 Jun 2019 02:26:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CDF3285E0; Wed, 26 Jun 2019 02:26:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1262328355 for ; Wed, 26 Jun 2019 02:26:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=B/aUp7xsChZEgA4hEvkNmMQDOb+nJRZAv7IimrRDDK4=; b=MQw an4Ok/QWaMDt9XGDPc4AbfviPUF4cJH0MdGozn6lW3+1Nb7E9MWLkWpo6GdFPHx5WtzNu8V58D10e VCkELiHwYco/NZ8ojvvuZXJWM6+sEY14lZueo92S/6mBn+zo/+o26TnY/JdIFBnzIsqXlMg0vw8ZA Ch0fWBu8Re6yWUc5/DSoAT0/Cnj3PcyYLrBsRbsKft07JTs8+uSJwg7zJJPKwwWTl/gyfkym74pC1 uSPU/2c6R3+tmTdq0zqedZkY06VKLhTo7EIe2/foq4L0tSqzzbEBTGO0GISTCgdgh4BHm1uixirqy 6sBFDjSbCGUvtxEuazTSiDJP3qvtNlw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hfxdF-0000dA-O1; Wed, 26 Jun 2019 02:25:57 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hfxdD-0000cq-HG for ath10k@lists.infradead.org; Wed, 26 Jun 2019 02:25:56 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id AA04760867; Wed, 26 Jun 2019 02:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561515954; bh=f0pKdkF8K45BM2sOKIgyVxyJV7l1MVEf4khNSJWXkTQ=; h=From:To:Cc:Subject:Date:From; b=EKjNN5CexsYfVYBimOBjmTv0wfYT15UUYcarSPUItE9KBPvNXHHE/Yc7URncMG+bi U7nSXVdCGRUI1dR5TT6X4RTWgC0dUEAN+0WwH4ywJ9xmDN2m+KX5swoxkd8yM483Ve 0qpghY+kFlIM0UzmaBDAFxUEEuj6UyW89jgrGUsE= Received: from localhost.localdomain (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wgong@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 687B160208; Wed, 26 Jun 2019 02:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561515954; bh=f0pKdkF8K45BM2sOKIgyVxyJV7l1MVEf4khNSJWXkTQ=; h=From:To:Cc:Subject:Date:From; b=EKjNN5CexsYfVYBimOBjmTv0wfYT15UUYcarSPUItE9KBPvNXHHE/Yc7URncMG+bi U7nSXVdCGRUI1dR5TT6X4RTWgC0dUEAN+0WwH4ywJ9xmDN2m+KX5swoxkd8yM483Ve 0qpghY+kFlIM0UzmaBDAFxUEEuj6UyW89jgrGUsE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 687B160208 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=wgong@codeaurora.org From: Wen Gong To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: destroy sdio workqueue while remove sdio module Date: Wed, 26 Jun 2019 10:25:40 +0800 Message-Id: <1561515940-13748-1-git-send-email-wgong@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190625_192555_592207_702257BC X-CRM114-Status: UNSURE ( 7.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The workqueue need to flush and destory while remove sdio module, otherwise it will have thread which is not destory after remove sdio modules. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong --- drivers/net/wireless/ath/ath10k/sdio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index fae56c6..40c3b4b 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -2077,6 +2077,9 @@ static void ath10k_sdio_remove(struct sdio_func *func) cancel_work_sync(&ar_sdio->wr_async_work); ath10k_core_unregister(ar); ath10k_core_destroy(ar); + + flush_workqueue(ar_sdio->workqueue); + destroy_workqueue(ar_sdio->workqueue); } static const struct sdio_device_id ath10k_sdio_devices[] = {