From patchwork Tue Jan 22 10:48:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seungwon Jeon X-Patchwork-Id: 2017661 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D24623FD1A for ; Tue, 22 Jan 2013 10:48:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751013Ab3AVKsK (ORCPT ); Tue, 22 Jan 2013 05:48:10 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:41999 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899Ab3AVKsJ (ORCPT ); Tue, 22 Jan 2013 05:48:09 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MH00061MWNPB7Z0@mailout1.samsung.com> for linux-mmc@vger.kernel.org; Tue, 22 Jan 2013 19:48:04 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.47]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B7.E0.03880.36E6EF05; Tue, 22 Jan 2013 19:48:03 +0900 (KST) X-AuditID: cbfee61b-b7fb06d000000f28-b8-50fe6e635806 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 57.E0.03880.36E6EF05; Tue, 22 Jan 2013 19:48:03 +0900 (KST) Received: from DOTGIHJUN01 ([12.23.118.161]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MH0004GEWO3O640@mmp2.samsung.com> for linux-mmc@vger.kernel.org; Tue, 22 Jan 2013 19:48:03 +0900 (KST) From: Seungwon Jeon To: linux-mmc@vger.kernel.org Cc: 'Chris Ball' , 'Konstantin Dorfman' References: <1356513966-24945-1-git-send-email-kdorfman@codeaurora.org> In-reply-to: Subject: [PATCH 1/2] mmc: core: fix permanent sleep of mmcqd during card removal Date: Tue, 22 Jan 2013 19:48:03 +0900 Message-id: <001d01cdf88d$f4214270$dc63c750$%jun@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=ks_c_5601-1987 Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac3jSxiyCa+lWZBXSgyswT98FjyT3ABi/BTgBNw7YJA= Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFIsWRmVeSWpSXmKPExsVy+t8zfd3kvH8BBv/Palsc+d/P6MDo8XmT XABjFJdNSmpOZllqkb5dAlfG5yuLmAvWcFTcObaLuYHxD1sXIyeHhICJRMPqd4wQtpjEhXvr weJCAssYJW48s4ap+X15BitEfDqjxPqLCl2MXED2LCaJAwfOgzWzCWhJ/H3zhhnEFhGQlfj5 5wLYIGaBYIlfncfYIZojJdp+fgWr4RTgkVj3pxPMFhYIkHh4bAFYPYuAqsTKb+eA6jk4eAVs JS7/jQMJ8woISvyYfI8FYqSBxPtZfawQtrzE5jVvmUHKJQTUJR791QUxRQSsJFZc5YaoEJHY 9wLkQy6gikXsEq9P72eG2CQg8W3yIRaIVlmJTQeYIb6VlDi44gbLBEaJWUgWz0KyeBaSxbOQ rFjAyLKKUTS1ILmgOCk910ivODG3uDQvXS85P3cTIySmpHcwrmqwOMQowMGoxMP74P7fACHW xLLiytxDjBIczEoivILB/wKEeFMSK6tSi/Lji0pzUosPMSYDHTuRWUo0OR8Y73kl8YbGxiZm JqYm5pam5qakCSuJ8zKeehIgJJCeWJKanZpakFoEs4WJg1OqgZH9h7b1XMUvJ1MvLlzy1+Dp 8lIxPsvIrUqz/7++fS1jbmFZ9Lr5vwu/s6QpZBzbksAQY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ender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This patch is derived from 'mmc: fix async request mechanism ...'. According as async transfer, a request is handled with twice mmc_start_req. When the card is removed, the request is actually not issued in the first mmc_start_req [__mmc_start_data_req]. And then mmc_wait_for_data_req_done will come in the next mmc_start_req. But there is no event for completions. wake_up_interruptible is needed in __mmc_start_data_req for the case of removed card. Signed-off-by: Seungwon Jeon Acked-by: Jaehoon Chung Tested-by: Konstantin Dorfman --- drivers/mmc/core/core.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 8b3a122..997b257 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -350,6 +350,7 @@ static int __mmc_start_data_req(struct mmc_host *host, struct mmc_request *mrq) mrq->host = host; if (mmc_card_removed(host->card)) { mrq->cmd->error = -ENOMEDIUM; + mmc_wait_data_done(mrq); return -ENOMEDIUM; } mmc_start_request(host, mrq);