From patchwork Tue Mar 10 15:48:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 5978741 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B0ED59F2A9 for ; Tue, 10 Mar 2015 15:53:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DAC6D201C0 for ; Tue, 10 Mar 2015 15:53:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 189DC201CD for ; Tue, 10 Mar 2015 15:53:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YVMTX-00006J-BA; Tue, 10 Mar 2015 15:53:43 +0000 Received: from mail-ie0-x22b.google.com ([2607:f8b0:4001:c03::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YVMOj-0003O3-Ao for linux-rockchip@lists.infradead.org; Tue, 10 Mar 2015 15:48:45 +0000 Received: by iecsf10 with SMTP id sf10so18642204iec.2 for ; Tue, 10 Mar 2015 08:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=rO+bAN3K9GkQEQLh2rqPuM3rQxMHWUtchVi3b60+x2c=; b=kq+u1wUg6wCP+aUxXrCFFDy5dLMd431T+OMZlHcNUToxiHsdfCQWF6VPHCJVe+niX/ STSFDc60tLaG4WlHYPJNtKXbeQInyfm1q/B6uPjvKgUR1zqKJYRKVs516loH85cxeXTj v/+o5r0sImykaQGWwqDyEaii6Uqq+SyfTWOuU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rO+bAN3K9GkQEQLh2rqPuM3rQxMHWUtchVi3b60+x2c=; b=kL0e03UmBoimjV8uxrUMxUlnH5CidHl6XSj0+u9b0lpr/S/wkws2Txf2xsU1PdrC8y 87LlsRiJ7DLFNx1Z9KtpJEJVRJ2NMv2hSAe2kwxUs/MdjOJYB1rfyZX/zE0TA8F1yfRN CjtwOLx5JBRxLH7v+MZErHDb7eBPUNsdHRiV9tf3a5GNagcHDs7L0hC41zdcW7JQXsWG TkE2mV2ISh4VD67Ht+0qzIWgeBID8s3cfcsqJQI/FE1xybuUBFqN1fmKzR301qriJF9k xXN3hYyFRXVycv66EwU0Y6oh5aStup7xK5jgyFXYqnNkHNDwHDmKA6KmliPclJjU8tKv WG5g== X-Gm-Message-State: ALoCoQlYqDgXiewlxLVBev77j7sdxK53LXD/h3tXjJoGBpfCSyzMJE8ybP02QXlkB+FfL5ZbZMd+ X-Received: by 10.50.79.166 with SMTP id k6mr58580797igx.27.1426002500771; Tue, 10 Mar 2015 08:48:20 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by mx.google.com with ESMTPSA id x10sm669864igl.13.2015.03.10.08.48.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Mar 2015 08:48:20 -0700 (PDT) From: Doug Anderson To: Jaehoon Chung , Seungwon Jeon , Ulf Hansson Subject: [PATCH] mmc: dw_mmc: Consider HLE errors to be data and command errors Date: Tue, 10 Mar 2015 08:48:10 -0700 Message-Id: <1426002490-2014-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150310_084845_435320_6BD7D49E X-CRM114-Status: UNSURE ( 9.05 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Addy Ke , Heiko Stuebner , Andrew Bresticker , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, Doug Anderson , chris@printf.net, linux-rockchip@lists.infradead.org, Alim Akhtar , Sonny Rao , javier.martinez@collabora.co.uk, linux-arm-kernel@lists.infradead.org, Alexandru Stan X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_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 The dw_mmc driver enables HLE errors as part of DW_MCI_ERROR_FLAGS but nothing in the interrupt handler actually handles them and ACKs them. That means that if we ever get an HLE error we'll just keep getting interrupts and we'll wedge things. We really don't expect HLE errors but if we ever get them we shouldn't silently ignore them. Note that I have seen HLE errors while constantly ejecting and inserting cards (ejecting while inserting, etc). Signed-off-by: Doug Anderson --- Note that this works together with the patch I sent up yesterday (the CMD 11 timer). I would have sent the two together except that I had local printouts (and ACKing of HLE) and didn't realize that this was also required for a full solution. drivers/mmc/host/dw_mmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 47dfd0e..294edc9c 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -44,11 +44,11 @@ /* Common flag combinations */ #define DW_MCI_DATA_ERROR_FLAGS (SDMMC_INT_DRTO | SDMMC_INT_DCRC | \ SDMMC_INT_HTO | SDMMC_INT_SBE | \ - SDMMC_INT_EBE) + SDMMC_INT_EBE | SDMMC_INT_HLE) #define DW_MCI_CMD_ERROR_FLAGS (SDMMC_INT_RTO | SDMMC_INT_RCRC | \ - SDMMC_INT_RESP_ERR) + SDMMC_INT_RESP_ERR | SDMMC_INT_HLE) #define DW_MCI_ERROR_FLAGS (DW_MCI_DATA_ERROR_FLAGS | \ - DW_MCI_CMD_ERROR_FLAGS | SDMMC_INT_HLE) + DW_MCI_CMD_ERROR_FLAGS) #define DW_MCI_SEND_STATUS 1 #define DW_MCI_RECV_STATUS 2 #define DW_MCI_DMA_THRESHOLD 16