Commit abeded46 authored by Igor Pylypiv's avatar Igor Pylypiv Committed by Martin K. Petersen
Browse files

scsi: ata: libata-sata: Factor out NCQ Priority configuration helpers



Export libata NCQ Priority configuration helpers to be reused for libsas
managed SATA devices.

Switched locking from spin_lock_irq() to spin_lock_irqsave().  In the
future someone might call these helper functions when interrupts are
disabled. spin_unlock_irq() could lead to a premature re-enabling of
interrupts, whereas spin_unlock_irqrestore() restores the interrupt state
to its condition prior to the spin_lock_irqsave() call.

Acked-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarIgor Pylypiv <ipylypiv@google.com>
Link: https://lore.kernel.org/r/20240307214418.3812290-2-ipylypiv@google.com


Reviewed-by: default avatarNiklas Cassel <cassel@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4cece764
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment