Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp239770pxb; Thu, 30 Sep 2021 05:12:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlXnA0gTZ/tqib7dFvKrxmoXXhRnBq+NCknIGA9H/ofZsgSSOAv8L/dNuhtJ3Xw+FWPkNy X-Received: by 2002:a50:d906:: with SMTP id t6mr6821620edj.232.1633003924332; Thu, 30 Sep 2021 05:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633003924; cv=none; d=google.com; s=arc-20160816; b=ACtYI8tM1f6bUy4Az9PPHrJBeeBKpsnGQ/pSbNvkuOmoTK8djD1grHHDOo2wCYqYXp veOG8LHYGgKnPmWOxh9kq1ZTTFLuEQzyVlJIwV1mFO4isy7ckakxAa4nIfMOdHcBP3Ki xpTYwyJhvRK38/riJEkEcvhZO2Xtqs7/T4A8hQQ5y5X5IUum9R1xbciETyfFH4CeFPE4 AhxuTBgEqI4lBKGE8WAw5TWwu6srGfOrOeGcSHQd3vZvLRn8+9qWRtRaR5gDo27H9UZH CIQK+xPiN7yO/LagDkocYU/WGMWf82F3M5j64nIGw2ZVaNknDYyVDI5qPtGwLW6iVZ6H 7oBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=Gby5LzHtJr5v7yPk9IwWdJuVugpU+BF5HCNoVCsonFQ=; b=Vs6arbTb+Bvu3M4Gp2RSuPgn5Z2c/IuhyyiRJhERZhNKzZQBhvc0OZuhNPOfmt+94R OnhdxhWWI4pBwMuwKkZ21/FnNjnLym+YzgqpPgoY1dWJaqcApLJwveVFVKzbJeEzy90P lRMe6K1QSiZq2TdvPy+o4c8PybDrgA890hmZh3mML7J5a+8MBZPdZ6n5C2erMEMgHWS1 JXzQOhh1dlOkMbv4AhrLnhi3q9WhWSY5S8HlbHRba5Cr72GdMpCayvRooPQ/BqSVukYR BF1B9huacK+rJZ57PHuZi2ZG0aBgCDDmf0d0aw7qo63LZPxo+CTLdjmA+uIV18WHYUzw jSBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j30si3603184ejo.706.2021.09.30.05.11.06; Thu, 30 Sep 2021 05:12:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348878AbhI3Iw2 (ORCPT + 99 others); Thu, 30 Sep 2021 04:52:28 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:48898 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1348052AbhI3Iw0 (ORCPT ); Thu, 30 Sep 2021 04:52:26 -0400 X-UUID: 120975a9fa3c4183b67d298a3bf2d88c-20210930 X-UUID: 120975a9fa3c4183b67d298a3bf2d88c-20210930 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2053204664; Thu, 30 Sep 2021 16:50:40 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Thu, 30 Sep 2021 16:50:39 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 30 Sep 2021 16:50:38 +0800 Message-ID: Subject: Re: [PATCH 0/2] Fix UFS task management command timeout From: Po-Wen Kao To: Avri Altman , "linux-block@vger.kernel.org" , "axboe@kernel.dk" , "linux-kernel@vger.kernel.org" , "stanley.chu@mediatek.com" , "linux-scsi@vger.kernel.org" , "martin.petersen@oracle.com" , "alim.akhtar@samsung.com" , "jejb@linux.ibm.com" CC: "peter.wang@mediatek.com" , "chun-hung.wu@mediatek.com" , "alice.chao@mediatek.com" , "jonathan.hsu@mediatek.com" , "cc.chou@mediatek.com" , "chaotian.jing@mediatek.com" , "jiajie.hao@mediatek.com" , "wsd_upstream@mediatek.com" , "ed.tsai@mediatek.com" Date: Thu, 30 Sep 2021 16:50:38 +0800 In-Reply-To: References: <20210929070047.4223-1-powen.kao@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Avri, Thanks for reminding. It's exactly the same issue. Best, Po-Wen Kao On Wed, 2021-09-29 at 07:39 +0000, Avri Altman wrote: > > On UTP_TASK_REQ_COMPL interrupt, ufshcd_tmc_handler() iterates > > through > > busy requests in tags->rqs and complete request if corresponding > > doorbell flag is reset. > > However, ufshcd_issue_tm_cmd() allocates requests from tags- > > >static_rqs > > and trigger doorbell directly without dispatching request through > > block > > layer, thus requests can never be found in tags->rqs and completed > > properly. Any TM command issued by ufshcd_issue_tm_cmd() inevitably > > timeout and further leads to recovery flow failure when LU Reset or > > Abort Task is issued. > > > > In this patch, blk_mq_tagset_busy_iter() call in > > ufshcd_tmc_handler() > > is replaced with new interface, blk_mq_drv_tagset_busy_iter(), to > > allow completion of request allocted by driver. The new interface > > is > > introduced for driver to iterate through requests in static_rqs. > > Is this the same issue that was addressed here - > https://urldefense.com/v3/__https://www.spinics.net/lists/linux-scsi/msg164520.html__;!!CTRNKA9wMg0ARbw!yDkg-AVkMBFsnDBV42HMDgnE51HaEBarK2Tw8z8Di4aC1_7BrRkjIO13nz5rFUk-FA$ > A$ ? > > Thanks, > Avri > > > > > Po-Wen Kao (2): > > blk-mq: new busy request iterator for driver > > scsi: ufs: fix TM request timeout > > > > block/blk-mq-tag.c | 36 ++++++++++++++++++++++++++++++----- > > - > > drivers/scsi/ufs/ufshcd.c | 2 +- > > include/linux/blk-mq.h | 4 ++++ > > 3 files changed, 35 insertions(+), 7 deletions(-) > > > > -- > > 2.18.0 > >