From patchwork Thu Aug 31 23:44:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Bentley X-Patchwork-Id: 9933105 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 A4D0060362 for ; Thu, 31 Aug 2017 23:44:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95FFE1FF27 for ; Thu, 31 Aug 2017 23:44:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 883C71FF29; Thu, 31 Aug 2017 23:44:24 +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 104921FF27 for ; Thu, 31 Aug 2017 23:44:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751843AbdHaXoW (ORCPT ); Thu, 31 Aug 2017 19:44:22 -0400 Received: from mail-dm3nam03on0097.outbound.protection.outlook.com ([104.47.41.97]:27072 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751803AbdHaXoU (ORCPT ); Thu, 31 Aug 2017 19:44:20 -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=ADBa0I6JdH6+16nNZwR1/g3pztGhQ3H1sI1TcoGPZtU=; b=bPMP26YySi7yI3ZRu7yfDPwHHrXFfpxOG/L8eVzAgpl21/N9kB0m0tSpiV+/wzFceCklOc1Zjop/T4zGQlhmnuQtU1Pk+Igd9C71Se5gd6hdnDHYcT/ioLPIOB5RixM51cgfBOY7yY7SPiV44rh4qcHQFALVvtbBTtikeWaSbEk= Received: from BY1PR0201MB0904.namprd02.prod.outlook.com (10.160.193.28) by BY1PR0201MB1077.namprd02.prod.outlook.com (10.161.205.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Thu, 31 Aug 2017 23:44:17 +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:44:17 +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: AQHTIrLNW8teK7vUiUmQiMcy4FnyTw== Date: Thu, 31 Aug 2017 23:44:17 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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; BY1PR0201MB1077; 6:Ou7+SM8aU+3osw8o9g7wtzl89lK6+//7zjZSo41vcVB1OCCTqVy7iez20F7YNYROzwO+/CAGjogHPP/uGckr+uRXA6TI6EQczo1skI30oj5YdLIIXyDOxQyw/hPIld+2EfnO+jYw5K9iEFDSZJoQ7OAn7HwNo1larPtaFToEHNRfA5b8JzvX0R+Vs8sLZofTaIEqCztlfR5GPkHqapDP9ociWzQDPLvZcV1HIAIyNTy1CpeFD5QcxtPNJb/71AsXfT8CeBSSSgPreq10k2KnSl8PZNDMh5/J0pvS2ZfV/H1gD3W5e05qTdKj/4/cIfV4Wz7jzZiYTHmDXcOeR8forg==; 5:Fy6HBFl6W+jnsTqy+YZmc/47mOKpFiRwqrnxkZeaMnA1GXG0oXFk0SIqzaVdJPJGTtX2PGYZ7cbo44zfTOYbKuSDIlg+1OA5/9GoweiqQeRM5rIdCeF11yyiqJcrE5KLPwEmLIEZXTL6EIwETft2kg==; 24:nab+0Y5NILaX+HkwtI75kxHSTghEcFi17RYk6twJHl0RJembyotJWryJwfbfhqqpofFI6vDoboUsc0KjjsWWba8aipuGSgYORdlFDiJLuik=; 7:NSVJOuvJTVIM7PP7nKpge9qePcVf5sDsRDSB4pf0VmBai4ZNgMIKvfav+2PRAc0p2WFiB6iLxGuizv5CF/dEbnf+kUkohxH71gSTTpZDnkmuj6hFnz+GiIKlHW0To8aMVCSh4liSG7PGqI0mCjAmTG7gMnaFj6uokub2iACz2KKseurbkKcWNqi7JUNJX8GOvdnRJad4wgYPk2vFjwoeERAzUEQniMZuW9JqivuahAA= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 6f103bdd-abd3-440e-4bf5-08d4f0ca31ea 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:BY1PR0201MB1077; x-ms-traffictypediagnostic: BY1PR0201MB1077: 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)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123558100)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY1PR0201MB1077; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY1PR0201MB1077; x-forefront-prvs: 04163EF38A x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(110136004)(53936002)(33656002)(4326008)(189998001)(2900100001)(2351001)(106356001)(101416001)(5660300001)(7696004)(15650500001)(50986999)(6506006)(86362001)(3660700001)(2906002)(3280700002)(5640700003)(9686003)(99286003)(55016002)(6916009)(6436002)(54356999)(6116002)(102836003)(3846002)(97736004)(74316002)(305945005)(5250100002)(2501003)(7736002)(81156014)(81166006)(25786009)(8676002)(72206003)(8936002)(105586002)(68736007)(478600001)(66066001)(14454004); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0201MB1077; H:BY1PR0201MB0904.namprd02.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: lairdtech.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: lairdtech.com X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Aug 2017 23:44:17.5393 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c4d27a54-2db1-4088-a044-1a83c778ad1b X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0201MB1077 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;  }