public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Ruslan Valiyev <linuxoid@gmail.com>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ata: ahci: Add AMD 600 Series Chipset SATA Controller (0x43f6)
Date: Tue, 10 Mar 2026 18:27:27 +0100	[thread overview]
Message-ID: <abBUdlxKa4DpVsPI@ryzen> (raw)
In-Reply-To: <20260310154956.743071-1-linuxoid@gmail.com>

Hello Ruslan,

On Tue, Mar 10, 2026 at 03:49:56PM +0000, Ruslan Valiyev wrote:
> Add PCI ID 0x43f6 for the AMD 600 Series Chipset (B850/X870) SATA
> controller to ahci_pci_tbl. Without this entry, the AHCI driver does
> not bind to the controller and SATA devices are invisible at boot.
> 
> Users can work around the issue with:
>   echo "1022 43f6" > /sys/bus/pci/drivers/ahci/new_id
> 
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221193
> Signed-off-by: Ruslan Valiyev <linuxoid@gmail.com>
> ---
>  drivers/ata/ahci.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index 931d0081169b9..a4935f9b80789 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -466,6 +466,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
>  	{ PCI_VDEVICE(AMD, 0x7801), board_ahci_no_debounce_delay }, /* AMD Hudson-2 (AHCI mode) */
>  	{ PCI_VDEVICE(AMD, 0x7900), board_ahci }, /* AMD CZ */
>  	{ PCI_VDEVICE(AMD, 0x7901), board_ahci }, /* AMD Green Sardine */
> +	{ PCI_VDEVICE(AMD, 0x43f6), board_ahci }, /* AMD 600 Series Chipset */
>  	/* AMD is using RAID class only for ahci controllers */
>  	{ PCI_VENDOR_ID_AMD, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
>  	  PCI_CLASS_STORAGE_RAID << 8, 0xffffff, board_ahci },

The AHCI driver already has these two entries:

        /* AMD is using RAID class only for ahci controllers */
        { PCI_VENDOR_ID_AMD, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
          PCI_CLASS_STORAGE_RAID << 8, 0xffffff, board_ahci },

and

        /* Generic, PCI class code for AHCI */
        { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
          PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },


If the ahci driver fails to bind, that means that the class code for this
AMD AHCI contorller is
not PCI_CLASS_STORAGE_RAID and is not PCI_CLASS_STORAGE_SATA_AHCI.


I'm honestly curious... what is the PCI class code of this controller then? :)

My AMD AHCI controller is:
$ lspci -v | grep AHCI
6a:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset SATA Controller (rev 01) (prog-if 01 [AHCI 1.0])

$ sudo lspci -nnvs 6a:00.0
6a:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset SATA Controller [1022:43f6] (rev 01) (prog-if 01 [AHCI 1.0])
        Subsystem: ASMedia Technology Inc. Device [1b21:1062]
        Flags: bus master, fast devsel, latency 0, IRQ 48, IOMMU group 20
        Memory at 81080000 (32-bit, non-prefetchable) [size=1K]
        Expansion ROM at 81000000 [disabled] [size=512K]
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [70] Power Management version 3
        Capabilities: [80] Express Legacy Endpoint, IntMsgNum 0
        Capabilities: [100] Advanced Error Reporting
        Kernel driver in use: ahci


include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_SCSI          0x0100
include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_IDE           0x0101
include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_FLOPPY        0x0102
include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_IPI           0x0103
include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_RAID          0x0104
include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_SATA          0x0106
include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_SATA_AHCI     0x010601
include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_SAS           0x0107
include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_EXPRESS       0x010802
include/linux/pci_ids.h:#define PCI_CLASS_STORAGE_OTHER         0x0180


Kind regards,
Niklas

  reply	other threads:[~2026-03-10 17:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 15:49 [PATCH] ata: ahci: Add AMD 600 Series Chipset SATA Controller (0x43f6) Ruslan Valiyev
2026-03-10 17:27 ` Niklas Cassel [this message]
2026-03-10 18:29   ` Ruslan Valiyev

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=abBUdlxKa4DpVsPI@ryzen \
    --to=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxoid@gmail.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