From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751712AbdJTGY4 (ORCPT ); Fri, 20 Oct 2017 02:24:56 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:5602 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbdJTGYx (ORCPT ); Fri, 20 Oct 2017 02:24:53 -0400 X-IronPort-AV: E=Sophos;i="5.43,405,1503385200"; d="scan'208";a="6476214" X-IronPort-AV: E=McAfee;i="5900,7806,8689"; a="14736835" X-MGA-submission: =?us-ascii?q?MDGedHeoODY6K9oaA1NFkVxEmWUWf04F1FCHJ8?= =?us-ascii?q?RUvbMYj2tc0f9JnCxpwOJEgBJC2O26D3gD19btA3PCsoplwZdgsGSRQ3?= =?us-ascii?q?8vIogOKMWv6S27PisQy9tx5ET9oJWqicCI6+cfqP4pW/2BlzyXhUBjiV?= =?us-ascii?q?hJ?= From: Kalle Valo To: Brian Norris CC: Ryan Hsu , Grant Grundler , "linux-wireless@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ath10k@lists.infradead.org" , Arnd Bergmann Subject: Re: ath10k: fix core PCI suspend when WoWLAN is supported but disabled Thread-Topic: ath10k: fix core PCI suspend when WoWLAN is supported but disabled Thread-Index: AQHTSWwXZmslC/lNOEipmzdH0K0+ug== Date: Fri, 20 Oct 2017 06:24:31 +0000 Message-ID: <87infafiao.fsf@kamboji.qca.qualcomm.com> References: <20170919232416.108247-1-briannorris@chromium.org> <2809b2cf512d4c198d3cef3f5e468c3c@euamsexm01e.eu.qualcomm.com> <87vajbgqcz.fsf@kamboji.qca.qualcomm.com> <20171019171224.GA46096@google.com> In-Reply-To: <20171019171224.GA46096@google.com> (Brian Norris's message of "Thu, 19 Oct 2017 10:12:25 -0700") Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.251.52.12] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v9K6P8wr013992 Brian Norris writes: > + Arnd > > On Thu, Oct 19, 2017 at 02:32:45PM +0000, Kalle Valo wrote: >> Kalle Valo writes: >> >> > Brian Norris wrote: >> > >> >> For devices where the FW supports WoWLAN but user-space has not >> >> configured it, we don't do any PCI-specific suspend/resume operations, >> >> because mac80211 doesn't call drv_suspend() when !wowlan. This has >> >> particularly bad effects for some platforms, because we don't stop the >> >> power-save timer, and if this timer goes off after the PCI controller >> >> has suspended the link, Bad Things will happen. >> >> >> >> Commit 32faa3f0ee50 ("ath10k: add the PCI PM core suspend/resume ops") >> >> got some of this right, in that it understood there was a problem on >> >> non-WoWLAN firmware. But it forgot the $subject case. >> >> >> >> Fix this by moving all the PCI driver suspend/resume logic exclusively >> >> into the driver PM hooks. This shouldn't affect WoWLAN support much >> >> (this just gets executed later on). >> >> >> >> I would just as well kill the entirety of ath10k_hif_suspend(), as it's >> >> not even implemented on the USB or SDIO drivers. I expect that we don't >> >> need the callback, except to return "supported" (i.e., 0) or "not >> >> supported" (i.e., -EOPNOTSUPP). >> >> >> >> Fixes: 32faa3f0ee50 ("ath10k: add the PCI PM core suspend/resume ops") >> >> Fixes: 77258d409ce4 ("ath10k: enable pci soc powersaving") >> >> Signed-off-by: Brian Norris >> >> Cc: Ryan Hsu >> >> Cc: Kalle Valo >> >> Cc: Michal Kazior >> >> Signed-off-by: Kalle Valo >> > >> > Patch applied to ath-next branch of ath.git, thanks. >> > >> > 96378bd2c6cd ath10k: fix core PCI suspend when WoWLAN is supported but disabled >> >> Kbuild found a build problem, I suspect it's caused by this patch: > > Actually, it's the interaction of this patch and Arnd's patch: > > 6af1de2e4ec4 ath10k: mark PM functions as __maybe_unused > > I see that's now in these branches: > > ath/ath-current > ath/ath-qca > ath/master > ath/master-pending > wireless-drivers-next/master > wireless-drivers-next/pending > > Whereas mine got applied to: > > ath/ath-next > > So technically, the problem is in your merge here :) > > 096ad2a15fd8 Merge branch 'ath-next' Ah, that's why kbuild bot didn't report about this problem while your patch was in my pending branch. And I was also really puzzled why it claimed that my merge was at fault :) Thanks for the good explanation. Just to clarify: ath-current is for patches going to 4.14 and ath-next to 4.15, that's why they were applied to a different branch. >> drivers/net/wireless/ath/ath10k/pci.c:3416:8: error: implicit >> declaration of function 'ath10k_pci_suspend' >> [-Werror=implicit-function-declaration] >> >> drivers/net/wireless/ath/ath10k/pci.c:3428:8: error: implicit >> declaration of function 'ath10k_pci_resume' >> [-Werror=implicit-function-declaration] >> >> http://lists.infradead.org/pipermail/ath10k/2017-October/010269.html >> >> The .config.gz there doesn't have CONFIG_PM set, maybe that's the >> problem? > > Yes, indirectly that's also the problem. > > The solution would seem to be either to kill the #ifdefs around > ath10k_pci_{suspend,resume}() and friends (and use __maybe_unused > instead, to further extend Arnd's patch), or else revert Arnd's stuff > and go with CONFIG_PM_SLEEP everywhere, which would resolve the original > warning (promoted to error) that Arnd was resolving. > > I can send out one of these if you'd like. I see that you already sent the patch, thanks! -- Kalle Valo