From patchwork Wed Nov 2 02:24:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9408399 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 9DCA760721 for ; Wed, 2 Nov 2016 02:25:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A3FE29D2A for ; Wed, 2 Nov 2016 02:25:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7EC9C29D2C; Wed, 2 Nov 2016 02:25:53 +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 22FEB29D2A for ; Wed, 2 Nov 2016 02:25:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755211AbcKBCZv (ORCPT ); Tue, 1 Nov 2016 22:25:51 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35463 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755059AbcKBCZu (ORCPT ); Tue, 1 Nov 2016 22:25:50 -0400 Received: by mail-pf0-f196.google.com with SMTP id i88so269513pfk.2 for ; Tue, 01 Nov 2016 19:25:50 -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=JszstYs3F8WvRy9CQHO0dZ8Wq26XlNCFW7tHNnEq/rU=; b=rmq3TpmOCe8xsCdMTco+fMUgLrK6VTXUx5MXLrNs+yoruWs3QUJkYpmgicCJm38FXv L8T2WuyLL8AD1sbzTc1R5olTioIltwCYT2F7vr827XVSYjUP74XKOw2daEyavDoJ9jSh cHY06yGbo67Lm9nR/GB6C5skpj/zJhlxWCVhmNLD3mmP0xIQT5wPenIoVCSZO++yadmT 2yq8luVGzqwy6JMAG98TyjYo5TseP9bGyEkTyuNwUrAwHlTT0UNBl/W8vCBejnf4ZgqZ jrZcDl/sGLaKRb1UmH9Xoxs7vTZiEsExwNQDT+UwoCh43ecAH/sAsj6gCZr0p6Vwc5O3 VIdQ== 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=JszstYs3F8WvRy9CQHO0dZ8Wq26XlNCFW7tHNnEq/rU=; b=UGdL98vwczVNs6QSl9BaXrp4rjYi8shLap0kdPYa++mxV2ELG/MI756Se1FhtkfeeG 1pbziHF11T8kMACWfvG9pouBYR8Ho5+p+hXph7zVNa6lOz9S6p2WN+jUxOxa2Pk762dk zcpdKd83bb7GSQmlydrYdMBIcIkqeZW7Wd6mfC+5AXYalQSF9UYA02maUpa34KPGE8UQ 41D+wOj607hYsLL/Ou72yM3gJZP3gj2S+sYdASHZZ9XfSjsYNcoDbNHFqf76ifp4E9G7 ifgWNY4Mg+EZAOPvCmtHZOis2sVSo3xd2AuEYV0X+ER1oajLpds5nyFtyG+N7hzXWPtm 6IpA== X-Gm-Message-State: ABUngvczq9MB5RjPqKI2ZUZajS+9DiS7k5XUXaRzuuTO0DUbmV+TXdWggBPi810RTedrRQ== X-Received: by 10.99.177.69 with SMTP id g5mr1952316pgp.144.1478053550054; Tue, 01 Nov 2016 19:25:50 -0700 (PDT) Received: from localhost.localdomain ([216.207.47.6]) by smtp.gmail.com with ESMTPSA id tx10sm36409076pab.40.2016.11.01.19.25.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Nov 2016 19:25:49 -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 v2 06/12] mwifiex: don't pretend to resume while remove()'ing Date: Wed, 2 Nov 2016 10:24:42 +0800 Message-Id: <1478053488-16042-4-git-send-email-huxinming820@marvell.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478053488-16042-1-git-send-email-huxinming820@marvell.com> References: <1478053488-16042-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(). --- v2: Same as v1 --- 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,