Return-path: Received: from mail-it0-f67.google.com ([209.85.214.67]:56281 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932350AbeF0Iuk (ORCPT ); Wed, 27 Jun 2018 04:50:40 -0400 Received: by mail-it0-f67.google.com with SMTP id 16-v6so6367384itl.5 for ; Wed, 27 Jun 2018 01:50:40 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <3f91c902-4aef-77cb-6fa1-d90cb1bc4aab@zonque.org> References: <20180626204834.14278-1-daniel@zonque.org> <950add1e-ec3a-a179-ff49-b49b3a748bcb@zonque.org> <3f91c902-4aef-77cb-6fa1-d90cb1bc4aab@zonque.org> From: Ulf Hansson Date: Wed, 27 Jun 2018 10:50:39 +0200 Message-ID: (sfid-20180627_105045_694561_EC825CFC) Subject: Re: [PATCH] libertas: fix return codes in if_sdio_suspend() To: Daniel Mack Cc: Chris Ball , "linux-mmc@vger.kernel.org" , libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org List-ID: On 27 June 2018 at 10:31, Daniel Mack wrote: > On Wednesday, June 27, 2018 09:54 AM, Ulf Hansson wrote: >> >> On 26 June 2018 at 22:50, Daniel Mack wrote: >>> >>> On Tuesday, June 26, 2018 10:48 PM, Daniel Mack wrote: > > >>>> @@ -1321,7 +1334,7 @@ static int if_sdio_suspend(struct device *dev) >>>> if (ret) >>>> return ret; >>>> - ret = lbs_suspend(card->priv); >>>> + ret = lbs_suspend(priv); >>>> if (ret) >>>> return ret; >>>> @@ -1336,6 +1349,9 @@ static int if_sdio_resume(struct device *dev) >>>> dev_info(dev, "%s: resume: we're back\n", sdio_func_id(func)); >>>> + if (card->priv->power_up_on_resume) >>>> + if_sdio_power_on(card); >>>> + >> >> >> To guarantee firmware is loaded, don't you need the below as well? >> >> wait_event(card->pwron_waitq, priv->fw_ready); > > > Hmm, yes. I should probably just be calling into if_sdio_power_restore(). You don't want to mess up the runtime PM counter though. > > I'll test that and resend the patch. Great! Kind regards Uffe