From patchwork Thu Oct 3 09:18:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 2981661 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 31A5B9F288 for ; Thu, 3 Oct 2013 09:15:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 96BE420333 for ; Thu, 3 Oct 2013 09:15:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C84420357 for ; Thu, 3 Oct 2013 09:15:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753944Ab3JCJPS (ORCPT ); Thu, 3 Oct 2013 05:15:18 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:42729 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753921Ab3JCJPR (ORCPT ); Thu, 3 Oct 2013 05:15:17 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MU300HEV5NYNRC0@mailout2.samsung.com> for linux-mmc@vger.kernel.org; Thu, 03 Oct 2013 18:14:23 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.126]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 4D.A9.31253.F653D425; Thu, 03 Oct 2013 18:14:23 +0900 (KST) X-AuditID: cbfee690-b7f3b6d000007a15-8f-524d356f5a44 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BC.1F.05832.F653D425; Thu, 03 Oct 2013 18:14:23 +0900 (KST) Received: from alim.sisodomain.com ([107.108.73.28]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MU300DY15NP7F80@mmp1.samsung.com>; Thu, 03 Oct 2013 18:14:23 +0900 (KST) From: alim akhtar To: linux-mmc@vger.kernel.org Cc: tgih.jun@samsung.com, cjb@laptop.org, jh80.chung@samsung.com, dianders@chromium.org, Alim Akhtar Subject: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag Date: Thu, 03 Oct 2013 14:48:01 +0530 Message-id: <1380791881-31484-1-git-send-email-alim.akhtar@samsung.com> X-Mailer: git-send-email 1.7.2.3 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKLMWRmVeSWpSXmKPExsWyRsSkTjff1DfIYNoaJYsH87axWWx/vZHN 4uyyg2wWN361sVoc+d/PaPHh/kVmBzaP2Q0XWTwOXVnL6NG3ZRWjx+dNcgEsUVw2Kak5mWWp Rfp2CVwZO69+YS94zlmx/6JlA2M7RxcjJ4eEgInEtjs3WSBsMYkL99azdTFycQgJLGWU2N65 kQmmaMvNhVCJRYwSR+89ZYJwWpgk5r/+BVbFJqAtsaL9EjuILSIgK/HzzwWwDmaBBkaJQ+ef gBUJCwRLtMyFGMsioCpx5fpJMJtXwF3i+pzpUHcoSLy6sZYdpFlC4D2bxN/Fb9kgGgQkvk0+ BFTEAZSQldh0gBmiXlLi4IobLBMYBRcwMqxiFE0tSC4oTkovMtErTswtLs1L10vOz93ECAzS 0/+eTdjBeO+A9SHGZKBxE5mlRJPzgUGeVxJvaGxmZGFqYmpsZG5pRpqwkjiveot1oJBAemJJ anZqakFqUXxRaU5q8SFGJg5OqQZGT/X0cBdtl4Wep33vlXrXh63YoRW86fXhIyeFJ6vusrlp tfzx5FdtcosebmjKv/T2pJXYnLDv3pUrTE+Xz2D6LThVOnMBn7eaqnFibJRK18eO51P9Lc6o TLCV/27X/WjXxO/5UTN0j15Reb/1mLfqDJUKRsbfhbu2npql8qvY87ntTc+utQcWK7EUZyQa ajEXFScCAABlv6FoAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsVy+t9jAd18U98ggyXbJCwezNvGZrH99UY2 i7PLDrJZ3PjVxmpx5H8/o8WH+xeZHdg8ZjdcZPE4dGUto0ffllWMHp83yQWwRDUw2mSkJqak Fimk5iXnp2TmpdsqeQfHO8ebmhkY6hpaWpgrKeQl5qbaKrn4BOi6ZeYAbVdSKEvMKQUKBSQW Fyvp22GaEBripmsB0xih6xsSBNdjZIAGEtYwZuy8+oW94Dlnxf6Llg2M7RxdjJwcEgImEltu LmSDsMUkLtxbD2RzcQgJLGKUOHrvKROE08IkMf/1LyaQKjYBbYkV7ZfYQWwRAVmJn38ugHUw CzQwShw6/wSsSFggWKJl7kYwm0VAVeLK9ZNgNq+Au8T1OdNZINYpSLy6sZZ9AiP3AkaGVYyi qQXJBcVJ6blGesWJucWleel6yfm5mxjBMfBMegfjqgaLQ4wCHIxKPLwdKj5BQqyJZcWVuYcY JTiYlUR4Dxr6BgnxpiRWVqUW5ccXleakFh9iTAbaPpFZSjQ5HxifeSXxhsYm5qbGppYmFiZm lqQJK4nzHmy1DhQSSE8sSc1OTS1ILYLZwsTBKdXAWN2jzcutfVrVczLDsp1LYlbOPhr8Yu4L XcEuxwWVDms2OqxRf/tphWVax3Rt7ZdJX7VfZF5I2mETeCV04wa+VBbLP8oedzVO5McXhjyb sSaUQafx6HKTB38apM5+25++mL1e0qhPc1ayy/uenDY+b2m+fY0xq4vk5m+fe9Z2if2KJz/Z VdgllViKMxINtZiLihMBqmp1BcUCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Alim Akhtar Hardware locked error set when the dw_mmc controller cannot load a command issued by software. When software sets the start_cmd bit in the CMD register, the controller tries to load the command. If the command buffer is already filled with a command, this error is raised. Currently driver does not handle HLE interrupt, which results in a system hang. HLE can be simulated by quickly inserting and removing sd card in card slot (30 ~ 40 times in say 20 secs) Reviewed-by: Doug Anderson Signed-off-by: Alim Akhtar --- drivers/mmc/host/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 0a6a512..24b4a52 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -44,7 +44,7 @@ SDMMC_INT_HTO | SDMMC_INT_SBE | \ SDMMC_INT_EBE) #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) #define DW_MCI_SEND_STATUS 1