Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Niklas Cassel <cassel@kernel.org>, Tommy Kelly <linux@tkel.ly>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	John Garry <john.g.garry@oracle.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH v3 2/2] ata: libata-scsi: do not needlessly defer commands when using PMP with FBS
Date: Tue, 12 May 2026 11:01:42 +0900	[thread overview]
Message-ID: <cc742ac4-4278-4546-be6e-07b74f1be979@kernel.org> (raw)
In-Reply-To: <20260508195051.188207-6-cassel@kernel.org>

On 5/9/26 04:50, Niklas Cassel wrote:
> The SATA specification does not allow a non-NCQ command to be issued while
> an NCQ command is outstanding.
> 
> Commit 0ea84089dbf6 ("ata: libata-scsi: avoid Non-NCQ command starvation")
> introduced a feature where a deferred non-NCQ command gets issued from a
> workqueue. The design stores a single non-NCQ command per port.
> 
> However, when using Port Multipliers (PMPs), specifically PMPs that
> support FIS-Based Switching (FBS), non-NCQ and NCQ commands can be mixed
> on the same port, just not for the same link, see e.g. ata_std_qc_defer()
> which is, and always has operated on a per-link basis.
> 
> Therefore, move the deferred_qc from struct ata_port to struct ata_link.
> This way, when using a PMP with FBS, we will not needlessly defer commands
> to all other links, just because one link issued a non-NCQ command while
> having an NCQ command outstanding. Only commands for that specific link
> will be deferred.
> 
> Fixes: 0ea84089dbf6 ("ata: libata-scsi: avoid Non-NCQ command starvation")
> Signed-off-by: Niklas Cassel <cassel@kernel.org>

Looks OK. However Tommy did see a warning, so I wonder if we still have
something missing...

Nevertheless,

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2026-05-12  2:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 19:50 [PATCH v3 0/2] ata: fix deferred QC handling for port multipliers Niklas Cassel
2026-05-08 19:50 ` [PATCH v3 1/2] ata: libata-scsi: do not use the deferred QC feature on PMPs with CBS Niklas Cassel
2026-05-08 19:50 ` [PATCH v3 2/2] ata: libata-scsi: do not needlessly defer commands when using PMP with FBS Niklas Cassel
2026-05-12  2:01   ` Damien Le Moal [this message]
2026-05-12  2:41     ` Tommy Kelly
2026-05-12  7:42       ` Damien Le Moal
2026-05-12  0:25 ` [PATCH v3 0/2] ata: fix deferred QC handling for port multipliers Tommy Kelly
2026-05-12  1:58 ` Damien Le Moal
2026-05-12 10:37   ` Niklas Cassel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc742ac4-4278-4546-be6e-07b74f1be979@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=cassel@kernel.org \
    --cc=john.g.garry@oracle.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux@tkel.ly \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox