From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A4C0C7618B for ; Thu, 25 Jul 2019 08:52:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08EC222BED for ; Thu, 25 Jul 2019 08:52:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YLqxPg8V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08EC222BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v0HilVTEmzgdjtzCXjS1fOBInOhJSVsFXt2rrNr9HGg=; b=YLqxPg8VBLWbEr 1W5MO8U8YruPljh1bYozWhHHkr2w4uUvU1P9ZldptvxNBxveznj8hNcQ/ssXYBc/UvYG2ABRTG+LQ PvvYMew6jgSHYlagfdY5+Z8mvOhUGQru06eSKPxpwmIA5y/rxKdoKAAHTNYQ5hmsuOMEBe9PDuSHK lqAVS7hGW8p6/VDq78JnQ2YYkvQEsF3+uY/wlL9/Jks6sUS7sCXVqCaHC48kFWM47ckhccGL6x6Ok OVf23TfowNX1Kn6068EALlg9Ofv3juSRXBp2z8moILOfpD/rrujia7UGx7iv/7IZTDVrSEluF2zJs d3dLp6ZRGkurDkwMuLDQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqZUX-00029K-Vl; Thu, 25 Jul 2019 08:52:49 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqZUT-00027m-0J; Thu, 25 Jul 2019 08:52:46 +0000 X-UUID: 4c0036327c5141d196b5ddf1f2a0a8fe-20190725 X-UUID: 4c0036327c5141d196b5ddf1f2a0a8fe-20190725 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 877433952; Thu, 25 Jul 2019 00:52:20 -0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 25 Jul 2019 01:52:19 -0700 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 25 Jul 2019 16:52:17 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 25 Jul 2019 16:52:17 +0800 Message-ID: <1564044737.7235.9.camel@mtkswgap22> Subject: RE: [PATCH v2 0/3] scsi: ufs: fix broken hba->outstanding_tasks From: Stanley Chu To: Avri Altman Date: Thu, 25 Jul 2019 16:52:17 +0800 In-Reply-To: References: <1563947418-16394-1-git-send-email-stanley.chu@mediatek.com> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190725_015245_054795_B2E3A0F4 X-CRM114-Status: GOOD ( 10.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-scsi@vger.kernel.org" , "martin.petersen@oracle.com" , "marc.w.gonzalez@free.fr" , "andy.teng@mediatek.com" , "chun-hung.wu@mediatek.com" , "kuohong.wang@mediatek.com" , "evgreen@chromium.org" , "linux-mediatek@lists.infradead.org" , "peter.wang@mediatek.com" , "alim.akhtar@samsung.com" , "matthias.bgg@gmail.com" , "pedrom.sousa@synopsys.com" , "linux-arm-kernel@lists.infradead.org" , "beanhuo@micron.com" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Avri, On Thu, 2019-07-25 at 07:54 +0000, Avri Altman wrote: > Stanly, > > > > > Currently bits in hba->outstanding_tasks are cleared only after their > > corresponding task management commands are successfully done by > > __ufshcd_issue_tm_cmd(). > > > > If timeout happens in a task management command, its corresponding > > bit in hba->outstanding_tasks will not be cleared until next task > > management command with the same tag used successfully finishes. > I'm sorry - I still don't understand why you just can't release the tag either way, > Just like we do in device management queries tags, > Instead of adding all this unnecessary code. > > I will not object to your series - > just step down and let other people review you patches. Sorry to not describe the failed scenario clearly. Simpliy focus on outstanding bits cleanup in failed (timeout) case: - For device command, if timeout happens, its tag can be cleared in ufshcd_wait_for_dev_cmd() which specifically uses ufshcd_outstanding_req_clear() to clear failed bit in outstanding_reqs mask. - For task management command, if timeout happens, current driver will not clear failed bit in outstanding_tasks mask: - __ufshcd_issue_tm_cmd() will not clear it, - ufshcd_tmc_handler() will not clear it either during reset flow. > Thanks, > Avri Thanks, Stanley > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel