]> www.infradead.org Git - users/hch/block.git/commit
scsi: ata: libata-sata: Factor out NCQ Priority configuration helpers
authorIgor Pylypiv <ipylypiv@google.com>
Thu, 7 Mar 2024 21:44:12 +0000 (13:44 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 25 Mar 2024 20:00:06 +0000 (16:00 -0400)
commitabeded46bc1922e2249f6665654b5d81e7c5e1f1
tree821593b66281a2f6dde49335a3e869a4c180038e
parent4cece764965020c22cff7665b18a012006359095
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: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Link: https://lore.kernel.org/r/20240307214418.3812290-2-ipylypiv@google.com
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ata/libata-sata.c
include/linux/libata.h