Adrian Hunter 5cb37a2635 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.

Link: https://lore.kernel.org/r/20211108064815.569494-3-adrian.hunter@intel.com
Fixes: f5ef336fd2e4 ("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>
2021-11-16 19:42:32 -05:00
..
2021-10-16 21:45:54 -04:00
2020-03-11 23:07:59 -04:00
2021-11-05 08:42:02 -07:00
2021-11-05 08:42:02 -07:00
2021-11-05 08:42:02 -07:00
2021-11-05 08:42:02 -07:00
2021-11-05 08:42:02 -07:00
2021-11-05 08:42:02 -07:00
2021-11-05 08:42:02 -07:00
2021-11-12 12:25:50 -08:00
2021-11-05 08:42:02 -07:00
2021-01-22 21:14:08 -05:00
2021-01-22 21:14:07 -05:00
2021-01-22 21:14:08 -05:00
2020-03-11 23:07:59 -04:00
2021-11-05 08:42:02 -07:00
2021-10-16 21:45:55 -04:00
2020-09-02 22:49:06 -04:00
2021-10-16 21:45:56 -04:00
2021-04-13 00:20:48 -04:00
2020-12-07 20:24:09 -05:00
2021-10-16 21:29:15 -04:00
2021-10-16 21:45:57 -04:00
2021-10-16 21:45:57 -04:00
2020-12-07 20:24:09 -05:00
2021-05-21 16:59:33 -04:00
2021-10-29 06:50:52 -06:00
2021-11-12 12:25:50 -08:00
2021-03-24 23:03:43 -04:00
2021-11-12 12:25:50 -08:00
2021-11-12 12:25:50 -08:00
2021-11-12 12:25:50 -08:00
2021-11-05 08:42:02 -07:00
2021-11-05 08:42:02 -07:00
2021-11-05 08:42:02 -07:00
2021-10-29 06:50:52 -06:00
2021-11-12 12:25:50 -08:00
2020-02-24 15:01:57 -05:00
2021-10-29 06:50:52 -06:00
2021-08-23 12:54:30 -06:00
2021-11-05 08:42:02 -07:00
2021-04-13 00:20:48 -04:00
2021-11-05 08:42:02 -07:00