Received: by 10.223.176.5 with SMTP id f5csp2195368wra; Thu, 8 Feb 2018 09:55:42 -0800 (PST) X-Google-Smtp-Source: AH8x227RWy4tv30VJ29ZD82HBvyHty66lwl0zL4gLsZAOvdBrGSeE3qdXpG49IudDK5R+CckNkzI X-Received: by 2002:a17:902:c81:: with SMTP id 1-v6mr1367360plt.281.1518112542347; Thu, 08 Feb 2018 09:55:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518112542; cv=none; d=google.com; s=arc-20160816; b=aYP1lD2jaj0rt/pYCjVKXvVdzYr/Qk7W9ff3rYKWAah7OF8g8aHje9OIh9Sc1X2xih X+8CmxrHxdfQBv2SYIj8vgfrSZjLT3rVONMk5VeYZtpTiWFha+4xjND1UVzT+WI5bMkO En0O1nrdoBoq56AgZ9CAzHXlGhK7Ly6Fo0Pd2u+apo1Zent3j7urOqe5InQkueD+peNr Z89QlGOYcTui+kUnZ7NVhaVHO7c4GfM80MkEzxPV0kq4MGYJ6S8z6TzlTY7C/6F744im tgvutvjrKYC0xRJHTl4TFdFiRUxj++27M2RLo/RB8zNZSZQMHieBDNKFY+b2fuzYwUGH A+RA== 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=3kM9OR4uBiZGNeIsBG4IZEJdl2nUZ6z4NjTnt/HX3UQ=; b=IqNWLrux8b8yRchFi74envxuxd5UfERf6O2C6gpE0AMc+qBQc1zZyzj2ftUB5GnXLD FWvxpymuAdrhL0YCmLATuWLvAR7IhJRjp8Vf3I3l4OK4nSTqetsSbAoMxYRUjbSp/BWy uqDKUOu6mWluAE282v4TjMXye45XPBjFN2Yg6AgBvbrkLPhhfCzj0UzanoJmNIcNZvc+ gqIn4eKZaD9vkjrq6y6hpGwcxoIeyd/erc9Zc06wi4rYWYrRtDVhPUn0qnR0/BgmEDSc eL2ebNT/v9Ry/4nbww3nS9YKOOH6ZkrJxRdjDhYAxETiTqEhu4jSIlzUtu7j+4SCaDlK G1SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZMj9WlA3; dkim=pass header.i=@codeaurora.org header.s=default header.b=OM3Dn2fE; 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 e3si239001pga.1.2018.02.08.09.55.27; Thu, 08 Feb 2018 09:55:42 -0800 (PST) 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=ZMj9WlA3; dkim=pass header.i=@codeaurora.org header.s=default header.b=OM3Dn2fE; 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 S1752498AbeBHRxk (ORCPT + 99 others); Thu, 8 Feb 2018 12:53:40 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:50568 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752448AbeBHRxX (ORCPT ); Thu, 8 Feb 2018 12:53:23 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 29DA060272; Thu, 8 Feb 2018 17:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518112403; bh=TM+QanQlWBWe6WF9KcQIiYWtjxO3Dh9vNA3rcUMnYBw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZMj9WlA3RoSUejJASrjMUTpr83CMa9UNumHF4vOflRAzSwQM+xPoQhpfBycHcE6Ro +Uf19mlRylhPfBcd3PnGNrkVn8eoO9i6JUsZCmJ1DMfpeesQNjC3TqkDyvoOui402N g+FCokJblju3k4LVYluZHc8gXmCeaT9yf+6fbcsI= 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 BF97460272; Thu, 8 Feb 2018 17:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518112401; bh=TM+QanQlWBWe6WF9KcQIiYWtjxO3Dh9vNA3rcUMnYBw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OM3Dn2fEAZBZIkd1twf8n3BL0dSfpaCQNQuYcPX7dVOQzt0hCHFynZWSRClZwoRf7 63Ji67GYQHDM1KsOmzW4R7OYKFb4VknatWq+8X7wHA9hgZ9HWbFUa52BCYA+JVyKz4 m0mQskjpyCMaQG4Dfkf3nfu0LHQxYuIIkWRIMEHQ= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 08 Feb 2018 09:53:21 -0800 From: Subhash Jadavani To: Asutosh Das Cc: cang@codeaurora.org, vivek.gautam@codeaurora.org, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, Maya Erez , linux-kernel@vger.kernel.org, linux-scsi-owner@vger.kernel.org Subject: Re: [PATCH 1/1] scsi: ufs: fix exception event handling In-Reply-To: <1517200492-2941-1-git-send-email-asutoshd@codeaurora.org> References: <1517200492-2941-1-git-send-email-asutoshd@codeaurora.org> Message-ID: <6c0b3d7d1c38ecb993125bc8e2b85799@codeaurora.org> 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-01-28 20:34, 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 8af2af3..2dd488f 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -4955,6 +4955,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", > @@ -4968,6 +4969,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