[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fd129b859c013852bd80f60a36425757@codeaurora.org>
Date: Mon, 30 Dec 2019 15:24:54 -0800
From: asutoshd@...eaurora.org
To: Stanley Chu <stanley.chu@...iatek.com>
Cc: linux-scsi@...r.kernel.org, martin.petersen@...cle.com,
avri.altman@....com, alim.akhtar@...sung.com,
pedrom.sousa@...opsys.com, jejb@...ux.ibm.com,
matthias.bgg@...il.com, bvanassche@....org,
subhashj@...eaurora.org, beanhuo@...ron.com, cang@...eaurora.org,
linux-mediatek@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kuohong.wang@...iatek.com, peter.wang@...iatek.com,
chun-hung.wu@...iatek.com, andy.teng@...iatek.com,
stable@...r.kernel.org, linux-scsi-owner@...r.kernel.org
Subject: Re: [PATCH v1 1/2] scsi: ufs: set device as default active power mode
during initialization only
Hi Stanley,
On 2019-12-30 00:12, Stanley Chu wrote:
> Currently ufshcd_probe_hba() always sets device status as "active".
> This shall be by an assumption that device is already in active state
> during the boot stage before kernel.
>
> However, if link is configured as "off" state and device is requested
> to enter "sleep" or "powerdown" power mode during suspend flow, device
> will NOT be waken up to "active" power mode during resume flow because
> device is already set as "active" power mode in ufhcd_probe_hba().
>
> Fix it by setting device as default active power mode during
> initialization only, and skipping changing mode during PM flow
> in ufshcd_probe_hba().
>
> Fixes: 7caf489b99a4 (scsi: ufs: issue link starup 2 times if device
> isn't active)
> Cc: Alim Akhtar <alim.akhtar@...sung.com>
> Cc: Avri Altman <avri.altman@....com>
> Cc: Bart Van Assche <bvanassche@....org>
> Cc: Bean Huo <beanhuo@...ron.com>
> Cc: Can Guo <cang@...eaurora.org>
> Cc: Matthias Brugger <matthias.bgg@...il.com>
> Cc: Subhash Jadavani <subhashj@...eaurora.org>
> Cc: stable@...r.kernel.org
> Signed-off-by: Stanley Chu <stanley.chu@...iatek.com>
> ---
> drivers/scsi/ufs/ufshcd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index ed02a704c1c2..9abb7085a5d0 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6986,7 +6986,8 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
> ufshcd_tune_unipro_params(hba);
>
> /* UFS device is also active now */
> - ufshcd_set_ufs_dev_active(hba);
> + if (!hba->pm_op_in_progress)
> + ufshcd_set_ufs_dev_active(hba);
> ufshcd_force_reset_auto_bkops(hba);
> hba->wlun_dev_clr_ua = true;
I see that there's a get_sync done before.
So, how would the suspend be triggered in that case?
Thanks,
asd
Powered by blists - more mailing lists