[PATCH v1 1/2] scsi: ufs: set device as default active power mode during initialization only
stanley.chu at mediatek.com
Thu Jan 16 23:57:32 PST 2020
On Fri, 2020-01-03 at 13:28 +0800, Can Guo wrote:
> > Hi Stanley,
> > Above description is correct. The reason why the UFS device becomes
> > Active after the 1st link startup in your experiment is due to you
> > set spm_lvl to 5, during system suspend, UFS device is powered down.
> > When resume kicks start, the UFS device is power cycled once.
> > Moreover, if you set rpm_lvl to 5, during runtime suspend, if bkops is
> > enabled, the UFS device will not be powered off, meaning when runtime
> > resume kicks start, the UFS device is not power cycled, in this case,
> > we need 3 times of link startup.
> > Does above explain?
> > Thanks,
> > Can Guo.
> Hi Stanley,
> Sorry, typo before. I meant if set rpm_lvl/spm_lvl to 5, during suspend,
> if is_lu_power_on_wp is set, the UFS device will not be fully powered
> (only VCC is down), meaning when resume kicks start, the UFS device is
> power cycled, in this case, we need 3 times of link startup.
> Can Guo.
Very sorry for late responding this thread.
Now I would like to focus on 3-times link startup behavior found in our
platform because this dramatically downgrade resume performance.
According to your description, then could the driver set
"link_startup_again" as true only if "is_lu_power_on_wp" is set to avoid
unnecessary three-times link startup in other cases?
In addition, for the scenario you mentioned: "the UFS device will not be
fully powered off (only VCC is down), meaning when resume kicks start,
the UFS device is not power cycled":
1. Actually I tried to set xpm_lvl=5, and enforced "is_lu_power_on_wp"
as true for evaluation, but found device can be still back to Active
PowerMode (can be accessed normally) after one-time link startup after
Only VCC is down and VCCQ2 is kept during suspend in my evaluation.
2. In this scenario, during resume the peer device shall have "UniPro
Warm Reset" triggered by the first link start-up and then device power
mode shall become Active according to UFS specification.
So what device power mode did you see after the first link startup in
this scenario? Or any other conditions to make device need
More information about the linux-arm-kernel