]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: ufs: core: Handle MCQ IAG events
authorvamshi gajjela <vamshigajjela@google.com>
Tue, 10 Mar 2026 19:03:08 +0000 (00:33 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Mar 2026 01:37:09 +0000 (21:37 -0400)
commit98eff361647ecba893aadce8808729672604a102
treec42fa301bd17d4af8752c6a51dff316987d08347
parentbdce3a69c578090dd5e3c77bcdaaca10c3a41e34
scsi: ufs: core: Handle MCQ IAG events

Add support for handling aggregation-based interrupts when operating in MCQ
mode.

In legacy interrupt mode, an IE.IAGES is triggered when the counter or
timer threshold is reached. To manage this, the handler now resets the
aggregation counter and timer by writing to the MCQIACRy.CTR register.

Since the register layout of MCQIACRy is identical to the existing UTRIACR
register, this implementation reuses the previously defined bitfield masks
to maintain consistency and reduce code duplication.

Extend ufshcd_handle_mcq_cq_events() with a boolean iag parameter.  If set,
the handler resets the MCQ IAG counter and timer.

Define MCQ_IAG_EVENT_STATUS (0x200000) and include it in
UFSHCD_ENABLE_MCQ_INTRS to ensure the interrupt is unmasked during
initialization.

Signed-off-by: Vamshi Gajjela <vamshigajjela@google.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260310190308.2474956-1-vamshigajjela@google.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufs-mcq.c
drivers/ufs/core/ufshcd-priv.h
drivers/ufs/core/ufshcd.c
include/ufs/ufshci.h