From patchwork Fri Mar 31 20:21:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9657277 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 0BC2160350 for ; Fri, 31 Mar 2017 20:22:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF974284CB for ; Fri, 31 Mar 2017 20:22:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1E4A286FB; Fri, 31 Mar 2017 20:22:18 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 535F5284CB for ; Fri, 31 Mar 2017 20:22:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755093AbdCaUVv (ORCPT ); Fri, 31 Mar 2017 16:21:51 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:32855 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753839AbdCaUVu (ORCPT ); Fri, 31 Mar 2017 16:21:50 -0400 Received: by mail-pg0-f49.google.com with SMTP id x125so80746158pgb.0 for ; Fri, 31 Mar 2017 13:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=so4gOV0cLobocfoPjxgvyvuErpX69STq57z+HgMyuSo=; b=JpZitihWt9sfXxDO0IqoE+JzinCquO+TXlMcM1hjltBO6f8RzIy0qroypkOkFlRatV 95nyxw+/u0lpfEL1Tz8zUzkK5LEF2sAxWQcDdbCYqplxwDcRdQotdw+GQpyp+sZvIGr/ rZQ/eMNKMyfKGVhwIQuc2lohSRQtCFh2jP22E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=so4gOV0cLobocfoPjxgvyvuErpX69STq57z+HgMyuSo=; b=G5Yc5PVFSWus0HZyl168tyTshcpQiQSq/dr38gNSFSn7ZDeHbHj6FHSJ2gojYKt7S6 aoUbuxCMGXsqXrhBUvUGW/OdU72Yb/5y+rw2v3g+cjP9H5DGPD9AJhnHWZoubAFv5M9s xB/HD2D7JKaodVZv+F2PkeTSqNiw5LbCN1yuOWroKIK4/xZyGxm6F7B+n+U9ZeSMVTWh 19z3/gnky3pH8oaBOeRJ5zycSiMxriOKIaVkYANghsc5EWk03pwKlx8q4cc/iZ4twuS4 S9VPuyBkI3N+BB2KJqcKfRMAA4Nh4Gpdivd0n77ABhMc9uWKTFlVuj/tY3OEGfTTWB5A j2Yg== X-Gm-Message-State: AFeK/H2Kldo9V4nQiSdFTj9bVr7p6hs5wyGbpkuTS30+hWY4WvwIjRSWLTbi4JGjUmmTH6fy X-Received: by 10.99.4.195 with SMTP id 186mr4677322pge.77.1490991710139; Fri, 31 Mar 2017 13:21:50 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id q64sm12140587pfi.69.2017.03.31.13.21.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 31 Mar 2017 13:21:49 -0700 (PDT) From: Brian Norris To: Amitkumar Karwar , Nishant Sarmukadam Cc: Kalle Valo , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Torokhov , Jeffy Chen , Brian Norris Subject: [RFC PATCH] Revert "mwifiex: fix system hang problem after resume" Date: Fri, 31 Mar 2017 13:21:36 -0700 Message-Id: <20170331202136.100342-1-briannorris@chromium.org> X-Mailer: git-send-email 2.12.2.564.g063fe858b8-goog 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 This reverts commit 437322ea2a36d112e20aa7282c869bf924b3a836. This above-mentioned "fix" does not actually do anything to prevent a race condition. It simply papers over it so that the issue doesn't appear. If this is a real problem, it should be explained better than the above commit does, and an alternative, non-racy solution should be found. For further reason to revert this: there's ot reason we can't try resetting the card when it's *actually* stuck in host-sleep mode. So instead, this is unnecessarily creating scenarios where we can't recover Wifi. Cc: Amitkumar Karwar Signed-off-by: Brian Norris Reviewed-by: Dmitry Torokhov Acked-by: Amitkumar Karwar --- Amit, please take a look. AIUI, your "fix" is wrong, and quite racy. If you still think it's needed, can you please propose an alternative? Or at least explain more why this is needed? Thanks. drivers/net/wireless/marvell/mwifiex/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c index 756948385b60..0dab77b526de 100644 --- a/drivers/net/wireless/marvell/mwifiex/init.c +++ b/drivers/net/wireless/marvell/mwifiex/init.c @@ -60,7 +60,7 @@ static void wakeup_timer_fn(unsigned long data) adapter->hw_status = MWIFIEX_HW_STATUS_RESET; mwifiex_cancel_all_pending_cmd(adapter); - if (adapter->if_ops.card_reset && !adapter->hs_activated) + if (adapter->if_ops.card_reset) adapter->if_ops.card_reset(adapter); }