[Bug 272507] SATA drives show in BIOS but won't show in /dev

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 14 Jul 2023 19:40:37 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272507

            Bug ID: 272507
           Summary: SATA drives show in BIOS but won't show in /dev
           Product: Base System
           Version: 13.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: justin@tocci.org

I have a new X670E Steel Legend motherboard and it's been working fine with
SSDs for a couple months now but I never looked closely at dmesg until we tried
to get the backups set up a few days ago. 
SATA drives won't show in /dev but show up fine in BIOS.


Here is a forum thread where others have posted info, some of which I will
reproduce here.
https://forums.freebsd.org/threads/sata-drives-show-in-bios-but-wont-show-in-dev.89656/#post-616205

Dmesg output:
...
acpi0: <ALASKA A M I >
Firmware Error (ACPI): Failure creating named object [\134_SB.PCI0.GPP0._PRW],
AE_ALREADY_EXISTS (20201113/dswload2-480)
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog
(20201113/psobject-372)
...
pcib2: <ACPI PCI-PCI bridge> at device 2.1 on pci0
pcib2: failed to allocate initial memory window: 0xfbe00000-0xfc8fffff
...
ahci1: <AHCI SATA controller> at device 0.0 on pci18
ahci1: 0x400 bytes of rid 0x24 res 3 failed (0, 0xffffffffffffffff).

full dmesg is at forum link above.

pciconf -lv output:
none3@pci0:18:0:0:      class=0x010601 rev=0x01 hdr=0x00 vendor=0x1022
device=0x43f6 subvendor=0x1b21 subdevice=0x1062
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    class      = mass storage
    subclass   = SATA
...
ahci0@pci0:20:0:0:      class=0x010601 rev=0x01 hdr=0x00 vendor=0x1022
device=0x43f6 subvendor=0x1b21 subdevice=0x1062
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    class      = mass storage
    subclass   = SATA

full output at forum link above

pciconf -lb pci0:18:0:0 output:
none0@pci0:18:0:0:      class=0x010601 rev=0x01 hdr=0x00 vendor=0x1022
device=0x43f6 subvendor=0x1b21 subdevice=0x1062
    bar   [24] = type Memory, range 32, base 0xfbe80000, size 1024, enabled

pciconf -lb pci0:20:0:0 output:
ahci0@pci0:20:0:0:      class=0x010601 rev=0x01 hdr=0x00 vendor=0x1022
device=0x43f6 subvendor=0x1b21 subdevice=0x1062
    bar   [24] = type Memory, range 32, base 0xfc580000, size 1024, enabled

I have updated bios from 1.11 (shipped) to 1.24 (latest non-beta available) and
the issue persists.

A kind gentleman in the forum posted this explanation:
The current (as in git head) ahci driver source code shows AMD devices up to
0x43b6, but doesn't cover 0x43f6 and shouldn't be attaching to it.

Another gentleman chimed in with:
Not really correct. It does not show up in the table of "known devices", but
it's not required given the code in ahci_probe():
Code:
        /* Is this a possible AHCI candidate? */
        if (pci_get_class(dev) == PCIC_STORAGE &&
            pci_get_subclass(dev) == PCIS_STORAGE_SATA &&
            pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0)
                valid = 1;
        else if (pci_get_class(dev) == PCIC_STORAGE &&
            pci_get_subclass(dev) == PCIS_STORAGE_RAID)
                valid = 2;

...and a third gentleman said to file a bug report. 

I will try to be responsive to all requests. If you need physical access to the
machine contact me and we will do what we can.

-- 
You are receiving this mail because:
You are the assignee for the bug.