From patchwork Thu Aug 31 23:37:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Bentley X-Patchwork-Id: 9933059 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 3F2AF60309 for ; Thu, 31 Aug 2017 23:37:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3497326E46 for ; Thu, 31 Aug 2017 23:37:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2955526E51; Thu, 31 Aug 2017 23:37:33 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 5A83E26E46 for ; Thu, 31 Aug 2017 23:37:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751828AbdHaXhb (ORCPT ); Thu, 31 Aug 2017 19:37:31 -0400 Received: from mail-by2nam03on0093.outbound.protection.outlook.com ([104.47.42.93]:25785 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751307AbdHaXh2 (ORCPT ); Thu, 31 Aug 2017 19:37:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onelaird.onmicrosoft.com; s=selector1-lairdtech-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=T76q4jelcb/VIH87od/9aUcbq6HhsJaALR3Ph+IHk9Y=; b=BBiqKPL9OgXdpbm2Q6oQxFoCdV/YiYfnQNXMZFtJx79djWlkRGFFLTTC1VL31avxY30AFtZrPIfBiYaxcql6g4JYTaynfQK3qzoiOdAbS2ehaTxalzhB0ciVOMyoDsAYzdFyMbfKQstd/YzcTqxsEoTGD6XSvfypXt0f5RCy7nU= Received: from BY1PR0201MB0904.namprd02.prod.outlook.com (10.160.193.28) by BY1PR0201MB0967.namprd02.prod.outlook.com (10.160.195.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Thu, 31 Aug 2017 23:37:25 +0000 Received: from BY1PR0201MB0904.namprd02.prod.outlook.com ([fe80::e9db:f508:2ca1:3212]) by BY1PR0201MB0904.namprd02.prod.outlook.com ([fe80::e9db:f508:2ca1:3212%13]) with mapi id 15.01.1385.015; Thu, 31 Aug 2017 23:37:25 +0000 From: Eric Bentley To: "linux-wireless@vger.kernel.org" CC: "arend.vanspriel@broadcom.com" Subject: [PATCH] Correctly fail to suspend when SDIO does not support power on suspend Thread-Topic: [PATCH] Correctly fail to suspend when SDIO does not support power on suspend Thread-Index: AQHTIrIZjzUPhzx11k2cGPeWtFsQzw== Date: Thu, 31 Aug 2017 23:37:25 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/f.25.0.170815 x-originating-ip: [98.29.31.254] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BY1PR0201MB0967; 6:ozcpQRIWOwRueV+Q+IxX/hwS/gSyVK3M30joEiqEz5sxNB5TNuVmY5ey5kv4bL/HX7joaDzUGiE+jrJVyS7g1h2GkuZ+9wNk8QGuBzfB1PUE2GfIwQBG5D7LK2Ap5N2kxZrtcWQRqPYz7OlR7qdkqJJ1P601tMcyOkWB6AQQveqPFNkPhbC/35ykA/uSSxejwO/ctkmhn4jG/7myt0A6ZD0l0P+ZLmhYqZ/jsZFX1cysJF6NQW/M8LHhlQFuxiA8aETMerDvl1tSbPfwHkMAB2Xk4HxaG7pWwAuier8Zcz/Fyl1IeMg+k9Fj+0hzPoBwodX2twgUD/9NjceaH1iSNQ==; 5:QoClstUVCcx8agwzGMokRWZwbYiwnDlAMMv1uGjwyRZtnor5RuSQgbTOzNTASIDvtq9bTS8p3L0sN584g/6DubFqyb0auNheMM/+BdPrWhc8+/L9NgEwTmv9rlzQqr3s3k/oPDX5KADBG3BbUHDrsQ==; 24:FR0aXCO9ZuwqUjlhIGFxJrPn7KLTKQlY+45+iYL2HbKVRjiP0Zq++rXkiFl1CO3jYdWvoKGV3dVjJ4+CYXVu0S3xx/64jIMQ3raetXYOJxk=; 7:8bc3ysi5DmUBy9E/Y31GX8IrFvGeg+FjznCF+k6VXwAjAaG9f6jFfHual7PTh+hNWxkA5x6GIFN7UiTqsFIRS8s0LftOESDJMg+fDRlwpy2LlQRxwzBOLC0HsxZsabmppUjGZTFDE3yWURn+KVMim/Cz7FoyyZpV5m6YoWYZG4PIBg1mStShGVpI6ersm2Bjfn0sX8tPm2PcAEeYp0811gmjOx/1e4IbSN2Pq4bpYws= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: e79d68d4-ae5b-443c-51e5-08d4f0c93c4f x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY1PR0201MB0967; x-ms-traffictypediagnostic: BY1PR0201MB0967: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Eric.Bentley@lairdtech.com; x-exchange-antispam-report-test: UriScan:(211171220733660); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY1PR0201MB0967; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY1PR0201MB0967; x-forefront-prvs: 04163EF38A x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(2900100001)(99286003)(105586002)(7736002)(106356001)(305945005)(36756003)(5640700003)(53936002)(110136004)(5250100002)(6512007)(50986999)(8936002)(54356999)(8676002)(6916009)(81156014)(101416001)(189998001)(6486002)(6436002)(33656002)(6506006)(2351001)(2501003)(81166006)(15650500001)(14454004)(66066001)(25786009)(3280700002)(3660700001)(5660300001)(2906002)(478600001)(83506001)(72206003)(86362001)(82746002)(97736004)(4326008)(83716003)(6116002)(102836003)(68736007)(3846002)(4001350100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0201MB0967; H:BY1PR0201MB0904.namprd02.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: lairdtech.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <91426ACF9782C34DBB75ADB4503D126F@namprd02.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: lairdtech.com X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Aug 2017 23:37:25.5131 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c4d27a54-2db1-4088-a044-1a83c778ad1b X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0201MB0967 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 Return error when failing to set power management capabilities flag. This will cause the suspend to fail but the radio will continue to operate. Allowing this to fail without reporting error will cause the radio to be non-functional on resume as it will have lost power. Signed-off-by: Eric Bentley --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.6.0.GIT diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index 72139b5..2f7d03f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -1264,8 +1264,10 @@ static int brcmf_ops_sdio_suspend(struct device *dev) else sdio_flags |= MMC_PM_WAKE_SDIO_IRQ; } - if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags)) + if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags)) ( brcmf_err("Failed to set pm_flags %x\n", sdio_flags); + return -EINVAL; + } return 0; }