From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65048C43331 for ; Mon, 11 Nov 2019 22:08:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CDC32173B for ; Mon, 11 Nov 2019 22:08:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbfKKWIR (ORCPT ); Mon, 11 Nov 2019 17:08:17 -0500 Received: from muru.com ([72.249.23.125]:41752 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbfKKWIR (ORCPT ); Mon, 11 Nov 2019 17:08:17 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 68BB58047; Mon, 11 Nov 2019 22:08:52 +0000 (UTC) Date: Mon, 11 Nov 2019 14:08:12 -0800 From: Tony Lindgren To: Ulf Hansson Cc: linux-mmc@vger.kernel.org, Adrian Hunter , Douglas Anderson , Matthias Kaehlcke , Kalle Valo , Wen Gong , Erik Stromdahl , Eyal Reizer , linux-wireless@vger.kernel.org Subject: Re: [PATCH v2 0/3] mmc: Fixup HW reset for SDIO cards Message-ID: <20191111220812.GX43123@atomide.com> References: <20191109103046.26445-1-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191109103046.26445-1-ulf.hansson@linaro.org> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, * Ulf Hansson [191109 10:31]: > Changes in v2: > - Add adaptations to the mwifiex driver. > - Keep existing syncronous reset behaviour if the SDIO card has a single > func driver. > > It has turned out that it's not a good idea to try to power cycle and to > re-initialize the SDIO card, as currently done through mmc_hw_reset(). This > because there may be multiple SDIO funcs attached to the same SDIO card and > some of the others that didn't execute the call to mmc_hw_reset(), may then > simply experience an undefined behaviour. > > The following patches in this series attempts to address this problem, by > reworking the mmc_hw_reset() behaviour for SDIO and by adopting the Marvel > mwifiex driver to these changes. > > Note that, I don't have the HW at hand so the the code has only compile tested. > Test on HW is greatly appreciated! Looks good to me. I tried testing this, but looks like at least on duovero mwifiex_sdio is broken in v5.4-rc7: # dmesg | grep mwifi mwifiex_sdio mmc1:0001:1: poll card status failed, tries = 100 mwifiex_sdio mmc1:0001:1: FW download with helper: poll status timeout @ 0 mwifiex_sdio mmc1:0001:1: prog_fw failed ret=0xffffffff mwifiex_sdio mmc1:0001:1: info: _mwifiex_fw_dpc: unregister device No idea when it broke and what might be the issue this time around. Any ideas? Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH v2 0/3] mmc: Fixup HW reset for SDIO cards Date: Mon, 11 Nov 2019 14:08:12 -0800 Message-ID: <20191111220812.GX43123@atomide.com> References: <20191109103046.26445-1-ulf.hansson@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20191109103046.26445-1-ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ulf Hansson Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Adrian Hunter , Douglas Anderson , Matthias Kaehlcke , Kalle Valo , Wen Gong , Erik Stromdahl , Eyal Reizer , linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-mmc@vger.kernel.org Hi, * Ulf Hansson [191109 10:31]: > Changes in v2: > - Add adaptations to the mwifiex driver. > - Keep existing syncronous reset behaviour if the SDIO card has a single > func driver. > > It has turned out that it's not a good idea to try to power cycle and to > re-initialize the SDIO card, as currently done through mmc_hw_reset(). This > because there may be multiple SDIO funcs attached to the same SDIO card and > some of the others that didn't execute the call to mmc_hw_reset(), may then > simply experience an undefined behaviour. > > The following patches in this series attempts to address this problem, by > reworking the mmc_hw_reset() behaviour for SDIO and by adopting the Marvel > mwifiex driver to these changes. > > Note that, I don't have the HW at hand so the the code has only compile tested. > Test on HW is greatly appreciated! Looks good to me. I tried testing this, but looks like at least on duovero mwifiex_sdio is broken in v5.4-rc7: # dmesg | grep mwifi mwifiex_sdio mmc1:0001:1: poll card status failed, tries = 100 mwifiex_sdio mmc1:0001:1: FW download with helper: poll status timeout @ 0 mwifiex_sdio mmc1:0001:1: prog_fw failed ret=0xffffffff mwifiex_sdio mmc1:0001:1: info: _mwifiex_fw_dpc: unregister device No idea when it broke and what might be the issue this time around. Any ideas? Regards, Tony