From patchwork Wed Aug 21 13:51:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seungwon Jeon X-Patchwork-Id: 2847757 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 E33AABF546 for ; Wed, 21 Aug 2013 13:51:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C7157204CD for ; Wed, 21 Aug 2013 13:51:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 776E920490 for ; Wed, 21 Aug 2013 13:51:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751725Ab3HUNvr (ORCPT ); Wed, 21 Aug 2013 09:51:47 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:44276 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556Ab3HUNvq (ORCPT ); Wed, 21 Aug 2013 09:51:46 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MRV00ARKVU8BOD0@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Wed, 21 Aug 2013 22:51:46 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 00.E1.08825.1F5C4125; Wed, 21 Aug 2013 22:51:45 +0900 (KST) X-AuditID: cbfee68e-b7f276d000002279-eb-5214c5f14953 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F6.3B.32250.1F5C4125; Wed, 21 Aug 2013 22:51:45 +0900 (KST) Received: from DOTGIHJUN01 ([12.23.118.161]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MRV00E7PVU9LL80@mmp1.samsung.com>; Wed, 21 Aug 2013 22:51:45 +0900 (KST) From: Seungwon Jeon To: linux-mmc@vger.kernel.org Cc: 'Chris Ball' , 'Jaehoon Chung' , 'Alim Akhtar' , 'Bing Zhao ' , 'Doug Anderson' References: In-reply-to: Subject: [PATCH 14/14] mmc: dw_mmc: fix the transfer termination in IDMAC mode Date: Wed, 21 Aug 2013 22:51:45 +0900 Message-id: <003301ce9e75$9328cd10$b97a6730$%jun@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac03z3aCvVFr8FaITt2vKVQKst76fw3OcIrwS9fJ1BA= Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBIsWRmVeSWpSXmKPExsVy+t8zI92PR0WCDHavMrd4MG8bm8W8rUdZ Lba/3shmcXbZQTaLG7/aWC2O/O9ndGDzmN1wkcXj0JW1jB6TF15k9ujbsorR4/MmuQDWKC6b lNSczLLUIn27BK6Mn6fKC1ZyVWzf9YmtgfEqRxcjJ4eEgInEv32bWSFsMYkL99azgdhCAssY Ja48NYepuTnrK3MXIxdQfBGjxNn9b1ggnD+MEh2z9oJ1sAloSfx984YZxBYRkJX4+ecCG0gR s8BhRolXX6YBJTiAOrglVjcHgdRwCvBIrPvTCVYvLOAncXzKQrA5LAKqEvO6boFdxCtgK3H8 zUNGCFtQ4sfkeywgY5gF1CWmTMkFCTMLyEtsXvMWbLoEUPjRX12IC6wkDi8/wgpRIiKx78U7 RohfHrFLLH1VBbFJQOLb5EMsEK2yEpsOMEOUSEocXHGDZQKjxCwke2ch7J2FZO8sJAsWMLKs Yh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RTBb mDg4pRoYK3lCjk/Q+LZhfqzhtPQ/vimGrWctv85eV3RKf/bEFE/lXTmtFjGPrZV7IjM8VbLr H3/TjYmLeliy3kPv1/xHS7PEj5ydcpSTa47ApUOf+jlmF1S4Bu677qBrsvtGRv3SPe333BKF JGOYeb+aq29e8cwm155fYsUO7beSVmfXT9kl7bGDc2mEEktxRqKhFnNRcSIAKxA/f0oDAAA= 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=-9.7 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 In IDMAC mode EVENT_XFER_COMPLETE is set when RI/TI of last descriptor is done. So if errors are happened in the middle of data transfers, 'dw_mci_stop_dma' during error handing can be called and eventually prevents this flag to be set. This results in permanent wait for EVENT_XFER_COMPLETE in 'dw_mci_tasklet_func'. Therefore, if dma running is stopped forcibly, EVENT_XFER_COMPLETE should be set. Reported-by: Bing Zhao Signed-off-by: Doug Anderson Signed-off-by: Seungwon Jeon Acked-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 8c1926f..5b52ac1 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -345,10 +345,10 @@ static void dw_mci_stop_dma(struct dw_mci *host) if (host->using_dma) { host->dma_ops->stop(host); host->dma_ops->cleanup(host); - } else { - /* Data transfer was stopped by the interrupt handler */ - set_bit(EVENT_XFER_COMPLETE, &host->pending_events); } + + /* Data transfer was stopped by the interrupt handler */ + set_bit(EVENT_XFER_COMPLETE, &host->pending_events); } static int dw_mci_get_dma_dir(struct mmc_data *data)