]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: ufs: core: Set and clear UIC Completion interrupt as needed
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 23 Jul 2025 16:58:54 +0000 (19:58 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Jul 2025 02:37:30 +0000 (22:37 -0400)
commitb4c0cab4eb8d79cf426ac7bca20864881c8b9b8b
tree768b30bf4ee80ac45cd6a30ca3ff7ba1b7d82c91
parentc5977c4c0731b60c8c0b3f7cc4b0082a688a07f8
scsi: ufs: core: Set and clear UIC Completion interrupt as needed

Currently the UIC Completion interrupt is left enabled except for when
issuing link hibernate commands, in which case the interrupt is disabled
and then re-enabled.

Instead, set and clear the interrupt enable bit as needed.

That is slightly simpler and less error prone, but also avoids side
effects of accessing the interrupt enable register after entering link
hibernation.  Specifically, for some host controllers like Intel MTL,
doing so disrupts the link state transition.

Note also, the interrupt register is not read back anymore after it is
updated.  No other code does that, so it is assumed to be no longer
necessary if it ever was.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250723165856.145750-7-adrian.hunter@intel.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c