[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d800b6db75a6c51d368268d5bc7f036b.squirrel@www.codeaurora.org>
Date: Tue, 27 Oct 2015 14:57:56 -0000
From: "Gilad Broner" <gbroner@...eaurora.org>
To: "Yaniv Gardi" <ygardi@...eaurora.org>
Cc: robherring2@...il.com, james.bottomley@...senpartnership.com,
pebolle@...cali.nl, hch@...radead.org,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-arm-msm@...r.kernel.org, santoshsy@...il.com,
linux-scsi-owner@...r.kernel.org, subhashj@...eaurora.org,
ygardi@...eaurora.org, gbroner@...eaurora.org,
draviv@...eaurora.org,
"Vinayak Holikatti" <vinholikatti@...il.com>,
"James E.J. Bottomley" <jbottomley@...n.com>
Subject: Re: [PATCH v5 06/15] scsi: ufs: avoid exception event handler racing
with PM callbacks
Reviewed-by: Gilad Broner <gbroner@...eaurora.org>
> If device raises the exception event in the response to the commands
> sent during the runtime/system PM callbacks, exception event handler
> might run in parallel with PM callbacks and may see unclocked register
> accesses. This change fixes this issue by not scheduling the exception
> event handler while PM callbacks are running.
>
> Signed-off-by: Subhash Jadavani <subhashj@...eaurora.org>
> Signed-off-by: Yaniv Gardi <ygardi@...eaurora.org>
>
> ---
> drivers/scsi/ufs/ufshcd.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 573a8cb..0e54183 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -3145,7 +3145,20 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba,
> struct ufshcd_lrb *lrbp)
> scsi_status = result & MASK_SCSI_STATUS;
> result = ufshcd_scsi_cmd_status(lrbp, scsi_status);
>
> - if (ufshcd_is_exception_event(lrbp->ucd_rsp_ptr))
> + /*
> + * Currently we are only supporting BKOPs exception
> + * events hence we can ignore BKOPs exception event
> + * during power management callbacks. BKOPs exception
> + * event is not expected to be raised in runtime suspend
> + * callback as it allows the urgent bkops.
> + * During system suspend, we are anyway forcefully
> + * disabling the bkops and if urgent bkops is needed
> + * it will be enabled on system resume. Long term
> + * solution could be to abort the system suspend if
> + * UFS device needs urgent BKOPs.
> + */
> + if (!hba->pm_op_in_progress &&
> + ufshcd_is_exception_event(lrbp->ucd_rsp_ptr))
> schedule_work(&hba->eeh_work);
> break;
> case UPIU_TRANSACTION_REJECT_UPIU:
> --
> 1.8.5.2
>
> --
> QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists