linux-stable/drivers/scsi/ufs
Stanley Chu 37528b3ee9 scsi: ufs: Clean up completed request without interrupt notification
[ Upstream commit b10178ee7f ]

If somehow no interrupt notification is raised for a completed request and
its doorbell bit is cleared by host, UFS driver needs to cleanup its
outstanding bit in ufshcd_abort(). Otherwise, system may behave abnormally
in the following scenario:

After ufshcd_abort() returns, this request will be requeued by SCSI layer
with its outstanding bit set. Any future completed request will trigger
ufshcd_transfer_req_compl() to handle all "completed outstanding bits". At
this time the "abnormal outstanding bit" will be detected and the "requeued
request" will be chosen to execute request post-processing flow. This is
wrong because this request is still "alive".

Link: https://lore.kernel.org/r/20200811141859.27399-2-huobean@gmail.com
Reviewed-by: Can Guo <cang@codeaurora.org>
Acked-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:26:59 +02:00
..
cdns-pltfrm.c scsi: ufs: Disable autohibern8 feature in Cadence UFS 2019-12-21 11:05:03 +01:00
Kconfig
Makefile
tc-dwc-g210-pci.c
tc-dwc-g210-pltfrm.c
tc-dwc-g210.c
tc-dwc-g210.h
ufs-hisi.c scsi: ufs-hisi: use devm_platform_ioremap_resource() to simplify code 2019-09-07 16:43:05 -04:00
ufs-hisi.h
ufs-mediatek.c scsi: ufs-mediatek: add apply_dev_quirks variant operation 2020-02-24 08:36:50 +01:00
ufs-mediatek.h
ufs-qcom.c scsi: ufs-qcom: Fix scheduling while atomic issue 2020-06-24 17:50:34 +02:00
ufs-qcom.h scsi: ufs-qcom: Implement device_reset vops 2019-09-07 16:36:03 -04:00
ufs-sysfs.c scsi: ufs: Fix up auto hibern8 enablement 2020-01-04 19:18:17 +01:00
ufs-sysfs.h
ufs.h scsi: ufs: revamp string descriptor reading 2019-08-07 21:40:37 -04:00
ufs_bsg.c scsi: ufs-bsg: Fix runtime PM imbalance on error 2020-06-24 17:50:47 +02:00
ufs_bsg.h
ufs_quirks.h scsi: ufs: Add DELAY_BEFORE_LPM quirk for Micron devices 2020-08-26 10:40:54 +02:00
ufshcd-dwc.c
ufshcd-dwc.h
ufshcd-pci.c
ufshcd-pltfrm.c scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code 2019-09-07 16:42:07 -04:00
ufshcd-pltfrm.h
ufshcd.c scsi: ufs: Clean up completed request without interrupt notification 2020-09-03 11:26:59 +02:00
ufshcd.h scsi: ufs: fix Auto-Hibern8 error detection 2020-04-17 10:50:19 +02:00
ufshci-dwc.h
ufshci.h
unipro.h