linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 3/4] scsi: ufs: Move ufshcd_wl_shutdown()
Date: Wed, 24 May 2023 15:45:16 +0300	[thread overview]
Message-ID: <f923cf03-5bf4-efc8-b967-cbb4366d819a@intel.com> (raw)
In-Reply-To: <20230517223157.1068210-4-bvanassche@acm.org>

On 18/05/23 01:31, Bart Van Assche wrote:
> Move the definition of ufshcd_wl_shutdown() to make the next patch in
> this series easier to review.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/ufs/core/ufshcd.c | 44 +++++++++++++++++++--------------------
>  1 file changed, 22 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 68d9e24fac98..0f426d46d91e 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -9746,28 +9746,6 @@ static int ufshcd_wl_resume(struct device *dev)
>  }
>  #endif
>  
> -static void ufshcd_wl_shutdown(struct device *dev)
> -{
> -	struct scsi_device *sdev = to_scsi_device(dev);
> -	struct ufs_hba *hba;
> -
> -	hba = shost_priv(sdev->host);
> -
> -	down(&hba->host_sem);
> -	hba->shutting_down = true;
> -	up(&hba->host_sem);
> -
> -	/* Turn on everything while shutting down */
> -	ufshcd_rpm_get_sync(hba);
> -	scsi_device_quiesce(sdev);
> -	shost_for_each_device(sdev, hba->host) {
> -		if (sdev == hba->ufs_device_wlun)
> -			continue;
> -		scsi_device_quiesce(sdev);
> -	}
> -	__ufshcd_wl_suspend(hba, UFS_SHUTDOWN_PM);
> -}
> -
>  /**
>   * ufshcd_suspend - helper function for suspend operations
>   * @hba: per adapter instance
> @@ -9952,6 +9930,28 @@ int ufshcd_runtime_resume(struct device *dev)
>  EXPORT_SYMBOL(ufshcd_runtime_resume);
>  #endif /* CONFIG_PM */
>  
> +static void ufshcd_wl_shutdown(struct device *dev)
> +{
> +	struct scsi_device *sdev = to_scsi_device(dev);
> +	struct ufs_hba *hba;
> +
> +	hba = shost_priv(sdev->host);
> +
> +	down(&hba->host_sem);
> +	hba->shutting_down = true;
> +	up(&hba->host_sem);
> +
> +	/* Turn on everything while shutting down */
> +	ufshcd_rpm_get_sync(hba);
> +	scsi_device_quiesce(sdev);
> +	shost_for_each_device(sdev, hba->host) {
> +		if (sdev == hba->ufs_device_wlun)
> +			continue;
> +		scsi_device_quiesce(sdev);
> +	}
> +	__ufshcd_wl_suspend(hba, UFS_SHUTDOWN_PM);
> +}
> +
>  /**
>   * ufshcd_shutdown - shutdown routine
>   * @hba: per adapter instance
> 


  reply	other threads:[~2023-05-24 12:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 22:31 [PATCH v2 0/4] UFS host controller driver patches Bart Van Assche
2023-05-17 22:31 ` [PATCH v2 1/4] scsi: ufs: Increase the START STOP UNIT timeout from one to ten seconds Bart Van Assche
2023-05-17 22:31 ` [PATCH v2 2/4] scsi: ufs: Fix handling of lrbp->cmd Bart Van Assche
2023-05-24 12:21   ` Adrian Hunter
2023-05-24 15:44     ` Bart Van Assche
2023-05-17 22:31 ` [PATCH v2 3/4] scsi: ufs: Move ufshcd_wl_shutdown() Bart Van Assche
2023-05-24 12:45   ` Adrian Hunter [this message]
2023-05-17 22:31 ` [PATCH v2 4/4] scsi: ufs: Simplify driver shutdown Bart Van Assche
2023-05-24 12:48   ` Adrian Hunter
2023-05-22 19:39 ` [PATCH v2 0/4] UFS host controller driver patches Bart Van Assche

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=f923cf03-5bf4-efc8-b967-cbb4366d819a@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).