Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock()

Document the aspects of ufshcd_mcq_compl_all_cqes_lock() that are
nontrivial in a comment block above this function.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Link: https://patch.msgid.link/20260401202506.1445324-2-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
1373df88 1821f77f

+8
+8
drivers/ufs/core/ufs-mcq.c
··· 322 322 } 323 323 } 324 324 325 + /* 326 + * This function is called from the UFS error handler with the UFS host 327 + * controller disabled (HCE = 0). Reading host controller registers, e.g. the 328 + * CQ tail pointer (CQTPy), may not be safe with the host controller disabled. 329 + * Hence, iterate over all completion queue entries. This won't result in 330 + * double completions because ufshcd_mcq_process_cqe() clears a CQE after it 331 + * has been processed. 332 + */ 325 333 void ufshcd_mcq_compl_all_cqes_lock(struct ufs_hba *hba, 326 334 struct ufs_hw_queue *hwq) 327 335 {