diff options
| author | Stanley Jhu <stanleyjhu@google.com> | 2026-10-22 11:44:40 +0800 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-23 23:16:41 -0400 |
| commit | 6b9c1f49971e4dfe8b8916f0527d30e97c15f234 (patch) | |
| tree | 9898e58c1eedccc903b0e465bf639744e1377ae0 /tools/lib/python/kdoc/python_version.py | |
| parent | 22d14117ec1845a81acb3a5c4be325f7e8332f70 (diff) | |
scsi: ufs: core: Fix double completion in ufshcd_clear_lu_cmds()
In SDB mode, ufshcd_clear_lu_cmds() clears the request slot in the
controller and completes the request, but leaves its bit set in
hba->outstanding_reqs. ufshcd_poll() treats a request whose bit is set in
hba->outstanding_reqs and clear in the doorbell register as finished, so
the next ufshcd_poll() completes the same request again and unmaps its DMA
buffers twice.
Clear the bit with ufshcd_clear_outstanding_reqs() before completing the
request, and complete it only if the bit was still set. If ufshcd_poll()
has already completed the request, the bit is already clear and
ufshcd_clear_lu_cmds() skips it.
Fixes: f18fac1e2b72 ("scsi: ufs: core: Rework ufshcd_eh_device_reset_handler()")
Cc: stable@vger.kernel.org
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
Link: https://patch.msgid.link/20261022034443.3034432-4-stanleyjhu@google.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
