Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2511939imm; Wed, 16 May 2018 14:12:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpDJWlXVIrEhCzn2cnj1G6B/HJ0/c9QUfvBi14wDAgvkw1vNOmPD3IBX6BxmyrwMAyI4Pyf X-Received: by 2002:a62:4184:: with SMTP id g4-v6mr2540670pfd.51.1526505156166; Wed, 16 May 2018 14:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526505156; cv=none; d=google.com; s=arc-20160816; b=N5hmsjxWASpwtoceIyixOnPr8bUvGnOk8k75N307kPqEItyYFuBLjDNM9yHpcmRUlG pTWJ88xVf7LkeO2i9DQL6AutOCtexN3aEW+8yxQ2cUij7davndp8yuidiLCRlq5R7CRj x2vusGg4/Kc90ZSeMBCbZXJtkQhP974HMVF7aDlS80uPStQnWFyvm/ZGlcB4MFHEnSIc Gm+sjpCJZ4IXLetrcl9zhc1BUzX9RItmLc0EddxaSBmtKvvUE687LUPOPqLURNuwd147 U7gnuW5mM6vwABQKG0qyoonJCKnbOvwj4kcWf5ZaEoHNfeV2FS3BXSOSpw/IfLs/ZeJ2 24Dg== 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:dkim-signature :arc-authentication-results; bh=xyEo+TOTmlz1vWvjcNfurLFleSkuUWGkw9XwqxTghbE=; b=YrNgz7mDptzh37lVr+kO759hc74iK5gfuAwr9C2TzJQU+HptOYRFH4wwmHr/e1k+M8 sIJcqT3yxUq6bb9gmbesUMqjYzHLoVEjfyFu2hGKE9QWZ70s6MhfbRSJA/koNRdced9v Ku/QFwf/+KK67sXShoGiSG6wfY+oAd45jDz8Gj3DcrWgDMDoV+ZaIeaOJFyivUHXwtRK V/AtGDFJLqZF2WFLvvJFh8z5oQkn4vS9Loy5VhDEdykAiaPOoW+3pAvZK1L1nNM1GB6/ x406xr1ngogFeNsEe1HtwtRTKlakrdz4poo2zsz0DSMs81c7W1ySdFe9RAUubb9eRJdn MkbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=E7b/GsRO; dkim=pass header.i=@codeaurora.org header.s=default header.b=QPxH57hF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l2-v6si2726417pgc.438.2018.05.16.14.12.21; Wed, 16 May 2018 14:12:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=E7b/GsRO; dkim=pass header.i=@codeaurora.org header.s=default header.b=QPxH57hF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752226AbeEPVMF (ORCPT + 99 others); Wed, 16 May 2018 17:12:05 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54304 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbeEPVMD (ORCPT ); Wed, 16 May 2018 17:12:03 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 04D336085F; Wed, 16 May 2018 21:12:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526505123; bh=E5MrXg02HO/K1tlUUPZ27aB9/LNcMNXHd/Pk/cMFPUQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=E7b/GsROcLi7b15S8YffNr7u2lXAMkHTle9wuOmX8NlP9B4uAWLcGoSXKFKLgiKA+ DMK2YccqKaWkLaeuTuk8mSO2pqjjD9d8fh31iMW4/w+pb//BxPhOUHmam2ykyGqsRF WjFi/D/pXUZhavizThGqwMxPn14Y4k1pA6Pydye8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 90F5F60209; Wed, 16 May 2018 21:12:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526505122; bh=E5MrXg02HO/K1tlUUPZ27aB9/LNcMNXHd/Pk/cMFPUQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QPxH57hFVkOhCkZXsernAUCi1ALQJ+TBOd1WWmRNzQ9doydPc9N+Bf5rSwxGAnJue 3lrLFKVA2W3Xzfb2Da5XWIeT3QisUabuAHayZ/YN92ymjc/8MA8rJlmlCgx7GdXvif l05DXQa8m2HvgPphonIUXN/Y4QlqHMYN2nz46O5c= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 16 May 2018 14:12:02 -0700 From: Subhash Jadavani To: Asutosh Das Cc: cang@codeaurora.org, vivek.gautam@codeaurora.org, rnayak@codeaurora.org, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-mmc@vger.kernel.org, linux-scsi@vger.kernel.org, Maya Erez , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi-owner@vger.kernel.org Subject: Re: [PATCH v2 04/10] scsi: ufs: fix exception event handling In-Reply-To: <01e6421c38e4eb1f67f3c98a8dab44a85f791ef2.1525343531.git.asutoshd@codeaurora.org> References: <01e6421c38e4eb1f67f3c98a8dab44a85f791ef2.1525343531.git.asutoshd@codeaurora.org> Message-ID: X-Sender: subhashj@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-05-03 04:07, Asutosh Das wrote: > From: Maya Erez > > The device can set the exception event bit in one of the response UPIU, > for example to notify the need for urgent BKOPs operation. > In such a case the host driver calls ufshcd_exception_event_handler to > handle this notification. > When trying to check the exception event status (for finding the cause > for > the exception event), the device may be busy with additional SCSI > commands > handling and may not respond within the 100ms timeout. > > To prevent that, we need to block SCSI commands during handling of > exception events and allow retransmissions of the query requests, > in case of timeout. > > Signed-off-by: Subhash Jadavani > Signed-off-by: Maya Erez > Signed-off-by: Can Guo > Signed-off-by: Asutosh Das > --- > drivers/scsi/ufs/ufshcd.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 6dabce8..838ba8f0 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -4967,6 +4967,7 @@ static void > ufshcd_exception_event_handler(struct work_struct *work) > hba = container_of(work, struct ufs_hba, eeh_work); > > pm_runtime_get_sync(hba->dev); > + scsi_block_requests(hba->host); > err = ufshcd_get_ee_status(hba, &status); > if (err) { > dev_err(hba->dev, "%s: failed to get exception status %d\n", > @@ -4980,6 +4981,7 @@ static void > ufshcd_exception_event_handler(struct work_struct *work) > ufshcd_bkops_exception_event_handler(hba); > > out: > + scsi_unblock_requests(hba->host); > pm_runtime_put_sync(hba->dev); > return; > } Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project