Re: [PATCH v8 1/7] ata: libata-sata: Factor out NCQ Priority configuration helpers

From: Niklas Cassel
Date: Tue Mar 12 2024 - 11:37:56 EST


On Thu, Mar 07, 2024 at 01:44:12PM -0800, Igor Pylypiv wrote:
> 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@xxxxxxxxxx>
> Reviewed-by: Jason Yan <yanaijie@xxxxxxxxxx>
> Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
> Signed-off-by: Igor Pylypiv <ipylypiv@xxxxxxxxxx>
> ---

Reviewed-by: Niklas Cassel <cassel@xxxxxxxxxx>