Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2457225imd; Fri, 2 Nov 2018 11:44:01 -0700 (PDT) X-Google-Smtp-Source: AJdET5c+yzqrRN3i3O9NCyth6STJ26Px58rKBnBgHfmxcXdWCus/AUfPFMnRk4C8kuUqWySCFrNO X-Received: by 2002:a63:608f:: with SMTP id u137mr11917048pgb.203.1541184241778; Fri, 02 Nov 2018 11:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184241; cv=none; d=google.com; s=arc-20160816; b=ebguc3KQrbGBdVwZ49ckn5o5qwKkqZ58T9U3XUZ0rtit/YoqpebTbeJZSHAGxrWAra p5fhu3i6Q/UVcU5MT8iMsCCtsSmLGtW/+q+GtJEgrxu4hToN4do/q53B6ndGOyb6w7+R OdKEEWiX1UiJUbsJ71/4lSkqjiQ8BOPL1F0kgxlXSKP2OP9BjPIuOTghC6a5HfFbPcZZ fHyqkGiOJ5A0J0rsxQCfQsUlk6FDYhjIFq72CXDFe3YbsD4uvRs4q1DL1jzGzmNMyPZh f7jFIxGbxKrN4p3O9qfFBTyO52mu3U6DKIeJAf7ZW4Q8TALYoeB2EMbK3VK+Y3hlNjE9 vA7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1SUjhICvgiJstipJqfLlt+m/hBZa13BL8sqH+LEsJ3I=; b=Qb2hfTLaWXk2PkrmweD2ZeMlVDTZ0OeZfZKQRFpBmtZOZN1fKmqt1+AWVtBpyEKO/o WNErzmJTLMVSDda9nwTuMHaRR3DRhUT0r5VHZLc5UgSy1TmhTeHAzo14csK7VPK9SAFU Pd8xkxQlK/nJ6viMddJeA5eLkJgpLdllLWYNWvCxLsg02VlRtJG+ctM8rC7KSu1Ba0DT 6LiT7hqi9Ap6qwvHhzdnDQol6BOlWW4bLU+aephGAds6roft63d0o3uQHnwR8+2gOaUG rfvXdEmndLD2HoN9Qgz5enKtECC+mOuzLo3HYtiwotayPgv2WwEluPB4QKxnVX6Ea1YU ND4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PC+kU64A; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h71-v6si23882214pgc.122.2018.11.02.11.43.47; Fri, 02 Nov 2018 11:44:01 -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=PC+kU64A; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729598AbeKCDtk (ORCPT + 99 others); Fri, 2 Nov 2018 23:49:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:44402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728699AbeKCDtk (ORCPT ); Fri, 2 Nov 2018 23:49:40 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A12F720848; Fri, 2 Nov 2018 18:41:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184088; bh=83K4bLj193cTvynHQYkzBdlGebxnZteo3f/GjYMQW1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PC+kU64A2neVBKOr2gHuY1p7/YWfUwGJ0ZwtV4Tc5lmHn8C0Hxk/PQooOJMNUjy2n POz4ECTyj75SwNZvSEiW3dE5z2uETjsqkTp3zTRv7/DQe3qbElZ5zgHyTq8XbrOa8H t/9m5vUbdqMiu8Ddjoj+ZhxiZeXxYqX/YpteHgng= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Mack , Ulf Hansson , Kalle Valo , Sasha Levin Subject: [PATCH 4.18 075/150] libertas: call into generic suspend code before turning off power Date: Fri, 2 Nov 2018 19:33:57 +0100 Message-Id: <20181102182908.808342329@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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