Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755210AbbLXKPb (ORCPT ); Thu, 24 Dec 2015 05:15:31 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:40723 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754545AbbLXKP2 convert rfc822-to-8bit (ORCPT ); Thu, 24 Dec 2015 05:15:28 -0500 X-AuditID: cbfee68d-f79646d000001355-b2-567bc5bea1fa MIME-version: 1.0 Content-type: text/plain; charset=euc-kr Content-transfer-encoding: 8BIT Message-id: <567BC5B8.6080308@samsung.com> Date: Thu, 24 Dec 2015 19:15:20 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: =?EUC-KR?B?wOW/tcH4?= , ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: js07.lee@samsung.com, =?EUC-KR?B?J8DMsaTIoyc=?= Subject: Re: [PATCH] Move the judgement of timeout into mmc_switch_status_error() References: <008f01d13e2b$4a2a3150$de7e93f0$@samsung.com> <567BB9CF.3090301@samsung.com> In-reply-to: <567BB9CF.3090301@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWyRsSkRHff0eowg7ffjSx2njvCbPHo5m9W i8u75rBZHPnfz2hxfG24RdehxawObB53ru1h8+jbsorR4/MmuQDmKC6blNSczLLUIn27BK6M swd72Qq2SFec/bmBqYFxvnAXIyeHhICJxNaNT1ghbDGJC/fWs4HYQgIrGCUOLdWAqfn0qA8o zgUUX8ooMeHaWbAGXgFBiR+T77GA2MwCGhJ3tx5ghbBFJM7f7mOEsLUlli18zQzR/ACoueMz G0SzlsTX12uYQGwWAVWJq62HmUFsNgEdie3fjoPFRQXCJB6s2ws2VESghVFiU2tgFyMH0FBv idPbpEDCwgLBEsveXGaHODpK4uDyJ2A2J9De8/vWgu2V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PcmMkuJJucDE0peSbyhsYmZkaWRuaGF kbG5kjjvvkuRYUIC6YklqdmpqQWpRTB9TBycUg2M9iXN22+tW1047YzyjpWS69SPBmSenBcW lrR1z0cFnpUcNtpczx8e+fg74uSMX+3C/3/PXnzn+bSvsnWCHvNeXgp70/NH4F58hVr85Pf+ 34pNiisY75l1O/TbxB3z3WLS/Ue45cfuTzWeyycceVR/+I48e0ux6DZ2c+l+Ac3XBxQfzl3F 7HzppBJLcUaioRZzUXEiAPbMciDwAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3591 Lines: 141 Hi, NAK. Maybe..It seems that this is not the patch based on latest kernel.. Which kernel version did you use? Plz, check the latest kernel. Best Regards, Jaehoon Chung On 12/24/2015 06:24 PM, Jaehoon Chung wrote: > Hi, > > Before send the patch at mailing list, you need to make the patch as mainline style. > Maybe..maintainer should not review this patch. > > Refer to "Linux kernel coding style" and "submitting Patches". > Also set your email environment. (Documentation/email-clients.txt) > > Best Regards, > Jaehoon Chung > > On 12/24/2015 06:13 PM, ?念?? wrote: >> >From bc1e491b29d9199f16c6e002a69f9377677b93af Mon Sep 17 00:00:00 2001 >> >> From: "yj84.jang" >> >> Date: Wed, 16 Dec 2015 08:52:47 +0900 >> >> Subject: [PATCH] Move the judgement of timeout into >> mmc_switch_status_error() >> >> >> >> __mmc_switch() is possible to misjudge error. >> >> >> >> Although jiffies was overed timeout, >> >> the chance about "R1_CURRENT_STATE(status) != R1_STATE_PRG" is exists. >> >> In other words, Successful completion of CMD6 with timeout error. >> >> >> >> Kernel expects failure of __mmc_switch, >> >> but card is completed CMD6 in this case. >> >> It makes mismatch status between mmc subsystem and mmc card. >> >> >> >> Especially, in case of partition switch, >> >> If timeout occurs with normal status of CMD13 response unfortunatley, >> >> "main_md->curr" will not be set, even card switched successfully. >> >> >> >> Checking state of mmc card is needed when judging an timeout error, >> >> if it is just timeout or timeout with error. >> >> >> >> Signed-off-by: yj84.jang >> >> --- >> >> drivers/mmc/core/mmc_ops.c | 5 +++-- >> >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> >> >> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c >> >> index 1f44426..033f475 100644 >> >> --- a/drivers/mmc/core/mmc_ops.c >> >> +++ b/drivers/mmc/core/mmc_ops.c >> >> @@ -456,6 +456,8 @@ int mmc_switch_status_error(struct mmc_host *host, u32 >> status) >> >> if (status & R1_SPI_ILLEGAL_COMMAND) >> >> return -EBADMSG; >> >> } else { >> >> + if (R1_CURRENT_STATE(status) == R1_STATE_PRG) >> >> + return -ETIMEDOUT; >> >> if (status & 0xFDFFA000) >> >> pr_warn("%s: unexpected status %#x after >> switch\n", >> >> mmc_hostname(host), status); >> >> @@ -568,8 +570,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 >> index, u8 value, >> >> if (time_after(jiffies, timeout)) { >> >> pr_err("%s: Card stuck in programming state! >> %s\n", >> >> mmc_hostname(host), __func__); >> >> - err = -ETIMEDOUT; >> >> - goto out; >> >> + break; >> >> } >> >> } while (R1_CURRENT_STATE(status) == R1_STATE_PRG); >> >> >> > > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/