Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1936044ima; Thu, 25 Oct 2018 07:16:02 -0700 (PDT) X-Google-Smtp-Source: AJdET5fdfpQjwYUOyP7uOKBZhDjJi8ghcIOObvIVmlx4MqSlSw/E4j47fRYObam3RWlpXOJs5G95 X-Received: by 2002:a62:5547:: with SMTP id j68-v6mr1756460pfb.166.1540476962127; Thu, 25 Oct 2018 07:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540476962; cv=none; d=google.com; s=arc-20160816; b=IvPCwAVw1XOURv2SY23Z3n9wYBRdoeNO2+Sf7ab4nMwhQUeRbCEcGUHHAhkXfrxJvq WWnkQVaW2vcXCwa+fFN/KMPdQIJR2rU7TBvfrh2QfXJDIxQeFSVm/G0Wpr0q2oFoKYmY 2vVnQUY8reuhaOBp61XBz43HGzAISquBbW1kXzcQWivbkLZNJ8VRGmw8APMFbhDdFf71 qsuaXwWq9Rlp8nIJGSP2k/8RJXvbljtuzgKjY12Nj78qasaxH6XHFCVXIZVeNYZcvPIY Wq1TbMhUFOq0qS3CU3u+QLuBSo4mbpI5/CIZniVhIvvuQyYAkrylxhF72U24jmiOFKiS Ee7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=C5aaPqn+bPUsLhz32vez1h1L1XjtVpL3AGETD2Gdu2c=; b=KoXquVGnfEhUR+owPH19u5Z4mqLe4Jf1bNuRFMzEl3o6xdEPccVWHiwgH1INjB8JWh AkUS1k2upRQCqLEHbWCjSqVoQVw3DUoEnETU0jp8N/hCg6qwmBqSPRQyOBb8oYj8Bcnq kV3PpzM7Qvcf53caHwR6zvY1O8/B0SjPXgBr0WI4Z1kvmWU+PXWR63Qd/mwgZimkXuPg /th7onSi74YuFJWQiqaM3hmcg2tvUv11hbAEljuyzFkiEGyz8+3DZ7hj/otQ1L0/aEEb oxUmGkZtTMkqmDxg/3Oq8ozAcE4+Ktf5w9HRIxVmKr82h+1FyTE+ylS83BDKDDuzsFJd bKtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aetUCjAp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33-v6si7954331pld.151.2018.10.25.07.15.22; Thu, 25 Oct 2018 07:16:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aetUCjAp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728470AbeJYWox (ORCPT + 99 others); Thu, 25 Oct 2018 18:44:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:53988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728299AbeJYWox (ORCPT ); Thu, 25 Oct 2018 18:44:53 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0392620869; Thu, 25 Oct 2018 14:11:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476717; bh=ijc9cGwWEDGCIbbD7BBNddoPmpS7yhEs4dNYaSz/TQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aetUCjApDAQQYooYvsKRGYjzpMtBlS6yO9Y6Qv8fkkYGj/A2/uHTDPY+ernndyiZf /tFCKFLmQHZY3W5xWFi2EkIOKwpqJaH/qxCc03Icf9tb2JsieYpD8nLHIeU0SuGHXE s+fFHYUAmVnW5QhpSBpdwqHmBKA0iYEFCCHYbnyg= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Ulf Hansson , Sasha Levin Subject: [PATCH AUTOSEL 4.14 45/46] libertas: call into generic suspend code before turning off power Date: Thu, 25 Oct 2018 10:10:52 -0400 Message-Id: <20181025141053.213330-45-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141053.213330-1-sashal@kernel.org> References: <20181025141053.213330-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Mack [ Upstream commit 4f666675cdff0b986195413215eb062b7da6586f ] When powering down a SDIO connected card during suspend, make sure to call into the generic lbs_suspend() function before pulling the plug. This will make sure the card is successfully deregistered from the system to avoid communication to the card starving out. Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards") Signed-off-by: Daniel Mack Reviewed-by: Ulf Hansson Acked-by: Kalle Valo Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/net/wireless/marvell/libertas/if_sdio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c index 43743c26c071..39bf85d0ade0 100644 --- a/drivers/net/wireless/marvell/libertas/if_sdio.c +++ b/drivers/net/wireless/marvell/libertas/if_sdio.c @@ -1317,6 +1317,10 @@ static int if_sdio_suspend(struct device *dev) if (priv->wol_criteria == EHS_REMOVE_WAKEUP) { dev_info(dev, "Suspend without wake params -- powering down card\n"); if (priv->fw_ready) { + ret = lbs_suspend(priv); + if (ret) + return ret; + priv->power_up_on_resume = true; if_sdio_power_off(card); } -- 2.17.1