Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp539142imu; Wed, 23 Jan 2019 00:55:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN5E4Up4qLKrHNXYumkFRxElug8MI9e6Mt1bRDCM3RWGLhL5J0nBEHwIXQ9gtcvlxj+fr7JN X-Received: by 2002:a63:1f1c:: with SMTP id f28mr1229633pgf.193.1548233735868; Wed, 23 Jan 2019 00:55:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548233735; cv=none; d=google.com; s=arc-20160816; b=DkI6R8knPUnDauor7ih8DCC2Ng7n4oI6dVyhbMgqyPKXkNQ/iGke9QINLEAJ17z9tl UILtnVzYQZDAgXDaS2uaAdSU3CSP+xkiKWB0GJuyzfjsQth3ftwy46vnf+dz8TSlvqAZ Apu1UWKBFZ7xyzQZqQVgl9daUBPogS++vLQhK1X7mfZDlrXUPZX9sWnQ3skirnnnc668 a1e0XA9k3JpV1j8tJd91obaaC+Lx4bs3TatY2lW4Pz2OgPsZ36LjapNzJ6ufYIyxrVwB DpdMw9DMvl0hrTqMIrtsuXtqBvkC+DXU8LJLOapmMWTwQ4XCvAAJG5LS/rXDQatJTwz9 41Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=myClBJYjky/ABLpOmhPetslgHGs4AKLWXbFb0S/s6TU=; b=vFm7+fR8I0GHFBz/H9fXSxixTknNHBC8RfsSuBchji2lsxQ4ouFCp0qGEi2H425+Tg ATj5w4Kd8+7tNRJ6vgXlWOmUf9RIgkPLpdsunETY+z7KYaVI1HY+ilK83iyHjsy2CKRw teXhAXDhWNeDJ6WAnbo2fNvbBN6PhL7TJVpJ8wOLt8sPskdRvP7x8Fo8dD9P67WYrPHd n+lGY5c725yYR+so/0+95P3usMaD+s/1VJxtYpJwDfV3I+TvZyETQjs89H3HxJVTvjsc MdjQbNMvFPJcvcwFCldujMxmj5thIwO/A3E9KEDCjF0j1czKgBOqUbRMk3nj2a9X6Gro jQeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FgNMD29z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7si18364135pgl.42.2019.01.23.00.55.19; Wed, 23 Jan 2019 00:55:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FgNMD29z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727064AbfAWIxX (ORCPT + 99 others); Wed, 23 Jan 2019 03:53:23 -0500 Received: from mail-vs1-f65.google.com ([209.85.217.65]:43816 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726373AbfAWIxX (ORCPT ); Wed, 23 Jan 2019 03:53:23 -0500 Received: by mail-vs1-f65.google.com with SMTP id x1so816584vsc.10 for ; Wed, 23 Jan 2019 00:53:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=myClBJYjky/ABLpOmhPetslgHGs4AKLWXbFb0S/s6TU=; b=FgNMD29zgVsSQlmigRDZeHU3WZHUc1lA3RTW0xS7RykJzN8JVzKiXGIcHH/IBP9Oc4 89SfL9vV7ZKu9RYfwkpvbStqohfNbKcZTjs0GU3f6U/WJJWp38AXaG7pqlkCSP6tQfuA OXJGxPO3PKhkAXGH7J5pvc3kzfQe/HKiRbzd4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=myClBJYjky/ABLpOmhPetslgHGs4AKLWXbFb0S/s6TU=; b=rvdoyPnNqtTEH0Cu2eEi6yC1XCGJ8wW7UbU3JtthqI7eCR4e/Z+ezDvtQ3ZsTl23bT Cwy5ats21KALNObXqWYRd7ZXDhLcgknD/ZXyDhfGp5rPddWAoTZT3dyjygTkFrcjJ54x ktOpVDm+U3lro9w8HL4xGHfPb2vnmfjmmZWZwsyY1WParMxKZlX/+is6ztmxtqTDhism 1YD7NDj5rUFURZD2J/zZt82nKhfahX2hopc8IU76nV3jz6OKPsoA+CTCZRgmyMT+55jZ Gqv7fD5LzByygAGiT60Evw1JInFgdLD7WjFG2V+fRPxBbexuPqRbNii2CehyejLYc8xc teIQ== X-Gm-Message-State: AJcUukcaQ6QOVxhkecYDAqR/aI2MvjwpoVWbvObii0nzO3O6iLpWaWDA /FECbvJELjEEFDMy5AhazCp+EpnpswoAgFhjr+f40DOB X-Received: by 2002:a67:b245:: with SMTP id s5mr517434vsh.200.1548233601993; Wed, 23 Jan 2019 00:53:21 -0800 (PST) MIME-Version: 1.0 References: <20190116113723.15668-1-ulf.hansson@linaro.org> <20190122162421.7F047609B4@smtp.codeaurora.org> In-Reply-To: <20190122162421.7F047609B4@smtp.codeaurora.org> From: Ulf Hansson Date: Wed, 23 Jan 2019 09:52:46 +0100 Message-ID: Subject: Re: [PATCH V2] wlcore: sdio: Fixup power on/off sequence To: Kalle Valo Cc: Tony Lindgren , Eyal Reizer , linux-wireless@vger.kernel.org, Ricardo Salveti , Kishon Vijay Abraham I , Anders Roxell , John Stultz , Jan Kiszka , Linux Kernel Mailing List , linux-omap Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Jan 2019 at 17:24, Kalle Valo wrote: > > Ulf Hansson wrote: > > > During "wlan-up", we are programming the FW into the WiFi-chip. However, > > re-programming the FW doesn't work, unless a power cycle of the WiFi-chip > > is made in-between the programmings. > > > > To conform to this requirement and to fix the regression in a simple way, > > let's start by allowing that the SDIO card (WiFi-chip) may stay powered on > > (runtime resumed) when wl12xx_sdio_power_off() returns. The intent with the > > current code is to treat this scenario as an error, but unfortunate this > > doesn't work as expected, so let's fix this. > > > > The other part is to guarantee that a power cycle of the SDIO card has been > > completed when wl12xx_sdio_power_on() returns, as to allow the FW > > programming to succeed. However, relying solely on runtime PM to deal with > > this isn't sufficient. For example, userspace may prevent runtime suspend > > via sysfs for the device that represents the SDIO card, leading to that the > > mmc core also keeps it powered on. For this reason, let's instead do a > > brute force power cycle in wl12xx_sdio_power_on(). > > > > Fixes: 728a9dc61f13 ("wlcore: sdio: Fix flakey SDIO runtime PM handling") > > Signed-off-by: Ulf Hansson > > Tested-by: Tony Lindgren > > Tested-by: Anders Roxell > > Signed-off-by: Ulf Hansson > > Patch applied to wireless-drivers.git, thanks. > > 13e62626c578 wlcore: sdio: Fixup power on/off sequence Great, thanks! Let's see how we can fix Jan's problem on top. Kind regards Uffe