]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
scsi: ufs: skip shutdown if hba is not powered
authorStanley Chu <stanley.chu@mediatek.com>
Wed, 18 Sep 2019 04:20:38 +0000 (12:20 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:46:11 +0000 (18:46 +0100)
commit0700d840a7fd954ebd4377d263633dea5d9d10a0
tree659e22929d2f4574b2fe30254f61de30f78df692
parent1d94995354c9d8112140e3f215eafc3acf269029
scsi: ufs: skip shutdown if hba is not powered

BugLink: https://bugs.launchpad.net/bugs/1850456
[ Upstream commit f51913eef23f74c3bd07899dc7f1ed6df9e521d8 ]

In some cases, hba may go through shutdown flow without successful
initialization and then make system hang.

For example, if ufshcd_change_power_mode() gets error and leads to
ufshcd_hba_exit() to release resources of the host, future shutdown flow
may hang the system since the host register will be accessed in unpowered
state.

To solve this issue, simply add checking to skip shutdown for above kind of
situation.

Link: https://lore.kernel.org/r/1568780438-28753-1-git-send-email-stanley.chu@mediatek.com
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Acked-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/scsi/ufs/ufshcd.c