From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756215AbbFBJXl (ORCPT ); Tue, 2 Jun 2015 05:23:41 -0400 Received: from sci-ig2.spreadtrum.com ([222.66.158.135]:49189 "EHLO SHSQR01.spreadtrum.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752151AbbFBJXf (ORCPT ); Tue, 2 Jun 2015 05:23:35 -0400 From: =?utf-8?B?SnVzdGluIFdhbmcgKOeOi+S4gSk=?= To: "'Ulf Hansson'" CC: "kuninori.morimoto.gx@renesas.com" , "jh80.chung@samsung.com" , "akpm@linux-foundation.org" , "JBottomley@Odin.com" , "ben@decadent.org.uk" , "chuanxiao.dong@intel.com" , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] mmc: card: Fixup request missing in mmc_blk_issue_rw_rq Thread-Topic: [PATCH] mmc: card: Fixup request missing in mmc_blk_issue_rw_rq Thread-Index: AdCR/ZWktRgFsB0DTb+gZw4BZ2QglwG3750AAQwOb/A= Date: Tue, 2 Jun 2015 09:14:30 +0000 Message-ID: <7889e15acf1b483289661554a617f942@SHMBX03.spreadtrum.com> References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.0.213] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-MAIL: SHSQR01.spreadtrum.com t529E4cD007563 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t529NklI018943 > -----Original Message----- > From: Ulf Hansson [mailto:ulf.hansson@linaro.org] > Sent: Thursday, May 28, 2015 4:29 PM > To: Justin Wang (王ä¸�) > Cc: kuninori.morimoto.gx@renesas.com; jh80.chung@samsung.com; > akpm@linux-foundation.org; JBottomley@Odin.com; ben@decadent.org.uk; > chuanxiao.dong@intel.com; linux-mmc@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH] mmc: card: Fixup request missing in mmc_blk_issue_rw_rq > Importance: High > > On 19 May 2015 at 08:32, Justin Wang (王ä¸�) > wrote: > > From 05849da563c80c20597ab6275d5881a8ed426f96 Mon Sep 17 00:00:00 > 2001 > > From: justin.wang > > Date: Mon, 18 May 2015 20:14:15 +0800 > > Subject: [PATCH] mmc: card: Fixup request missing in mmc_blk_issue_rw_rq > > > > The current handler of MMC_BLK_CMD_ERR in mmc_blk_issue_rw_rq > function > > may cause new coming request permanent missing when the ongoing > > request (previoulsy started) complete end. > > I think you need to elaborate a bit more here. In exactly what > scenario does this problem occur? > Thanks, I will give a detailed description next patch. > > > > This would cause the process related to the missing request stay at 'D' > > state forever. > > 'D' state? > > I suppose it waits for a response for its IO request. Doesn't also the > block layer complain or timeout somehow? Would be interesting to know > a bit more about what really happens when things goes wrong. > Yes, process will wait the missed request complete forever, no timeout in block layer. The related process will be blocked. > > > > Seems like we should have a fixes tag here as well, could you possibly > try to find what commit that introduced this bug? > > > Signed-off-by: Ding Wang > > --- > > drivers/mmc/card/block.c | 8 +++++--- > > 1 files changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c > > index 60f7141..f05cd1f 100644 > > --- a/drivers/mmc/card/block.c > > +++ b/drivers/mmc/card/block.c > > @@ -1910,9 +1910,11 @@ static int mmc_blk_issue_rw_rq(struct > mmc_queue *mq, struct request *rqc) > > break; > > case MMC_BLK_CMD_ERR: > > ret = mmc_blk_cmd_err(md, card, brq, req, > ret); > > - if (!mmc_blk_reset(md, card->host, type)) > > - break; > > - goto cmd_abort; > > + if (mmc_blk_reset(md, card->host, type)) > > + goto cmd_abort; > > + if (!ret) > > + goto start_new_req; > > + break; > > case MMC_BLK_RETRY: > > if (retry++ < 5) > > break; > > -- > > 1.7.4.1 > > > > Kind regards > Uffe ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºʇڙë,j­¢f£¢·hš�ï�êÿ‘êçz_è®(­éšŽŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨è­Ú&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿà ÿ¶ìÿ¢¸?–I¥