Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1302254ybj; Thu, 7 May 2020 20:55:04 -0700 (PDT) X-Google-Smtp-Source: APiQypIc8N5Ttth/tw9RjqSkdN6QWHbMkHGElABST23E+AOrJP2+QUUQjTqkXqUx9N9cdbAOep8I X-Received: by 2002:a17:906:310e:: with SMTP id 14mr234773ejx.177.1588910103975; Thu, 07 May 2020 20:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588910103; cv=none; d=google.com; s=arc-20160816; b=SIKil9PIfHtgJjo7z8d4HuFKf++BRjIWo/hhxhjt8wyblsWUqpZTy8Xq/h9iHxMAhM OkY7cy56c9MqqbJnCF1aTjJa8sgIS9dXFEYvxDwJFMHij/LgYJlR+WbLR3OEmw39Ipue tw9OA0vE85HRxKUCVTX3vfpkHg/TC1vWrUczbg1tDZp3/p2tqCG+zShnZ9tZFNTmkNVD bVw4dDbs9eMJckZ1uXMOeyLHMNDZpV4yeTXk9zNBxTdR/H7urIEMzBtMLz2IYDKChDE7 XOkqJ5XQHejlcq8o8NxSRIpBgXRmFrOjqEF4ELy+4UT1pf3NUwyVnfcVThUANg2qS6wp gcsA== 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=AofEIL6YwXkUVr1SNl6pGav5cBT+5klZGSSb4tIGh2s=; b=K3miAZZCWENkRov6kh1wu0ameyQPHbiknco/304pXNv6FxH8wIBhKBEdv1+r5Qj/1O /ZDX1m/ZXHcOHvqZRznILNxiyj6O/Hf+9IvxzZ19Vl8sETLATqPwnRcSHd1TsGqyEAds +gcQ/BW81NN56s8p6HmdjtF/cNMCE9D5mUEgccyChYCJTGMqhyJa+1tpc5niEoUYcFFz IUHcKq6i1QHnbjlX4nBWXra6xg4R/hW1L1g9iJpNDjxaxZgc1VYYankqknkn2XF2mMlQ GL0Bra4AgQL2YK6zWTYfoQZIpExeeSp9ddqEFggicgYZJ8qt2PzU081Z8nXEcgz99U66 UmRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ws3HSrFp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id l20si235242ejr.179.2020.05.07.20.54.41; Thu, 07 May 2020 20:55:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ws3HSrFp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726797AbgEHDw5 (ORCPT + 99 others); Thu, 7 May 2020 23:52:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726618AbgEHDw4 (ORCPT ); Thu, 7 May 2020 23:52:56 -0400 Received: from mail-vs1-xe44.google.com (mail-vs1-xe44.google.com [IPv6:2607:f8b0:4864:20::e44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92EF8C05BD09 for ; Thu, 7 May 2020 20:52:56 -0700 (PDT) Received: by mail-vs1-xe44.google.com with SMTP id g2so285979vsb.4 for ; Thu, 07 May 2020 20:52:56 -0700 (PDT) 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=AofEIL6YwXkUVr1SNl6pGav5cBT+5klZGSSb4tIGh2s=; b=Ws3HSrFplgBdKEF0d6Ef/CDW5EwS0mXz/l1DIcB7Yh88VTMzo5MJ1/iiMYqJgvjIps jZg+hxl63XPpkntjE6T09riZ2WW1K61v5WIqxg3xsIhYwQxmE9xabjYObXdDyEBG0BhN 8VAe1as355JZIKEi5T6z7jcGg7UCgngipOJMay+JgSZzBvvfdm/Y/HE6PGURFLejYcae Qtj8iGyb6pngMMlDtfEwrZ0/7V8aPDpDm/HfLafQRWixtrEN1tg7Y1xjHAfOIXjAfH69 mCETeiAkyA5W7hcljWLKKIu1/rag+QSkJSJ+/oMXE9NhCaqWtxFh2DTEV+zJZmpiIx2X Jxzw== 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=AofEIL6YwXkUVr1SNl6pGav5cBT+5klZGSSb4tIGh2s=; b=LdWoJNDLHJuIkABPgTkPzvZt/JA5VubsYqd/+Lg4XWsaZ/NE8mnd8E3htKYnx7pV0K 8NPmLZ7hxqn4LhTzuRQ6BUdSGdCwWzLEPE9FIaMOR1jaSzGk5PjwMyDOLQSNnl1oNXcx hpOd4f60M3MyMUy3cVKg0mlmgyTSVKDjpPvGIHLaJLggZaCX7sABD9tuK4YbRoJWnyx9 EpJbPQY10TxSxiOYGezGtstyGF0XeMwwk3MwaShX0e+9+bvhsOE6tCr747Na03FOBIhe +P4O+C6bpM1zuxmUKkhBQvFw5paauZogtCey/Y9Gu/5EQA6WZTity6+8bc+ra9my3etj BbuA== X-Gm-Message-State: AGi0PuZZn1jiJAlPFxhgv/x5mR9IrCXn43BjaPB40wIkQmrZrSCuE9+3 iidsL2ge0LTx3oTVtJ8WY0Bn0q6WGmW0Z18Ee6g60w== X-Received: by 2002:a67:302:: with SMTP id 2mr347325vsd.165.1588909975527; Thu, 07 May 2020 20:52:55 -0700 (PDT) MIME-Version: 1.0 References: <20200503222805.2668941-1-martin.blumenstingl@googlemail.com> In-Reply-To: From: Ulf Hansson Date: Fri, 8 May 2020 05:52:18 +0200 Message-ID: Subject: Re: [PATCH] mmc: meson-mx-sdio: trigger a soft reset after a timeout or CRC error To: Martin Blumenstingl Cc: "open list:ARM/Amlogic Meson..." , "linux-mmc@vger.kernel.org" , Linux ARM , Linux Kernel Mailing List , Tobias Baumann <017623705678@o2online.de> 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 Thu, 7 May 2020 at 23:14, Martin Blumenstingl wrote: > > Hi Ulf, > > On Thu, May 7, 2020 at 11:29 AM Ulf Hansson wrote: > > > > On Mon, 4 May 2020 at 00:28, Martin Blumenstingl > > wrote: > > > > > > The vendor driver (from the 3.10 kernel) triggers a soft reset every > > > time before starting a new command. While this fixes a problem where > > > SDIO cards are not detected at all (because all commands simply > > > timed out) this hurts SD card read performance a bit (in my tests > > > between 10% to 20%). > > > > > > Trigger a soft reset after we got a CRC error or if the previous command > > > timed out (just like the vendor driver from the same 3.10 kernel for the > > > newer SDHC controller IP does). This fixes detection of SDIO cards and > > > doesn't hurt SD card read performance at the same time. > > > > > > With this patch the initialization of an RTL8723BS SDIO card looks like > > > this: > > > req done (CMD52): -110: 00000000 00000000 00000000 00000000 > > > clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0 > > > starting CMD0 arg 00000000 flags 000000c0 > > > req done (CMD0): 0: 00000000 00000000 00000000 00000000 > > > clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0 > > > starting CMD8 arg 000001aa flags 000002f5 > > > req done (CMD8): -110: 00000000 00000000 00000000 00000000 > > > starting CMD5 arg 00000000 flags 000002e1 > > > req done (CMD5): 0: 90ff0000 00000000 00000000 00000000 > > > starting CMD5 arg 00200000 flags 000002e1 > > > req done (CMD5): 0: 90ff0000 00000000 00000000 00000000 > > > starting CMD3 arg 00000000 flags 00000075 > > > req done (CMD3): 0: 00010000 00000000 00000000 00000000 > > > starting CMD7 arg 00010000 flags 00000015 > > > req done (CMD7): 0: 00001e00 00000000 00000000 00000000 > > > starting CMD52 arg 00000000 flags 00000195 > > > req done (CMD52): 0: 00001032 00000000 00000000 00000000 > > > [... more CMD52 omitted ...] > > > clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 2 > > > clock 50000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 2 > > > starting CMD52 arg 00000e00 flags 00000195 > > > req done (CMD52): 0: 00001000 00000000 00000000 00000000 > > > starting CMD52 arg 80000e02 flags 00000195 > > > req done (CMD52): 0: 00001002 00000000 00000000 00000000 > > > clock 50000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 4 timing 2 > > > starting CMD52 arg 00020000 flags 00000195 > > > req done (CMD52): 0: 00001007 00000000 00000000 00000000 > > > [... more CMD52 omitted ...] > > > new high speed SDIO card at address 0001 > > > > > > Fixes: ed80a13bb4c4c9 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs") > > > Signed-off-by: Martin Blumenstingl > > > --- > > > Ulf, I consider this non-critical because as long as the meson-mx-sdhc > > > driver is not merged we only have one MMC driver for these platforms. > > > I don't know anybody to prefer SDIO wifi over SD card access, so this > > > can go into -next (in my option at least). > > > > > > > Alright, applied for next, thanks! > thank you for taking this patch! > > I received a confirmation (off-list) saying that this patch works as it should. > Tobias was not Cc'ed on the original mail so he gave me to permission > (again, off-list - he's Cc'ed now) to add his: > Tested-by: Tobias Baumann <017623705678@o2online.de> I will add it next time I rebase my branch, probably on Monday, thanks! Kind regards Uffe