From patchwork Mon Oct 31 08:02:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9405127 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 3168F60721 for ; Mon, 31 Oct 2016 08:02:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22F5E2922E for ; Mon, 31 Oct 2016 08:02:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17E9F29230; Mon, 31 Oct 2016 08:02:59 +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 C84572922F for ; Mon, 31 Oct 2016 08:02:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761995AbcJaIC4 (ORCPT ); Mon, 31 Oct 2016 04:02:56 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33931 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761975AbcJaICs (ORCPT ); Mon, 31 Oct 2016 04:02:48 -0400 Received: by mail-pf0-f193.google.com with SMTP id y68so2243567pfb.1 for ; Mon, 31 Oct 2016 01:02:47 -0700 (PDT) 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=207czhQpJxo4AQdwaWq3Q2ecRBFi96UP6jDE86ulgdw=; b=P8+79JyAfkX4NoblqdUEJ4sXLCvkin3TC8AY+l0eA9bJ9NlOV3IFoKV3or7vNkSLQW 3SL3iIHT/aazKyrS4JC5KaUTijWC7fZKKTiHbyUMz2oU8XVCehBV3buE5WChiCDkNsdS aJt0svbBA2cXbh4j6p+E/RjWS1Tc7oxisxs6R1wLjaoGO3Z2ezqVTT/NO5iiloRRNRXh 6+V88krJCvm32xIMvCBrU6kf3QCh7G6W5S9G5j1edkdHsh5TaYVYr0HUeZosTAYMbNIe XeMpMoQAhWctG1sCwNBGucpzfGeetqvJmsb8ay7RVnanxxBBPO38xJ4JhYSzWJ2+SVVA F7jQ== 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=207czhQpJxo4AQdwaWq3Q2ecRBFi96UP6jDE86ulgdw=; b=Yi3LT/fevHnEdXqyv2HU7vY9rjwLsGLL72OgbPuezOod1P23KQoNZUCwyTJrvpMdjA YG3Za0sDzhSBSmm0XtjTM/hjncnDCURRBOgoguB/BtD82WYSk5UOvY3C5SYetRxFz3mz 2yL86Ox3lv2AXpfwRHucqs2/wZTnL4r+noobC+MlQIyJZJMBCil1PF0no/XR0fETBOSK yQILFW197nJdykY8gu48cwWSdsoCo1BGwTpr4BENPlGuv65Q8f6miehCyXTvz+fNOY7u j5yByQ6pRsIRh/MJycfq3C9pT3yxiZ1pDBruBPP2T9ApFLJd6Aw77KhJ0z7VOYT3JYq5 N7sg== X-Gm-Message-State: ABUngvdo3RVCt5022pC6LKcDM6zzWsJcCp3/feOw+5Sru55kzBcbAtl+0lVO0ANif6Xy1g== X-Received: by 10.98.65.156 with SMTP id g28mr13618196pfd.110.1477900967343; Mon, 31 Oct 2016 01:02:47 -0700 (PDT) Received: from localhost.localdomain ([216.207.47.6]) by smtp.gmail.com with ESMTPSA id k7sm34121196pan.8.2016.10.31.01.02.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Oct 2016 01:02:46 -0700 (PDT) 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 06/12] mwifiex: don't pretend to resume while remove()'ing Date: Mon, 31 Oct 2016 16:02:14 +0800 Message-Id: <1477900940-10549-6-git-send-email-huxinming820@marvell.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477900940-10549-1-git-send-email-huxinming820@marvell.com> References: <1477900940-10549-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 --- 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 fb34b99..32fbb91 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -225,11 +225,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 1f6ebde..a750edb 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -292,9 +292,6 @@ mwifiex_sdio_remove(struct sdio_func *func) 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 c20ff2f..a61455c 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,