LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Subhash Jadavani <subhashj@codeaurora.org>
To: Asutosh Das <asutoshd@codeaurora.org>
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 <merez@codeaurora.org>,
	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
Date: Wed, 16 May 2018 14:12:02 -0700	[thread overview]
Message-ID: <b8288f705c8829b144ad568784372fc9@codeaurora.org> (raw)
In-Reply-To: <01e6421c38e4eb1f67f3c98a8dab44a85f791ef2.1525343531.git.asutoshd@codeaurora.org>

On 2018-05-03 04:07, Asutosh Das wrote:
> From: Maya Erez <merez@codeaurora.org>
> 
> 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 <subhashj@codeaurora.org>
> Signed-off-by: Maya Erez <merez@codeaurora.org>
> Signed-off-by: Can Guo <cang@codeaurora.org>
> Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
> ---
>  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 <subhashj@codeaurora.org>

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2018-05-16 21:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1525341340.git.asutoshd@codeaurora.org>
     [not found] ` <cover.1525343531.git.asutoshd@codeaurora.org>
2018-05-03 11:07   ` [PATCH v2 01/10] scsi: ufs: Allowing power mode change Asutosh Das
2018-05-16 21:09     ` Subhash Jadavani
2018-05-03 11:07   ` [PATCH v2 02/10] scsi: ufs-qcom: Enable UFSHCD_QUIRK_BROKEN_PWR_MODE_CHANGE quirk Asutosh Das
2018-05-16 21:10     ` Subhash Jadavani
2018-05-03 11:07   ` [PATCH v2 03/10] scsi: ufs: Add LCC quirk for host and device Asutosh Das
2018-05-16 21:11     ` Subhash Jadavani
2018-05-03 11:07   ` [PATCH v2 04/10] scsi: ufs: fix exception event handling Asutosh Das
2018-05-16 21:12     ` Subhash Jadavani [this message]
2018-05-03 11:07   ` [PATCH v2 05/10] scsi: ufshcd: fix possible unclocked register access Asutosh Das
2018-05-16 21:12     ` Subhash Jadavani
2018-05-03 11:07   ` [PATCH v2 06/10] scsi: ufs: add reference counting for scsi block requests Asutosh Das
2018-05-16 21:13     ` Subhash Jadavani
2018-05-03 11:07   ` [PATCH v2 07/10] scsi: ufs-qcom: remove broken hci version quirk Asutosh Das
2018-05-16 21:13     ` Subhash Jadavani
2018-05-03 11:07   ` [PATCH v2 08/10] scsi: ufs: make sure all interrupts are processed Asutosh Das
2018-05-16 21:14     ` Subhash Jadavani
2018-05-03 11:07   ` [PATCH v2 09/10] scsi: ufs: fix irq return code Asutosh Das
2018-06-28 22:26     ` Subhash Jadavani
2018-05-03 11:07   ` [PATCH v2 10/10] scsi: ufs: Add clock ungating to a separate workqueue Asutosh Das
2018-05-16 21:14     ` Subhash Jadavani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8288f705c8829b144ad568784372fc9@codeaurora.org \
    --to=subhashj@codeaurora.org \
    --cc=asutoshd@codeaurora.org \
    --cc=cang@codeaurora.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-scsi-owner@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=merez@codeaurora.org \
    --cc=rnayak@codeaurora.org \
    --cc=vinholikatti@gmail.com \
    --cc=vivek.gautam@codeaurora.org \
    --subject='Re: [PATCH v2 04/10] scsi: ufs: fix exception event handling' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).