Files
linux/drivers
Adrian Hunter 5f9614157c UPSTREAM: scsi: ufs: core: Fix another task management completion race
hba->outstanding_tasks, which is read under host_lock spinlock, tells the
interrupt handler what task management tags are in use by the driver.  The
doorbell register bits indicate which tags are in use by the hardware.  A
doorbell bit that is 0 is because the bit has yet to be set by the driver,
or because the task is complete. It is only possible to disambiguate the 2
cases, if reading/writing the doorbell register is synchronized with
reading/writing hba->outstanding_tasks.

For that reason, reading REG_UTP_TASK_REQ_DOOR_BELL must be done under
spinlock.

Bug: 210094292
(cherry picked from commit 5cb37a2635)
Change-Id: I9a83393fe97682a271ec67834dc2d2888d3fbb60
Link: https://lore.kernel.org/r/20211108064815.569494-3-adrian.hunter@intel.com
Fixes: f5ef336fd2 ("scsi: ufs: core: Fix task management completion")
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
2021-12-14 09:55:06 +00:00
..
2021-09-15 09:50:26 +02:00
2021-08-27 20:51:37 +02:00
2021-09-15 09:50:30 +02:00
2021-07-20 16:05:42 +02:00
2021-09-15 14:16:47 +02:00
2021-07-14 16:55:53 +02:00
2021-09-15 14:16:47 +02:00
2021-09-15 14:16:47 +02:00
2021-07-14 17:35:23 +02:00
2021-09-03 10:51:56 +02:00
2021-09-15 14:16:47 +02:00
2021-08-26 08:35:46 -04:00
2021-07-28 15:23:47 +02:00
2021-05-20 15:35:25 +02:00
2021-07-25 15:37:14 +02:00
2021-09-15 14:16:47 +02:00
2021-09-15 14:16:47 +02:00