]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ata: libata-scsi: refactor ata_scsi_translate()
authorDamien Le Moal <dlemoal@kernel.org>
Wed, 17 Dec 2025 05:05:25 +0000 (14:05 +0900)
committerDamien Le Moal <dlemoal@kernel.org>
Tue, 13 Jan 2026 12:57:26 +0000 (21:57 +0900)
commitbb3a8154b1a1dc2c86d037482c0a2cf9186829ed
tree871fac5065a66839d2370fa5e8f54be0ff365a24
parent97e01439e902b743b8f89497e9c144e3ddda5e59
ata: libata-scsi: refactor ata_scsi_translate()

Factor out of ata_scsi_translate() the code handling queued command
deferral using the port qc_defer callback and issuing the queued
command with ata_qc_issue() into the new function ata_scsi_qc_issue(),
and simplify the goto used in ata_scsi_translate().
While at it, also add a lockdep annotation to check that the port lock
is held when ata_scsi_translate() is called.

No functional changes.

Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
drivers/ata/libata-scsi.c