From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752664AbbJPXqh (ORCPT ); Fri, 16 Oct 2015 19:46:37 -0400 Received: from mail.kernel.org ([198.145.29.136]:41931 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752410AbbJPXqf (ORCPT ); Fri, 16 Oct 2015 19:46:35 -0400 Message-ID: <56218C54.3050206@kernel.org> Date: Sat, 17 Oct 2015 08:46:28 +0900 From: Kukjin Kim User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.16 MIME-Version: 1.0 To: Javier Martinez Canillas CC: Alim Akhtar , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Kukjin Kim , Douglas Anderson , Tomeu Vizoso , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach References: <1444927873-15140-1-git-send-email-javier@osg.samsung.com> <5620E17B.9080906@samsung.com> <5621002E.4080906@osg.samsung.com> In-Reply-To: <5621002E.4080906@osg.samsung.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/16/15 22:48, Javier Martinez Canillas wrote: > Hello Alim, > > On 10/16/2015 01:37 PM, Alim Akhtar wrote: >> Hi Javier, >> >> On 10/15/2015 10:21 PM, Javier Martinez Canillas wrote: >>> Hello, >>> >>> The Exynos Chromebooks DTS don't use the correct card detection properties >>> since these were carried from the vendor tree that had a reason to do so. >>> >>> There are two things that I noticed: >>> >>> 1) The Marvell WiFi SDIO is marked as broken-cd instead of non-removable: >>> >>> This causes the device to be removed when the system enters into a suspend >>> state which leads to the following warning when the system is resumed: >>> >>> [ 181.944636] mmc2: error -2 during resume (card was removed?) >>> >>> The rationale for using broken-cd is explained in downstream commit [0] and >>> was that using the non-removable property caused issues with the mwifiex >>> driver since the reset logic called the mmc_{remove,add}_host() functions. >>> >>> But the reset logic in the mwifiex mainline driver has changed and this is >>> no longer the case so it's safe to use the non-removable property AFAICT. >>> >> Good to know it is fixed now. This is fixed in firmware or in the driver? >> > > The fix is only in the driver. In fact, I'm using the same firmware from > the ChromeOS rootfs for both the v3.8 vendor tree and mainline. > > So IIUC, the problem with the vendor tree was that the mwifiex SDIO driver > mwifiex_sdio_reset_work() function did a card reset by calling the functions > mmc_remove_host() and then mmc_add_host(). > > But this didn't play nice with MMC_CAP_NONREMOVABLE since mmc_rescan() just > returns if the flag is set so the card wouldn't be tried to be detected again. > > After commit ("b4336a282db8 mwifiex: sdio: reset adapter using mmc_hw_reset"), > the card is reset by doing a power cycle so that's why "non-removable" can be > used now instead of "broken-cd". > >>> 2) The eMMC node has both broken-cd and non-removable but the MMC DT binding >>> doc (Documentation/devicetree/bindings/mmc/mmc.txt) mentions that only one >>> of these card detection properties should be used. >>> >> This change looks ok, will take a closer look once I am back to my work station. >> Actually, looks good to me +1. Let me take this series once get the feedback from Alim. Thanks, Kukjin