Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756541AbcCBAF6 (ORCPT ); Tue, 1 Mar 2016 19:05:58 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:57058 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932604AbcCAX6d (ORCPT ); Tue, 1 Mar 2016 18:58:33 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=hUvJyzPdlfKs4EikyZP8tLyvCUOAEgLXQaBkam8QHX7ueaJ8vBl4W7nuDjqYDEALL1u09gfZR9uW NrMeCe3hN2rn0+OvROvb/M7QEMiVw5HXOO2+hSIq84j3evAoNXCLCf9sCLafSlgKQDfD03GBepyc kh8wGfpiffkG1ru8YtM=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 339/342] iwlwifi: dvm: fix WoWLAN X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Bogdan Bogush , Emmanuel Grumbach Message-Id: <20160301234538.827850584@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.416968c53dae4c8cb8a0385f6cfb8003 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:55:37 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1526 Lines: 43 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Emmanuel Grumbach commit a1cdb1c59c8c203de2731fc6910598ed19c97e41 upstream. My commit below introduced a mutex in the transport to prevent concurrent operations. To do so, it added a flag (is_down) to make sure the transport is in the right state. This uncoverred an bug that didn't cause any harm until now: iwldvm calls stop_device and then starts the firmware without calling start_hw in between. While this flow is fine from the device configuration point of view (register, etc...), it is now forbidden by the new is_down flag. This led to this error to appear: iwlwifi 0000:05:00.0: Can't start_fw since the HW hasn't been started and the suspend would fail. This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=109591 Reported-by: Bogdan Bogush Fixes=fa9f3281cbb1 ("iwlwifi: pcie: lock start_hw / start_fw / stop_device") Signed-off-by: Emmanuel Grumbach Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/iwlwifi/dvm/lib.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/wireless/iwlwifi/dvm/lib.c +++ b/drivers/net/wireless/iwlwifi/dvm/lib.c @@ -1154,6 +1154,9 @@ int iwlagn_suspend(struct iwl_priv *priv priv->ucode_loaded = false; iwl_trans_stop_device(priv->trans); + ret = iwl_trans_start_hw(priv->trans); + if (ret) + goto out; priv->wowlan = true;