]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/scsi/ufs/ufshcd.c
scsi: ufs: Do not rely on prefetched data
authorCan Guo <cang@codeaurora.org>
Thu, 26 Mar 2020 09:25:41 +0000 (02:25 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 27 Mar 2020 02:56:33 +0000 (22:56 -0400)
commite89860f196fca353d1b93c95b6a5b4fd88178d3b
tree91f81bd380768d56737862ed16f29f6a4450cdf3
parentccfa00a86819823a88612728c4b945455066e8c5
scsi: ufs: Do not rely on prefetched data

We were setting bActiveICCLevel attribute for UFS device only once but the
type of this attribute has changed from persistent to volatile since UFS
device specification v2.1. This attribute is set to the default value after
power cycle or hardware reset event. It isn't safe to rely on prefetched
data (only used for bActiveICCLevel attribute now). Hence this change
removes the code related to data prefetching and set this parameter on
every attempt to probe the UFS device.

Tested-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h