From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753070AbbDFTcv (ORCPT ); Mon, 6 Apr 2015 15:32:51 -0400 Received: from mail-ig0-f177.google.com ([209.85.213.177]:33870 "EHLO mail-ig0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752709AbbDFTct (ORCPT ); Mon, 6 Apr 2015 15:32:49 -0400 MIME-Version: 1.0 In-Reply-To: <55226411.2060806@samsung.com> References: <1428084787-8710-1-git-send-email-dianders@chromium.org> <55226411.2060806@samsung.com> Date: Mon, 6 Apr 2015 12:32:49 -0700 X-Google-Sender-Auth: as5Efwc8DdvDYSHGeHgSYTbZ6AU Message-ID: Subject: Re: [PATCH 1/3] mmc: dw_mmc: Increase cmd11 timeout to 500ms From: Doug Anderson To: Jaehoon Chung Cc: Seungwon Jeon , Ulf Hansson , Alim Akhtar , Sonny Rao , Andrew Bresticker , Heiko Stuebner , Addy Ke , Alexandru Stan , Javier Martinez Canillas , "open list:ARM/Rockchip SoC..." , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jaehoon, On Mon, Apr 6, 2015 at 3:46 AM, Jaehoon Chung wrote: > Hi, Doug. > > On 04/04/2015 03:13 AM, Doug Anderson wrote: >> The Designware databook claims that cmd11 should be finished in 2ms, >> but my testing showed that not to be the case in some situations. >> I've seen cmd11 timeouts of up to 130ms (!) during reboot tests. >> Let's bump the timeout way up so that we're absolutely sure. CMD11 is >> only sent during card insertion, so this extra timeout shouldn't be >> terrible. > > Is it h/w problem? Could you explain to me about "some situations"? > As you said, this timeout only used during card inserting. So, it's not critical.. > But there is much different between 2ms and 500ms(or 130ms). Very good question, and it makes sense to dig into this... OK, I think I've got it. Dang printk bites me again. I have serial console enabled and my printouts were actually causing these delays. With serial console turned off I reliably get ~280us for the interrupt to fire (tested across SD and WiFi across 137 + 128 + 111 + 127 = 503 reboots) I think it makes sense to land this patch anyway, but with an updated description. I'm happy to repost this or happy if you just want to update the description when applying. --- Although the cmd11 interrupt should come within 2ms, that's a very short time. Let's increase the timeout to be really sure that we don't get an accidnetal timeout. One case in particular this is useful is if you've got a serial console and printk in just the right places. Under that scenario I've seen delays of up to 130ms before the interrupt fired. CMD11 is only sent during card insertion, so this extra timeout shouldn't be terrible. --- -Doug