Linux ATA/IDE development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Roman Gardzinski" <romanx.gardzinski@linux.intel.com>
Cc: linux-ide@vger.kernel.org, dlemoal@kernel.org, cassel@kernel.org
Subject: Re: [PATCH v1] ATA: ahci: Add Intel PCH-S RAID device ID
Date: Tue, 27 Oct 2026 14:22:27 +0000	[thread overview]
Message-ID: <sashiko-outbox-186720@kernel.org> (raw)
In-Reply-To: <20261027141240.7850-1-romanx.gardzinski@linux.intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] ata: ahci: Nova Lake PCH-S RAID entry uses legacy board_ahci_pcs_quirk
--

commit 2589d3b85f965fdaa155298cf5da322c956d8de2
Author: Roman Gardzinski <romanx.gardzinski@linux.intel.com>

ATA: ahci: Add Intel PCH-S RAID device ID

This commit adds the Intel Nova Lake PCH-S RAID PCI device ID (0x6e66) to
ahci_pci_tbl in drivers/ata/ahci.c.

> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index 3c38ee3314ee9..f4b6235452dbd 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -274,6 +274,10 @@ static const struct pci_device_id ahci_pci_tbl[] = {
>  		/* Comet Lake PCH-H RAID */
>  		PCI_VDEVICE(INTEL, 0x06d6),
>  		.driver_data = board_ahci_pcs_quirk,
> +	}, {
> +		/* Nova Lake PCH-S RAID */
> +		PCI_VDEVICE(INTEL, 0x6e66),
> +		.driver_data = board_ahci_pcs_quirk,

[Severity: High]
Should this new Nova Lake PCH-S RAID entry in ahci_pci_tbl use board_ahci
instead of board_ahci_pcs_quirk?

In drivers/ata/ahci.c, enum board_ids notes that board_ahci_pcs_quirk is
only for legacy Intel platforms:

	/*
	 * board_ahci_pcs_quirk is for legacy Intel platforms.
	 * Modern Intel platforms should use board_ahci instead.
	 * (Some modern Intel platforms might have been added with
	 * board_ahci_pcs_quirk, however, we cannot change them to board_ahci
	 * without testing that the platform actually works without the quirk.)
	 */
	board_ahci_pcs_quirk,

Using board_ahci_pcs_quirk sets AHCI_HFLAG_INTEL_PCS_QUIRK in
ahci_port_info[]. When the controller is probed, resumed, or reset via:

  ahci_init_one() / ahci_pci_device_runtime_resume() / ahci_pci_device_resume()
    -> ahci_pci_reset_controller()
      -> ahci_intel_pcs_quirk()

ahci_intel_pcs_quirk() reads and writes hpriv->port_map into the legacy
6-port PCS_6 PCI configuration register (offset 0x92):

	pci_read_config_word(pdev, PCS_6, &tmp16);
	if ((tmp16 & hpriv->port_map) != hpriv->port_map) {
		tmp16 |= hpriv->port_map;
		pci_write_config_word(pdev, PCS_6, tmp16);
	}

On modern Intel platforms (and PCH-S controllers where the legacy 6-port
PCS_6 layout does not apply), applying this quirk has previously caused
regressions that broke SATA drive detection, as seen in commit 7edbb6059274
and commit 9e2f46cd8747. When the same Nova Lake controller is in AHCI mode,
it matches PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) and uses
board_ahci.

Also, the commit message states "No functional changes", even though adding a
new PCI device ID enables driver binding for this hardware. Could the entry
be updated to use board_ahci and the commit message adjusted accordingly?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261027141240.7850-1-romanx.gardzinski@linux.intel.com?part=1

  reply	other threads:[~2026-10-27 14:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 14:12 [PATCH v1] ATA: ahci: Add Intel PCH-S RAID device ID Roman Gardzinski
2026-10-27 14:22 ` sashiko-bot [this message]
2026-10-27 15:29 ` 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=sashiko-outbox-186720@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=romanx.gardzinski@linux.intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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