Thread (5 messages) read the whole thread 5 messages, 3 authors, 2021-11-19

Re: [PATCH V2 2/2] scsi: ufs: core: Fix another task management completion race

From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-11-08 17:33:31

On 11/7/21 10:48 PM, Adrian Hunter wrote:
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.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help