From patchwork Sat Jan 18 13:37:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 3508371 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83FD5C02DC for ; Sat, 18 Jan 2014 13:37:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 800C820127 for ; Sat, 18 Jan 2014 13:37:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78C6F20123 for ; Sat, 18 Jan 2014 13:37:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752155AbaARNhu (ORCPT ); Sat, 18 Jan 2014 08:37:50 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:2302 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752032AbaARNhu convert rfc822-to-8bit (ORCPT ); Sat, 18 Jan 2014 08:37:50 -0500 Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com id ; Sat, 18 Jan 2014 05:37:59 -0800 Received: from hqemhub03.nvidia.com ([172.20.12.94]) by hqnvupgp08.nvidia.com (PGP Universal service); Sat, 18 Jan 2014 05:37:21 -0800 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Sat, 18 Jan 2014 05:37:21 -0800 Received: from deemhub02.nvidia.com (10.21.69.138) by hqemhub03.nvidia.com (172.20.150.15) with Microsoft SMTP Server (TLS) id 8.3.327.1; Sat, 18 Jan 2014 05:37:49 -0800 Received: from DEMAIL01.nvidia.com ([10.21.69.140]) by deemhub02.nvidia.com ([10.21.69.138]) with mapi; Sat, 18 Jan 2014 14:37:47 +0100 From: Philip Rakity To: Chris Ball CC: "linux-mmc@vger.kernel.org" Date: Sat, 18 Jan 2014 14:37:47 +0100 Subject: https://lkml.org/lkml/2013/11/13/574 (Ping !) Thread-Topic: https://lkml.org/lkml/2013/11/13/574 (Ping !) Thread-Index: Ac8UUnj1mf39uhzaQWKw2/3Mbj/48g== Message-ID: <93E165F0-A8B9-4EF2-94B6-B9C913F9CE09@nvidia.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Content-Language: en-US Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Chris, Hi Chris, Could we progress this patch ? Fixes a loop that never terminates if the SD card is bad in just the right way. Philip From Neal Buckendahl <> Subject [PATCH] mmc: host: sdhci: prevent mmcqd from becoming locked on mmc timeout Date Wed, 13 Nov 2013 20:22:54 -0800 fixed a condition where device issues a status cmd to sdcard but no response comes from sdcard. The sdhci irq fires and we hit a timeout case which calls sdhci_finish_data(). sdhci_finish_data eventually attempt to reset controller and issues stop cmd. However mmcdq is wait_for_completion(&mrq->completion) in function mmc_wait_for_req_done which never occurs. Signed-off-by: Neal Buckendahl Signed-off-by: Narayanan Gopalakrishnan Signed-off-by: Philip Rakity --- drivers/mmc/host/sdhci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 6785fb1..21620d2 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -973,6 +973,11 @@ static void sdhci_finish_data(struct sdhci_host *host) if (data->error) { sdhci_reset(host, SDHCI_RESET_CMD); sdhci_reset(host, SDHCI_RESET_DATA); + if (data->error == -ETIMEDOUT) { + host->mrq->cmd->error = -ETIMEDOUT; + tasklet_schedule(&host->finish_tasklet); + WARN_ON(1); + } } sdhci_send_command(host, data->stop);