From patchwork Wed Jun 13 06:42:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 10461673 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 2C3BA603B4 for ; Wed, 13 Jun 2018 06:42:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33FF928A99 for ; Wed, 13 Jun 2018 06:42:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28B7428AB4; Wed, 13 Jun 2018 06:42:45 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 CFFA328AB1 for ; Wed, 13 Jun 2018 06:42:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754475AbeFMGmn (ORCPT ); Wed, 13 Jun 2018 02:42:43 -0400 Received: from muru.com ([72.249.23.125]:46938 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754398AbeFMGmm (ORCPT ); Wed, 13 Jun 2018 02:42:42 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1186F80B7; Wed, 13 Jun 2018 06:45:16 +0000 (UTC) Date: Tue, 12 Jun 2018 23:42:38 -0700 From: Tony Lindgren To: "Reizer, Eyal" Cc: Kalle Valo , KISHON VIJAY ABRAHAM , "Mishol, Guy" , Luca Coelho , "Hahn, Maital" , "Altshul, Maxim" , Shahar Patury , "linux-wireless@vger.kernel.org" , "linux-omap@vger.kernel.org" Subject: Re: [EXTERNAL] Re: [RFT 3/6] wlcore: Add support for runtime PM Message-ID: <20180613064238.GC112168@atomide.com> References: <20180529180605.73622-1-tony@atomide.com> <20180529180605.73622-4-tony@atomide.com> <20180531171420.GQ5705@atomide.com> <20180605042000.GA5738@atomide.com> <20180605104404.GD5738@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) 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 Hi, * Reizer, Eyal [180606 05:22]: > Latest wl18xx firmware was running fine for two days without the crash, so it was indeed just a logging issue in this case. OK good to hear. > However, trying a wl1281 module and enabling PLT mode it boots ok but after a couple of seconds the below crash is seen. > Seems like a similar crash to the one I have seen before,right? Sorry for the delay, only today had enough time to figure this one out, see below. > sh-4.4# calibrator wlan0 plt power_mode on > [ 57.198492] wlcore: power up > [ 57.757871] wlcore: firmware booted in PLT mode PLT_ON (PLT 7.3.10.2.142) > sh-4.4# > sh-4.4# > sh-4.4# ca[ 86.485020] ------------[ cut here ]------------ > [ 86.490334] WARNING: CPU: 0 PID: 502 at drivers/net/wireless/ti/wlcore/main.c:806 This happens on runtime_suspend() where we are already in PLT and then that error gets stored and then next pm_runtime_get() returns -EINVAL. The patch below should fix it. I'll fold it into the runtime PM related patch assuming it works for you. Regards, Tony 8< ------- diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -6677,7 +6677,7 @@ static int __maybe_unused wlcore_runtime_suspend(struct device *dev) /* We do not enter elp sleep in PLT mode */ if (wl->plt) - return -EINVAL; + return 0; /* Nothing to do if no ELP mode requested */ if (wl->sleep_auth != WL1271_PSM_ELP)