From patchwork Thu Nov 10 11:57:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9420965 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FE26601C0 for ; Thu, 10 Nov 2016 11:57:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C33F2954D for ; Thu, 10 Nov 2016 11:57:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3FA3A29676; Thu, 10 Nov 2016 11:57:55 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 293F22954D for ; Thu, 10 Nov 2016 11:57:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755658AbcKJL5w (ORCPT ); Thu, 10 Nov 2016 06:57:52 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36007 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755648AbcKJL5v (ORCPT ); Thu, 10 Nov 2016 06:57:51 -0500 Received: by mail-pf0-f195.google.com with SMTP id n85so3971515pfi.3 for ; Thu, 10 Nov 2016 03:57:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XzorZj/KHtGd4H++mFtbuYyuL+t5ml4HcYJYjzR0hv8=; b=AZFfVeF1HavkEaKwh0/Me4AwWbEhtgmJajIvXpGYw5tQg+rMAC8oHSvFZ9Iv2YQz5L +/C+j6JWYKbeiUJVsFoWRcGGxO5Pk/BPaLGBXvO51Fv7aPOK1QyYpk7pZuu+BATnvyB6 HNBA/QgPE9Blfxo5O1p2cgkQF40V85z9mpjM7l5EvqIhzo99SUm4gzF03Uu82uPsmTmc xWvQ5EIpvPc0tvNh8H4UGw8B3U+3uutV/QTBHdP528SJPnm+Npc/uwSaNVzcX6B6yERX kDfz3U6NgOnmpgnZMngrnQn+tGMtthGqy5QR0eVZ7i4i7piAfEBiF9dAW6gS7o8yN2d5 lXfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XzorZj/KHtGd4H++mFtbuYyuL+t5ml4HcYJYjzR0hv8=; b=bI1Tl+NwrLYbUzRlCbmp5CTqDIiBGw4vfQCivyeDZrC6nRlpP+2xM8rSH9qiuiWap9 isIzcfZN0BEDDRCiNjieOB1ROsIhrgFuOQ4LYa0giU26NlQlahBWLLrNchf7kGSUel84 lJsqv/39QI+8ApH8+iIyPWojvQICWeNkEysHMVjF15vaFRxUTbEnHYkJ58bF3898sRYb l+axdmaUKAmhEyrXJ0VptVk1kvZoA9zMLcLP0wfx2i+0yA0tZUIgj8Akk2ujKV2PXwZm M9UQSGcJxMSRmPqxF03zjBuDizQpMj9igDH3+Eq4Q2UqbEUYtObR1FhmUpijNwhkCfkk ZqYw== X-Gm-Message-State: ABUngverBcWnPELHTcPklPsRkgrLaQEg+E5D0zgtF92BQc+l2DAimm7i9jvw9adWIc73vg== X-Received: by 10.99.241.21 with SMTP id f21mr23238418pgi.110.1478779070667; Thu, 10 Nov 2016 03:57:50 -0800 (PST) Received: from localhost.localdomain ([216.207.47.6]) by smtp.gmail.com with ESMTPSA id v10sm6740890pag.44.2016.11.10.03.57.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Nov 2016 03:57:50 -0800 (PST) From: Xinming Hu X-Google-Original-From: Xinming Hu To: Linux Wireless Cc: Kalle Valo , Brian Norris , Dmitry Torokhov , Amitkumar Karwar , Cathy Luo , Brian Norris Subject: [PATCH RESEND v2 05/11] mwifiex: don't pretend to resume while remove()'ing Date: Thu, 10 Nov 2016 19:57:06 +0800 Message-Id: <1478779032-5165-5-git-send-email-huxinming820@marvell.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478779032-5165-1-git-send-email-huxinming820@marvell.com> References: <1478779032-5165-1-git-send-email-huxinming820@marvell.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Brian Norris The device core will not allow suspend() to race with remove(). Signed-off-by: Brian Norris --- v2: Same as v1 --- drivers/net/wireless/marvell/mwifiex/pcie.c | 5 ----- drivers/net/wireless/marvell/mwifiex/sdio.c | 3 --- drivers/net/wireless/marvell/mwifiex/usb.c | 5 ----- 3 files changed, 13 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index 6152f08..a2353f9 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -257,11 +257,6 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev) return; if (user_rmmod && !adapter->mfg_mode) { -#ifdef CONFIG_PM_SLEEP - if (adapter->is_suspended) - mwifiex_pcie_resume(&pdev->dev); -#endif - mwifiex_deauthenticate_all(adapter); priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index 90f45d9..a2257a4 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -246,9 +246,6 @@ static int mwifiex_sdio_resume(struct device *dev) mwifiex_dbg(adapter, INFO, "info: SDIO func num=%d\n", func->num); if (user_rmmod && !adapter->mfg_mode) { - if (adapter->is_suspended) - mwifiex_sdio_resume(adapter->dev); - mwifiex_deauthenticate_all(adapter); priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c index 14f89fe..558a7f1 100644 --- a/drivers/net/wireless/marvell/mwifiex/usb.c +++ b/drivers/net/wireless/marvell/mwifiex/usb.c @@ -614,11 +614,6 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf) return; if (user_rmmod && !adapter->mfg_mode) { -#ifdef CONFIG_PM - if (adapter->is_suspended) - mwifiex_usb_resume(intf); -#endif - mwifiex_deauthenticate_all(adapter); mwifiex_init_shutdown_fw(mwifiex_get_priv(adapter,