From patchwork Fri Sep 1 13:00:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Bentley X-Patchwork-Id: 9934065 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 00B0060350 for ; Fri, 1 Sep 2017 13:00:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2F4828618 for ; Fri, 1 Sep 2017 13:00:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7A0928646; Fri, 1 Sep 2017 13:00:42 +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 1B3EA28644 for ; Fri, 1 Sep 2017 13:00:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752034AbdIANAk (ORCPT ); Fri, 1 Sep 2017 09:00:40 -0400 Received: from mail-cys01nam02on0134.outbound.protection.outlook.com ([104.47.37.134]:40224 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751778AbdIANAj (ORCPT ); Fri, 1 Sep 2017 09:00:39 -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=Vhla6xCagpUaMAPKEOZfCO/2aUUptT66OZlPgsrsAV8=; b=czC5oXjtXbQxDKb6vgyUlcMAYZUuUzpvqbFkuq8AkOeaipzvRN9VuEO/bI3lp4Y4buiq7qTVvggFr7qsQY3Ss6Qc3h0IxiQKclNTDll2Mog5iqn45GgfLkOV1a4QOQP3RdOHTadUdJFGQ7colLHZaN6AI4h6SEiYWZRiSbC8xmw= Received: from DM2PR0201MB0910.namprd02.prod.outlook.com (10.160.215.26) by DM2PR0201MB0590.namprd02.prod.outlook.com (10.160.94.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 1 Sep 2017 13:00:36 +0000 Received: from DM2PR0201MB0910.namprd02.prod.outlook.com ([fe80::3408:4f2e:a97c:9952]) by DM2PR0201MB0910.namprd02.prod.outlook.com ([fe80::3408:4f2e:a97c:9952%18]) with mapi id 15.20.0013.014; Fri, 1 Sep 2017 13:00:36 +0000 From: Eric Bentley To: Kalle Valo CC: Steve deRosier , "linux-wireless@vger.kernel.org" , "arend.vanspriel@broadcom.com" Subject: Re: [PATCH v2] brcmfmac: Correctly fail to suspend when SDIO does not support power on suspend Thread-Topic: [PATCH v2] brcmfmac: Correctly fail to suspend when SDIO does not support power on suspend Thread-Index: AQHTIyJNShCvusvhEU6QwY9AfLnRUg== Date: Fri, 1 Sep 2017 13:00:36 +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 authentication-results: spf=none (sender IP is ) smtp.mailfrom=Eric.Bentley@lairdtech.com; x-originating-ip: [98.29.31.254] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM2PR0201MB0590; 6:kyQSAsOnvI1Hj7slGyzRKJN+KiSV+UBrfUllK38RJWXyAykTjTWXyr/BrIVtCcLdPSaXwzO0TaD4RaU1MCX+mGiHZAAe0OPuK0zAwJKahXnWeRn8X74VaSdvI5PWP+DMdybiuEqXT4lX/PJmu8a+rDLgQnFW93z47KUKg9694mxEIor9UTBOnSyqjszWa82iV+WWD+28z9Hk2NADfDsJji4RNS6pp02fJOvTdaUbtwtyYAtYz79723sw3/Jc5mC3uiSIw5VL6TRQXuj8s8hXX879odtTTfEEDBYBc8ciDzLxZwUSu5XRUurBenHLwwS/JpYvHGt4dACesJpsQ7mOng==; 5:ibxNwsbtz7hlAyOV4QH33rdIHs/1sFvebIta9h7bxA+E9atSM/ZcJAXi22s4chG+xw2ItDBheH6Jljyb6VpzOkR2iACAyYwj0rzzsNF89qSEdUGieUTzTcdQ2NDpp3qPjQsCt+Y7X6ttfc4TfPAGIQ==; 24:x1/8lQabvn0T31XYJI+TxcSqXUun1biP7KqJTxwTycc3k0TbTXvmdLWR80Q/5KjVgG4GZ/tOimwDizjfIH0K+C84B2en6JDOgx4oEeWPngo=; 7:OpxBrdRT8/uZJsph3PnkE+oN8tNTI5I7tuq65lwCgb6mKiQ7OtwyU/26oaaMavATXDspC7etPqIlUZSP8RU32LVWBX4U1zRf3oJ0ZAhqQ36bHTXVbciSVw7LGAfJStuWvZPffmIi4sfAjbc0GAQ5uEl3pzHsIT+yhA06jl3zRWlVHDB1Poj1TdLBol/UlK3F/7JzR+NN2yQhI/ezHTHUG8rjQVC5f4kNZwNd0iAmO0w= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 7774f172-8341-4a54-97e0-08d4f1397041 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR0201MB0590; x-ms-traffictypediagnostic: DM2PR0201MB0590: 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)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123562025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0201MB0590; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0201MB0590; x-forefront-prvs: 0417A3FFD2 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(5250100002)(3660700001)(7736002)(305945005)(8676002)(4001350100001)(82746002)(110136004)(39060400002)(4326008)(189998001)(8936002)(101416001)(2906002)(6436002)(6486002)(6506006)(86362001)(478600001)(25786009)(6512007)(83506001)(6246003)(99286003)(81166006)(81156014)(54906002)(97736004)(53936002)(3280700002)(66066001)(2900100001)(6116002)(102836003)(5660300001)(83716003)(14454004)(68736007)(3846002)(33656002)(6916009)(15650500001)(229853002)(50986999)(54356999)(106356001)(36756003)(105586002)(72206003); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0201MB0590; H:DM2PR0201MB0910.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: MIME-Version: 1.0 X-OriginatorOrg: lairdtech.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2017 13:00:36.3921 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c4d27a54-2db1-4088-a044-1a83c778ad1b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0201MB0590 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 eric.bentley@lairdtech.com --- v2: corrected errant ( with { --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Arend van Spriel Tested-by: Steve deRosier 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; } -- 2.6.0.GIT