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: 5978751 Return-Path: X-Original-To: patchwork-linux-arm@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 3B79C9F2A9 for ; Tue, 10 Mar 2015 15:56:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 506BA201D3 for ; Tue, 10 Mar 2015 15:56:06 +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 79269201CD for ; Tue, 10 Mar 2015 15:56:05 +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 1YVMSq-0007tA-3t; Tue, 10 Mar 2015 15:53:00 +0000 Received: from mail-ie0-x234.google.com ([2607:f8b0:4001:c03::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YVMOh-0003NI-TX for linux-arm-kernel@lists.infradead.org; Tue, 10 Mar 2015 15:48:44 +0000 Received: by iecsl2 with SMTP id sl2so19710986iec.1 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=DkTakFyu2p6C/oCN5SgvClD64c5ueExaSPCC83g8jbMwnx+UKmf50+PrPaLSaJrrxe LkSmSbPX/ge2n8mZaQ641epMwO0bN/SaveslWnOeo1XR58P5VM33EjBwa9Ik8UKEnI88 N6PpNYXujAwNhdTVxZ19bSQkfXCLwDdC1yrHb7L2fWtrAe4EG9dqSOZO20jEWT9VEaoe 3akuhDjE9Ni9TGwz06/aNMWycl2QWO36Gf+JVCbtAlnQ+Zv1qeKenG2h61gfWd6SdMTJ Ew7FFt6OabkXJuOWcxqkwGHQMLlEoGExi2vrhYiqoia4Z5vtNG4IY/Ayuv8mEcOoz5tD d0Aw== X-Gm-Message-State: ALoCoQn7w34Ct9Yi0tyakmCEZ4xvdpoIJkGLnzpHU5tPJHCZ7NCK4aAPMMbslU7OMMoZC0UR5iR7 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_084844_047032_016FED61 X-CRM114-Status: GOOD ( 10.51 ) 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-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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