public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ata: ahci: Add AMD 600 Series Chipset SATA Controller (0x43f6)
@ 2026-03-10 15:49 Ruslan Valiyev
  2026-03-10 17:27 ` Niklas Cassel
  0 siblings, 1 reply; 3+ messages in thread
From: Ruslan Valiyev @ 2026-03-10 15:49 UTC (permalink / raw)
  To: Damien Le Moal, Niklas Cassel; +Cc: linux-ide, linux-kernel, Ruslan Valiyev

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 },
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ata: ahci: Add AMD 600 Series Chipset SATA Controller (0x43f6)
  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
  2026-03-10 18:29   ` Ruslan Valiyev
  0 siblings, 1 reply; 3+ messages in thread
From: Niklas Cassel @ 2026-03-10 17:27 UTC (permalink / raw)
  To: Ruslan Valiyev; +Cc: Damien Le Moal, linux-ide, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ata: ahci: Add AMD 600 Series Chipset SATA Controller (0x43f6)
  2026-03-10 17:27 ` Niklas Cassel
@ 2026-03-10 18:29   ` Ruslan Valiyev
  0 siblings, 0 replies; 3+ messages in thread
From: Ruslan Valiyev @ 2026-03-10 18:29 UTC (permalink / raw)
  To: cassel; +Cc: dlemoal, linux-ide, linux-kernel, Ruslan Valiyev

On Tue, Mar 10, 2026 at 05:27:PM +0000, Niklas Cassel wrote:
> If the ahci driver fails to bind, that means that the class code for
> this AMD AHCI controller is not PCI_CLASS_STORAGE_RAID and is not
> PCI_CLASS_STORAGE_SATA_AHCI. I am honestly curious... what is the PCI
> class code of this controller then? :)

That is exactly the right question, and I should have asked it before
sending this patch.

I based this on a bugzilla report where the user confirmed the new_id
workaround works, but I did not ask for lspci -nnvs output first. I
do not have the class code from the affected system, which means I cannot
justify the patch as-is.

I will go back to the reporter and get the full lspci output. If the
prog-if differs from yours (e.g. 0x00 instead of 0x01), I will resubmit
with proper justification. If not, I will drop it.

Sorry for the noise.

Ruslan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-10 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-03-10 18:29   ` Ruslan Valiyev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox