Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp277773pxa; Fri, 14 Aug 2020 04:06:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydIqafoYNNRA/PIwVIGhFb+l/wpnNqgoQtd0md3QeqdVCt7QLJjNRgTwefZ9cfyVfcEEz1 X-Received: by 2002:a17:906:9717:: with SMTP id k23mr1886725ejx.493.1597403184925; Fri, 14 Aug 2020 04:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597403184; cv=none; d=google.com; s=arc-20160816; b=YBLLuk+16r8E+GFqcCq1MLahiXzi/ZZ51eE6o32Aqxft9CKKyWc2gbzSqgR1XL2Giu 15/VpNwQgLAnACWQl08YNwLOq2KbcLpmd1D/sJd1tK9tbbK53ZAhjaNzdMgP1M2Upgpp 2VsVerUAzSkt6GJ6sRYOXityDRyNPYLh38EOZ8hINE4LVvYuEqBzaItYwnPdRMYC8fWY Gp4gPeopWtiGq5DTfGIAgp7LAiB8ifR+fJfQXZvCBaDTRrcCMtmoEk2xFNVpmxKpWmts 9iiBdYVFxhHvFgvAaf4JVsKIHo7t2JhG1fr4mMDun0tMp1HzEuugKxz9w5NB3hgwzA0e oyWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=J9GOjecEvlxXTNYvre81uurmGdRyGcLvJz15EEp+TWM=; b=JmqhBH69kcOOnQR8aSWJqtLq+pOUWcgTOvKF1sb3PVZ/qIS/l/Z14hmvNdxS1vRtFm Tv9qzZqSWNfvpd3D2V1nGM5E6BfqOVM1YTd2dszvybRRI/DrBdrWR1q1E23Wcj9M+c5O 3m+Tvq1o1Vy+u5Rl4D++NOoo/u3hLMvgo3MKEL3Li0j1b/br/Q06hlmYtYssu9/fSz+9 NPPvCP0A0cb1olKeLKAdVINNN19FmO1mTHJpmc7HNPDq3muuPNW8vs2hr9B/7anPhUWE aShdVdGSMKVnrNNINX5T6+Vr7GuMXK8mx2eVDj/KUcwRznlS48kYHRjgfqDHJq3UNeEc NqNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=Ab2V68Zp; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si5025491eds.349.2020.08.14.04.06.01; Fri, 14 Aug 2020 04:06:24 -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; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=Ab2V68Zp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726578AbgHNJ2o (ORCPT + 99 others); Fri, 14 Aug 2020 05:28:44 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:49507 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726311AbgHNJ2o (ORCPT ); Fri, 14 Aug 2020 05:28:44 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597397323; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=J9GOjecEvlxXTNYvre81uurmGdRyGcLvJz15EEp+TWM=; b=Ab2V68ZpMtZsrRJJwrE8iurGMB470MzpD+NZDkjQZzdAjVAIfedm8QwjQWFFP8nW9ApNoqtD IrhXnLFJZ4iFlfUEp9r16AFeF9LfMSjT9HlMPzrU0p8BeXdTBs3sgtnKsKyl6wJGZll57/qC 6q2y6zxoQ7KJLx9S9tmUMeuE3gY= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n09.prod.us-east-1.postgun.com with SMTP id 5f3659162b87d6604964c0af (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 14 Aug 2020 09:27:50 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id A9834C433AD; Fri, 14 Aug 2020 09:27:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cang) by smtp.codeaurora.org (Postfix) with ESMTPSA id ADF36C433C6; Fri, 14 Aug 2020 09:27:47 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 14 Aug 2020 17:27:47 +0800 From: Can Guo To: Bean Huo Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, bvanassche@acm.org, tomas.winkler@intel.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] scsi: ufs: no need to send one Abort Task TM in case the task in DB was cleared In-Reply-To: <20200811141859.27399-3-huobean@gmail.com> References: <20200811141859.27399-1-huobean@gmail.com> <20200811141859.27399-3-huobean@gmail.com> Message-ID: <50ed9345dc9873fcfb84f3b919eda7f8@codeaurora.org> X-Sender: cang@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-08-11 22:18, Bean Huo wrote: > From: Bean Huo > > If the bit corresponds to a task in the Doorbell register has been > cleared, no need to poll the status of the task on the device side > and to send an Abort Task TM. Instead, let it directly goto cleanup. > > Meanwhile, to keep original debug print, move this goto below the debug > print. > > Signed-off-by: Bean Huo Reviewed-by: Can Guo > --- > drivers/scsi/ufs/ufshcd.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 66fe814c8725..5f09cda7b21c 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -6434,14 +6434,8 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) > goto out; > } > > - if (!(reg & (1 << tag))) { > - dev_err(hba->dev, > - "%s: cmd was completed, but without a notifying intr, tag = %d", > - __func__, tag); > - } > - > /* Print Transfer Request of aborted task */ > - dev_err(hba->dev, "%s: Device abort task at tag %d\n", __func__, > tag); > + dev_info(hba->dev, "%s: Device abort task at tag %d\n", __func__, > tag); > > /* > * Print detailed info about aborted request. > @@ -6462,6 +6456,13 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) > } > hba->req_abort_count++; > > + if (!(reg & (1 << tag))) { > + dev_err(hba->dev, > + "%s: cmd was completed, but without a notifying intr, tag = %d", > + __func__, tag); > + goto cleanup; > + } > + > /* Skip task abort in case previous aborts failed and report failure > */ > if (lrbp->req_abort_skip) { > err = -EIO;