Re: [PATCH v=2] ata: libata-scsi: fix requeue of deferred ATA PASS-THROUGH commands

From: Niklas Cassel

Date: Sun Apr 12 2026 - 14:11:47 EST


On Sun, 12 Apr 2026 08:36:37 -0700, Igor Pylypiv wrote:
> Commit 0ea84089dbf6 ("ata: libata-scsi: avoid Non-NCQ command starvation")
> introduced ata_scsi_requeue_deferred_qc() to handle commands deferred
> during resets or NCQ failures. This deferral logic completed commands
> with DID_SOFT_ERROR to trigger a retry in the SCSI mid-layer.
>
> However, DID_SOFT_ERROR is subject to scsi_cmd_retry_allowed() checks.
> ATA PASS-THROUGH commands sent via SG_IO ioctl have scmd->allowed set
> to zero. This causes the mid-layer to fail the command immediately
> instead of retrying, even though the command was never actually issued
> to the hardware.
>
> [...]

Hello Igor,

Considering that Linus is expected for release 7.0 any minute now (it is
already Sunday afternoon), it seems too late to send this as a PR for 7.0.

The fix will have to be backported to v7.0 stable instead.

Therefore, I rebased your patch on libata/for-next
(without any parens - the comment from Sergey).


Applied to libata/linux.git (for-7.1), thanks!

[1/1] ata: libata-scsi: fix requeue of deferred ATA PASS-THROUGH commands
https://git.kernel.org/libata/linux/c/8ebf408e

Kind regards,
Niklas