From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752791AbcCXPQ6 (ORCPT ); Thu, 24 Mar 2016 11:16:58 -0400 Received: from mail-vk0-f52.google.com ([209.85.213.52]:33725 "EHLO mail-vk0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbcCXPQu (ORCPT ); Thu, 24 Mar 2016 11:16:50 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 24 Mar 2016 08:16:49 -0700 X-Google-Sender-Auth: dYighO_voBsubdfHS-_f3L4ObGs Message-ID: Subject: Re: [PATCH] mmc: dw_mmc: Wait for data transfer after response errors From: Doug Anderson To: Enric Balletbo Serra , Jaehoon Chung Cc: "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Alim Akhtar , Ulf Hansson , Alim Akhtar , Sonny Rao , Andrew Bresticker , Heiko Stuebner , Addy Ke , Alexandru Stan , Chris Zhong , Caesar Wang , Javier Martinez Canillas , Russell King Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Mar 24, 2016 at 4:26 AM, Enric Balletbo Serra wrote: >> Ah, that would make some sense why things work OK on Rockchip. Adding >> DW_MCI_QUIRK_BROKEN_DTO to peach probably doesn't make sense, then. >> Hrm... >> >> Since my original debugging of the issue was over a year ago, I think >> I've almost totally lost context of any debugging I did on the issue, >> so I'm not sure I'm going to be too much help in giving any details >> other than what I put in the original commit message. From the >> original message it appears that I thought we could solve this other >> ways but just that my patch was easier than the alternative of >> handling every error case. Maybe we just need to go back to the >> drawing board and handle the error directly? >> > > I just saw that Russell introduced a patch [1] that will land on 4.6. > I think that patch solves the same issue that we're trying to fix, but > for sdhci controller. Yes, the description sounds very similar for sure. > The problem that we have on peach-pi, with our patch applied, is that > when we get a response CRC error on a command and we move to start > sending data, the transfer doesn't receives a timeout interrupt (I > don't know why). As I told, on rockchip works due the DTO quirk. > exynos is not using this quirk. Also, please correct me if I'm wrong, > looks like the sdhci controller has a timer to signal the command > timed out. I haven't spent any amount of time looking at SDHCI driver. If we have no other better solution, enabling the DTO timer for this specific case on all dw_mmc might be a good idea? > ooi, anyone knows what was the test case that caused the necessity of > the DTO quirk? If I remember correctly, the DTO quirk is necessary to get basic tuning working on almost every UHS card out there on rk3288. Take it out and you'll see lots of problems. If you have it in there and add a printout when the DTO quirk fires, you'll see your printout a decent amount during tuning. Should be easy to test that... Those same cards work fine on exynos devices without the DTO quirk. -Doug