From patchwork Fri Aug 30 15:11:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seungwon Jeon X-Patchwork-Id: 2852107 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 73F9C9F2F4 for ; Fri, 30 Aug 2013 15:11:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 507742018D for ; Fri, 30 Aug 2013 15:11:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC53C20182 for ; Fri, 30 Aug 2013 15:11:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756532Ab3H3PLJ (ORCPT ); Fri, 30 Aug 2013 11:11:09 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:20117 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756023Ab3H3PLH (ORCPT ); Fri, 30 Aug 2013 11:11:07 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MSC00KWZNIGWJQ0@mailout4.samsung.com> for linux-mmc@vger.kernel.org; Sat, 31 Aug 2013 00:11:06 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.48]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id CE.D6.22755.A06B0225; Sat, 31 Aug 2013 00:11:06 +0900 (KST) X-AuditID: cbfee68f-b7f656d0000058e3-4e-5220b60ade36 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id C1.11.09055.A06B0225; Sat, 31 Aug 2013 00:11:06 +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 <0MSC002JANII4300@mmp1.samsung.com>; Sat, 31 Aug 2013 00:11:06 +0900 (KST) From: Seungwon Jeon To: linux-mmc@vger.kernel.org Cc: 'Chris Ball' , 'Jaehoon Chung' References: In-reply-to: Subject: [PATCH 01/22] mmc: dw_mmc: don't queue up a card detect at slot startup Date: Sat, 31 Aug 2013 00:11:06 +0900 Message-id: <000401cea593$2642f160$72c8d420$%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: Ac03z3aCvVFr8FaITt2vKVQKst76fw3OcIrwS9fJ1BAByUIdcA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRmVeSWpSXmKPExsVy+t8zA12ubQpBBhvXi1tsf72RzeLGrzZW iyP/+xkdmD0OXVnL6NG3ZRWjx+dNcgHMUVw2Kak5mWWpRfp2CVwZx/e+Yis4L1ix788C1gbG I3xdjJwcEgImEu03/zBD2GISF+6tZ+ti5OIQEljGKPHzURdjFyMHWNGhfUEQ8UWMEneb9rNA OH8YJTqW9LOBdLMJaEn8ffMGbJKIgKzEzz8XwOLMAt4Sr+avARskJMAtsbo5CCTMKcAjse5P J1i5sECAxLqW12DlLAKqErMmzwGzeQVsJS4eWMUEYQtK/Jh8jwVkDLOAusSUKbkQ0+UlNq95 ywxxprrEo7+6EAc4SZxtOsgIUSIise/FO0aQiyUE9rFLNN7ZyQKxSkDi2+RDLBC9shKbDkCD QVLi4IobLBMYJWYhWTwLYfEsJItnIdmwgJFlFaNoakFyQXFSepGxXnFibnFpXrpecn7uJkZI 7PXvYLx7wPoQYzLQ9onMUqLJ+cDYzSuJNzQ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1jYEvHt ztm93i7pe/REOb7JL1rt2pz7dG9NlVh/xdHClIWK78/nHzO1+NZeszV8b8Jjjg9OCWfutS27 KXVTxFCJpTgj0VCLuag4EQDYebRCMAMAAA== 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.0 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: Doug Anderson The MMC subsystem handles looking for a card at probe time. Queuing up our own can race with the rest of the MMC subsystem and cause problems if we get unlucky with timing. Just remove driver own detection triggering. While progressing the request from 'mmc_rescan', if 'dw_mci_work_routine_card' routine is activated, it will cancel the current request. The problem case is that 'mmc_rescan' is prior to 'dw_mci_work_routine_card' from host own. Specifically, the following message shows the detection problem in driver's probing. It would get an err -123 (-ENOMEDIUM) during probe. [ 4.216595] dwmmc_exynos 12210000.dwmmc1: Using internal DMA controller. [ 4.395935] dwmmc_exynos 12210000.dwmmc1: Version ID is 250a [ 4.401948] dwmmc_exynos 12210000.dwmmc1: DW MMC controller at irq 108, 64 bit host data width, 64 deep fifo [ 4.424430] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.453975] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.459592] mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125) [ 4.484258] dwmmc_exynos 12210000.dwmmc1: 1 slots initialized [ 4.485406] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.487606] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.489794] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.509757] mmc1: error -123 whilst initialising SDIO card Signed-off-by: Doug Anderson Acked-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index beafb4c..dc81034 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2008,12 +2008,6 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) /* Card initially undetected */ slot->last_detect_state = 0; - /* - * Card may have been plugged in prior to boot so we - * need to run the detect tasklet - */ - queue_work(host->card_workqueue, &host->card_work); - return 0; err_setup_bus: