Re: Unchartevice 6640MA dmesg + AHCI MSI quirk

2024-06-16 Thread Theo de Raadt
And the big comment is correct.  It may not be this specific chip.
It's this specific chip on this specific machine.  Later on we
may know more, to identify the problem better.

Mark Kettenis  wrote:

> > Date: Sun, 16 Jun 2024 16:37:10 +
> > From: Klemens Nanni 
> > 
> > GENERIC cpu(4) fix and pcidevs have been committed.
> > Now only this ahci(4) quirk is pending to fix the SSD.
> > 
> > Neither Linux nor FreeBSD seem to have AHCI and/or MSI specific
> > quirks for this, but contrary to OpenBSD they can boot and use the
> > SSD.
> > 
> > Until there's a better way, this disabling MSI for that specific
> > AHCI controller like already done for specific Intel MacBooks make
> > snapshhots usable for me.
> > 
> > Feedback? Objection? OK?
> 
> Since other devices seem to work fine with MSI, this is the right fix.
> 
> ok kettenis@
> 
> > Index: sys/dev/pci/ahci_pci.c
> > ===
> > RCS file: /cvs/src/sys/dev/pci/ahci_pci.c,v
> > diff -u -p -r1.17 ahci_pci.c
> > --- sys/dev/pci/ahci_pci.c  24 May 2024 06:02:53 -  1.17
> > +++ sys/dev/pci/ahci_pci.c  15 Jun 2024 20:19:30 -
> > @@ -71,6 +71,8 @@ int   ahci_intel_attach(struct 
> > ahci_soft
> > struct pci_attach_args *);
> >  intahci_samsung_attach(struct ahci_softc *,
> > struct pci_attach_args *);
> > +intahci_storx_attach(struct ahci_softc *,
> > +   struct pci_attach_args *);
> >  
> >  static const struct ahci_device ahci_devices[] = {
> > { PCI_VENDOR_AMD,   PCI_PRODUCT_AMD_HUDSON2_SATA_1,
> > @@ -148,7 +150,10 @@ static const struct ahci_device ahci_dev
> > NULL,   ahci_samsung_attach },
> >  
> > { PCI_VENDOR_VIATECH,   PCI_PRODUCT_VIATECH_VT8251_SATA,
> > - ahci_no_match,ahci_vt8251_attach }
> > + ahci_no_match,ahci_vt8251_attach },
> > +
> > +   { PCI_VENDOR_ZHAOXIN,   PCI_PRODUCT_ZHAOXIN_STORX_AHCI,
> > + NULL, ahci_storx_attach },
> >  };
> >  
> >  intahci_pci_match(struct device *, void *, void *);
> > @@ -279,6 +284,19 @@ ahci_samsung_attach(struct ahci_softc *s
> >  * as the XP941 SSD controller.
> >  * https://bugzilla.kernel.org/show_bug.cgi?id=60731
> >  * https://bugzilla.kernel.org/show_bug.cgi?id=89171
> > +*/
> > +   sc->sc_flags |= AHCI_F_NO_MSI;
> > +
> > +   return (0);
> > +}
> > +
> > +int
> > +ahci_storx_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
> > +{
> > +   /*
> > +* Disable MSI with the ZX-100/ZX-200/ZX-E StorX AHCI Controller
> > +* in the Unchartevice 6640MA notebook, otherwise ahci(4) hangs
> > +* with SATA speed set to "Gen3" in BIOS.
> >  */
> > sc->sc_flags |= AHCI_F_NO_MSI;
> >  
> > 
> > 
> 



Re: Unchartevice 6640MA dmesg + AHCI MSI quirk

2024-06-16 Thread Mark Kettenis
> Date: Sun, 16 Jun 2024 16:37:10 +
> From: Klemens Nanni 
> 
> GENERIC cpu(4) fix and pcidevs have been committed.
> Now only this ahci(4) quirk is pending to fix the SSD.
> 
> Neither Linux nor FreeBSD seem to have AHCI and/or MSI specific
> quirks for this, but contrary to OpenBSD they can boot and use the
> SSD.
> 
> Until there's a better way, this disabling MSI for that specific
> AHCI controller like already done for specific Intel MacBooks make
> snapshhots usable for me.
> 
> Feedback? Objection? OK?

Since other devices seem to work fine with MSI, this is the right fix.

ok kettenis@

> Index: sys/dev/pci/ahci_pci.c
> ===
> RCS file: /cvs/src/sys/dev/pci/ahci_pci.c,v
> diff -u -p -r1.17 ahci_pci.c
> --- sys/dev/pci/ahci_pci.c24 May 2024 06:02:53 -  1.17
> +++ sys/dev/pci/ahci_pci.c15 Jun 2024 20:19:30 -
> @@ -71,6 +71,8 @@ int ahci_intel_attach(struct ahci_soft
>   struct pci_attach_args *);
>  int  ahci_samsung_attach(struct ahci_softc *,
>   struct pci_attach_args *);
> +int  ahci_storx_attach(struct ahci_softc *,
> + struct pci_attach_args *);
>  
>  static const struct ahci_device ahci_devices[] = {
>   { PCI_VENDOR_AMD,   PCI_PRODUCT_AMD_HUDSON2_SATA_1,
> @@ -148,7 +150,10 @@ static const struct ahci_device ahci_dev
>   NULL,   ahci_samsung_attach },
>  
>   { PCI_VENDOR_VIATECH,   PCI_PRODUCT_VIATECH_VT8251_SATA,
> -   ahci_no_match,ahci_vt8251_attach }
> +   ahci_no_match,ahci_vt8251_attach },
> +
> + { PCI_VENDOR_ZHAOXIN,   PCI_PRODUCT_ZHAOXIN_STORX_AHCI,
> +   NULL, ahci_storx_attach },
>  };
>  
>  int  ahci_pci_match(struct device *, void *, void *);
> @@ -279,6 +284,19 @@ ahci_samsung_attach(struct ahci_softc *s
>* as the XP941 SSD controller.
>* https://bugzilla.kernel.org/show_bug.cgi?id=60731
>* https://bugzilla.kernel.org/show_bug.cgi?id=89171
> +  */
> + sc->sc_flags |= AHCI_F_NO_MSI;
> +
> + return (0);
> +}
> +
> +int
> +ahci_storx_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
> +{
> + /*
> +  * Disable MSI with the ZX-100/ZX-200/ZX-E StorX AHCI Controller
> +  * in the Unchartevice 6640MA notebook, otherwise ahci(4) hangs
> +  * with SATA speed set to "Gen3" in BIOS.
>*/
>   sc->sc_flags |= AHCI_F_NO_MSI;
>  
> 
> 



Re: Unchartevice 6640MA dmesg + AHCI MSI quirk

2024-06-16 Thread Klemens Nanni
GENERIC cpu(4) fix and pcidevs have been committed.
Now only this ahci(4) quirk is pending to fix the SSD.

Neither Linux nor FreeBSD seem to have AHCI and/or MSI specific quirks for this,
but contrary to OpenBSD they can boot and use the SSD.

Until there's a better way, this disabling MSI for that specific AHCI controller
like already done for specific Intel MacBooks make snapshhots usable for me.

Feedback? Objection? OK?

Index: sys/dev/pci/ahci_pci.c
===
RCS file: /cvs/src/sys/dev/pci/ahci_pci.c,v
diff -u -p -r1.17 ahci_pci.c
--- sys/dev/pci/ahci_pci.c  24 May 2024 06:02:53 -  1.17
+++ sys/dev/pci/ahci_pci.c  15 Jun 2024 20:19:30 -
@@ -71,6 +71,8 @@ int   ahci_intel_attach(struct ahci_soft
struct pci_attach_args *);
 intahci_samsung_attach(struct ahci_softc *,
struct pci_attach_args *);
+intahci_storx_attach(struct ahci_softc *,
+   struct pci_attach_args *);
 
 static const struct ahci_device ahci_devices[] = {
{ PCI_VENDOR_AMD,   PCI_PRODUCT_AMD_HUDSON2_SATA_1,
@@ -148,7 +150,10 @@ static const struct ahci_device ahci_dev
NULL,   ahci_samsung_attach },
 
{ PCI_VENDOR_VIATECH,   PCI_PRODUCT_VIATECH_VT8251_SATA,
- ahci_no_match,ahci_vt8251_attach }
+ ahci_no_match,ahci_vt8251_attach },
+
+   { PCI_VENDOR_ZHAOXIN,   PCI_PRODUCT_ZHAOXIN_STORX_AHCI,
+ NULL, ahci_storx_attach },
 };
 
 intahci_pci_match(struct device *, void *, void *);
@@ -279,6 +284,19 @@ ahci_samsung_attach(struct ahci_softc *s
 * as the XP941 SSD controller.
 * https://bugzilla.kernel.org/show_bug.cgi?id=60731
 * https://bugzilla.kernel.org/show_bug.cgi?id=89171
+*/
+   sc->sc_flags |= AHCI_F_NO_MSI;
+
+   return (0);
+}
+
+int
+ahci_storx_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
+{
+   /*
+* Disable MSI with the ZX-100/ZX-200/ZX-E StorX AHCI Controller
+* in the Unchartevice 6640MA notebook, otherwise ahci(4) hangs
+* with SATA speed set to "Gen3" in BIOS.
 */
sc->sc_flags |= AHCI_F_NO_MSI;
 



Re: Unchartevice 6640MA dmesg + AHCI MSI quirk

2024-06-16 Thread Klemens Nanni
pcidevs alone, sorted (thanks jsg).

https://www.devicekb.com/hardware/pci-vendors/ven_1d17 shows
"ZX-100/ZX-200/ZX-E StorX AHCI Controller" wich is quite long.

There are a bunch of other unknown products on this machine, but so far only
the AHCI controller is needed to fix something, so I'm adding only that.

Feedback? OK?

Index: sys/dev/pci/pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
diff -u -p -r1.2076 pcidevs
--- sys/dev/pci/pcidevs 22 May 2024 16:24:59 -  1.2076
+++ sys/dev/pci/pcidevs 16 Jun 2024 14:21:16 -
@@ -346,6 +346,7 @@ vendor  SYMPHONY2   0x1c1c  Symphony Labs
 vendor SKHYNIX 0x1c5c  SK hynix
 vendor ADATA   0x1cc1  ADATA Technology
 vendor UMIS0x1cc4  Union Memory
+vendor ZHAOXIN 0x1d17  Zhaoxin
 vendor BAIKAL  0x1d39  Baikal Electronics
 vendor AQUANTIA0x1d6a  Aquantia
 vendor ROCKCHIP0x1d87  Rockchip
@@ -10038,6 +10039,9 @@ product YMTC PC005  0x1001  PC005
 
 /* Zeinet products */
 product ZEINET 12210x0001  1221
+
+/* Zhaoxin products */
+product ZHAOXIN STORX_AHCI 0x9083  StorX AHCI
 
 /* Ziatech products */
 product ZIATECH ZT8905 0x8905  PCI-ST32



Re: Unchartevice 6640MA dmesg + AHCI MSI quirk

2024-06-16 Thread Klemens Nanni
16.06.2024 05:50, Jonathan Gray пишет:
> MTRR is not set on ramdisk kernels, try the diff below

No change with your diff.

> Index: sys/arch/amd64/amd64/mtrr.c
> ===
> RCS file: /cvs/src/sys/arch/amd64/amd64/mtrr.c,v
> diff -u -p -r1.5 mtrr.c
> --- sys/arch/amd64/amd64/mtrr.c   3 Apr 2024 02:01:21 -   1.5
> +++ sys/arch/amd64/amd64/mtrr.c   16 Jun 2024 02:32:30 -
> @@ -49,7 +49,7 @@ mem_range_attach(void)
>   if ((ci->ci_vendor == CPUV_AMD ||
>ci->ci_vendor == CPUV_INTEL ||
>ci->ci_vendor == CPUV_VIA) && 
> - (family == 0x6 || family == 0xf) &&
> + (family >= 0x6) &&
>   cpu_feature & CPUID_MTRR) {
>   mem_range_softc.mr_op = 
>   }
> 



Re: Unchartevice 6640MA dmesg + AHCI MSI quirk

2024-06-16 Thread Klemens Nanni
16.06.2024 00:35, Klemens Nanni пишет:
> GENERIC and GENERIC_MP both hang with this diff after
>   cpu0: 4MB 64b/line 16-way L2 cache
> but I haven't looked into that yet.

brynet had the right idea, this diff makes it boot X, even VMM works
(I folded his indent/additional if into the existing one for brevity).


Index: arch/amd64/amd64/identcpu.c
===
RCS file: /cvs/src/sys/arch/amd64/amd64/identcpu.c,v
diff -u -p -r1.143 identcpu.c
--- arch/amd64/amd64/identcpu.c 14 May 2024 01:42:07 -  1.143
+++ arch/amd64/amd64/identcpu.c 16 Jun 2024 08:55:04 -
@@ -727,7 +727,8 @@ identifycpu(struct cpu_info *ci)
}
 
 #ifndef SMALL_KERNEL
-   if (CPU_IS_PRIMARY(ci) && (ci->ci_feature_tpmflags & TPM_SENSOR)) {
+   if (CPU_IS_PRIMARY(ci) && (ci->ci_feature_tpmflags & TPM_SENSOR) &&
+   ci->ci_vendor == CPUV_INTEL) {
ci->ci_sensor.type = SENSOR_TEMP;
sensor_task_register(ci, intelcore_update_sensor, 5);
sensor_attach(>ci_sensordev, >ci_sensor);



OpenBSD 7.5-current (GENERIC.MP) #1: Sun Jun 16 12:09:55 MSK 2024
kn@atar:/sys/arch/amd64/compile/GENERIC.MP
real mem = 8026165248 (7654MB)
avail mem = 7759757312 (7400MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.1 @ 0x9648a000 (37 entries)
bios0: vendor Byosoft version "R20" date 05/06/2022
bios0: IP3 Tech. ZEN1
efi0 at bios0: UEFI 2.6
efi0: Byosoft rev 0x1
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC UEFI HPET APIC MCFG DMAR FPDT BGRT
acpi0: wakeup devices PE0S(S4) PE4S(S4) PE5S(S4) PE6S(S4) PE7S(S4) USB0(S3) 
EHC1(S3) USB1(S3) USB2(S3) EHC2(S3) XHCI(S3) PS2M(S1) PS2K(S3) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: ZHAOXIN KaiXian KX-6640MA@2.2+GHz, 2594.85 MHz, 07-0b-00
cpu0: cpuid 1 
edx=bfcbfbff
 
ecx=77da63eb
cpu0: cpuid 6 eax=3 ecx=1
cpu0: cpuid 7.0 
ebx=c258b ecx=4 
edx=2000
cpu0: cpuid a vers=2, gp=4, gpwidth=48, ff=3, ffwidth=48
cpu0: cpuid d.1 eax=1
cpu0: cpuid 8001 edx=2c100800 
ecx=121
cpu0: cpuid 8007 edx=100
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: apic clock running at 99MHz
cpu0: RNG AES AES-CTR SHA1 SHA256 RSA
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: ZHAOXIN KaiXian KX-6640MA@2.2+GHz, 2594.86 MHz, 07-0b-00
cpu2 at mainbus0: apid 2 (application processor)
cpu2: ZHAOXIN KaiXian KX-6640MA@2.2+GHz, 2594.86 MHz, 07-0b-00
cpu3 at mainbus0: apid 3 (application processor)
cpu3: ZHAOXIN KaiXian KX-6640MA@2.2+GHz, 2594.90 MHz, 07-0b-00
ioapic0 at mainbus0: apid 9 pa 0xfec0, version 3, 24 pins
ioapic1 at mainbus0: apid 10 pa 0xfecc, version 3, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (NPE0)
acpiprt2 at acpi0: bus 2 (NPE4)
acpiprt3 at acpi0: bus 3 (NPE5)
acpiprt4 at acpi0: bus 4 (NPE6)
acpiprt5 at acpi0: bus 5 (NPE7)
acpiec0 at acpi0
acpipci0 at acpi0 PCI0: 0x0010 0x0011 0x
acpicmos0 at acpi0
acpibtn0 at acpi0: SLPB(wakeup)
acpibtn1 at acpi0: LID_
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT1 model "GN1S-140M-3S1P" serial YAEC3130G2000261 type 
Real oem "ZX SR 1"
acpibtn2 at acpi0: PWRB
acpicpu0 at acpi0: !C3(500@80 io@0x815), !C2(750@50 io@0x814), C1(1000@1 halt), 
PSS
acpicpu1 at acpi0: !C3(500@80 io@0x815), !C2(750@50 io@0x814), C1(1000@1 halt), 
PSS
acpicpu2 at acpi0: !C3(500@80 io@0x815), !C2(750@50 io@0x814), C1(1000@1 halt), 
PSS
acpicpu3 at acpi0: !C3(500@80 io@0x815), !C2(750@50 io@0x814), C1(1000@1 halt), 
PSS
acpipwrres0 at acpi0: PWR0
acpivideo0 at acpi0: EUMA
acpivout0 at acpivideo0: EDP1
cpu0: Enhanced SpeedStep 2594 MHz: speeds: 2600, 2200, 1800, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 vendor "Zhaoxin", unknown product 0x1003 rev 0x80
pchb1 at pci0 dev 0 function 1 vendor "Zhaoxin", unknown product 0x31b0 rev 0x04
pchb2 at pci0 dev 0 function 2 vendor "Zhaoxin", unknown product 0x31b1 rev 0x04
pchb3 at pci0 dev 0 function 3 vendor "Zhaoxin", unknown product 0x31b2 rev 0x04
pchb4 at pci0 dev 0 function 4 vendor "Zhaoxin", unknown product 0x31b3 rev 0x04
pchb5 at pci0 dev 0 function 5 vendor "Zhaoxin", unknown product 0x31b4 rev 0x04
pchb6 at pci0 dev 0 function 6 vendor "Zhaoxin", unknown product 0x31b5 rev 0x04
vendor "Zhaoxin", unknown product 0x3a04 (class display subclass VGA, rev 0x00) 
at pci0 dev 1 function 0 not configured
azalia0 at pci0 dev 1 function 1 vendor "Zhaoxin", unknown product 0x9144 rev 
0x00: msi
azalia0: codecs: Zhaoxin/0x9f8a, Zhaoxin/0x9f8b
audio0 at azalia0
audio1 at azalia0
ppb0 at pci0 dev 3 function 0 vendor "Zhaoxin", unknown product 

Re: Unchartevice 6640MA dmesg + AHCI MSI quirk

2024-06-15 Thread Jonathan Gray
On Sat, Jun 15, 2024 at 09:35:30PM +, Klemens Nanni wrote:
> GENERIC and GENERIC_MP both hang with this diff after
>   cpu0: 4MB 64b/line 16-way L2 cache
> but I haven't looked into that yet.

...

> cpu0: ZHAOXIN KaiXian KX-6640MA@2.2+GHz, 2594.84 MHz, 07-0b-00

MTRR is not set on ramdisk kernels, try the diff below

Index: sys/arch/amd64/amd64/mtrr.c
===
RCS file: /cvs/src/sys/arch/amd64/amd64/mtrr.c,v
diff -u -p -r1.5 mtrr.c
--- sys/arch/amd64/amd64/mtrr.c 3 Apr 2024 02:01:21 -   1.5
+++ sys/arch/amd64/amd64/mtrr.c 16 Jun 2024 02:32:30 -
@@ -49,7 +49,7 @@ mem_range_attach(void)
if ((ci->ci_vendor == CPUV_AMD ||
 ci->ci_vendor == CPUV_INTEL ||
 ci->ci_vendor == CPUV_VIA) && 
-   (family == 0x6 || family == 0xf) &&
+   (family >= 0x6) &&
cpu_feature & CPUID_MTRR) {
mem_range_softc.mr_op = 
}



Re: Unchartevice 6640MA dmesg + AHCI MSI quirk

2024-06-15 Thread Klemens Nanni
16.06.2024 01:02, Mark Kettenis пишет:
> MSIs work for the other devices (e.g. iwm(4) or xhci(4))?

install75.img via USB 3.x, loading iwm-firmware from and 'ping 1.1.1.1'
over iwx0 in an installer shell worked, so I guess that means yes:

>> iwm0 at pci4 dev 0 function 0 "Intel AC 7265" rev 0x59, msi

>> ahci0 at pci0 dev 15 function 0 unknown vendor 0x1d17 product 0x9083 rev 
>> 0x01: msi, AHCI 1.3.1

>> xhci0 at pci0 dev 18 function 0 unknown vendor 0x1d17 product 0x9204 rev 
>> 0x00: msi, xHCI 1.10
>> usb1 at xhci0: USB revision 3.0
>> uhub1 at usb1 configuration 1 interface 0 "vendor 0x1d17 xHCI root hub" rev 
>> 3.00/1.00 addr 1
>> ...
>> umass0 at uhub1 port 3 configuration 1 interface 0 "USB SanDisk 3.2Gen1" rev 
>> 3.20/1.00 addr 3
>> umass0: using SCSI over Bulk-Only
>> scsibus1 at umass0: 2 targets, initiator 0
>> sd0 at scsibus1 targ 1 lun 0:  removable 
>> serial.07815583810735aa43ca
>> sd0: 29340MB, 512 bytes/sector, 60088320 sectors



Re: Unchartevice 6640MA dmesg + AHCI MSI quirk

2024-06-15 Thread Mark Kettenis
> Date: Sat, 15 Jun 2024 21:35:30 +
> From: Klemens Nanni 
> 
> Unchartevice 6640MA notebook with amd64 ZHAOXIN KaiXian KX-6640MA CPU.
> 
> https://unchartevice.ru
> https://www.devicekb.com/hardware/pci-vendors/ven_1d17-dev_9083
> 
> BIOS one of three SATA speed modes:
> - Gen1/2: bsd.rd reaches installer, but SSD does not attach
>   ahci0: device not communicating on port 0
> - Gen3:   bsd.rd attaches SSD and hangs after
>   scsibus2 at softraid0: 256 targets
> 
> Diff below adds PCI IDs and disables MSI for the AHCI controller,
> then bsd.rd attaches the SSD and successfully installs to it:
> 
> |@@
> |-ahci0 at pci0 dev 15 function 0 unknown vendor 0x1d17 product 0x9083 rev 
> 0x01: msi, AHCI 1.3.1
> |-ahci0: device not communicating on port 0
> |+ahci0 at pci0 dev 15 function 0 "Zhaoxin StorX AHCI" rev 0x01: apic 9 int 
> 21, AHCI 1.3.1
> |+ahci0: port 0: 6.0Gb/s
> | scsibus0 at ahci0: 32 targets
> |+sd0 at scsibus0 targ 0 lun 0:  naa.5000
> |+sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
> |@@
> |-sd0 at scsibus1 targ 1 lun 0:  removable 
> serial.07815583810735aa43ca
> |-sd0: 29340MB, 512 bytes/sector, 60088320 sectors
> |+sd1 at scsibus1 targ 1 lun 0:  removable 
> serial.07815583810735aa43ca
> |+sd1: 29340MB, 512 bytes/sector, 60088320 sectors
> 
> Feedback? Objection? OK? on either pcidevs or ahci?

MSIs work for the other devices (e.g. iwm(4) or xhci(4))?

> GENERIC and GENERIC_MP both hang with this diff after
>   cpu0: 4MB 64b/line 16-way L2 cache
> but I haven't looked into that yet.
> 
> 
> Index: dev/pci/pcidevs
> ===
> RCS file: /cvs/src/sys/dev/pci/pcidevs,v
> diff -u -p -r1.2076 pcidevs
> --- dev/pci/pcidevs   22 May 2024 16:24:59 -  1.2076
> +++ dev/pci/pcidevs   15 Jun 2024 20:11:14 -
> @@ -352,6 +352,7 @@ vendorROCKCHIP0x1d87  Rockchip
>  vendor   LONGSYS 0x1d97  Longsys
>  vendor   TEKRAM2 0x1de1  Tekram
>  vendor   AMPERE  0x1def  Ampere
> +vendor   ZHAOXIN 0x1d17  Zhaoxin
>  vendor   KIOXIA  0x1e0f  Kioxia
>  vendor   YMTC0x1e49  YMTC
>  vendor   SSSTC   0x1e95  SSSTC
> @@ -10038,6 +10039,9 @@ product YMTC PC0050x1001  PC005
>  
>  /* Zeinet products */
>  product ZEINET 1221  0x0001  1221
> +
> +/* Zhaoxin products */
> +product ZHAOXIN STORX_AHCI   0x9083  StorX AHCI
>  
>  /* Ziatech products */
>  product ZIATECH ZT8905   0x8905  PCI-ST32
> Index: dev/pci/ahci_pci.c
> ===
> RCS file: /cvs/src/sys/dev/pci/ahci_pci.c,v
> diff -u -p -r1.17 ahci_pci.c
> --- dev/pci/ahci_pci.c24 May 2024 06:02:53 -  1.17
> +++ dev/pci/ahci_pci.c15 Jun 2024 20:19:30 -
> @@ -71,6 +71,8 @@ int ahci_intel_attach(struct ahci_soft
>   struct pci_attach_args *);
>  int  ahci_samsung_attach(struct ahci_softc *,
>   struct pci_attach_args *);
> +int  ahci_storx_attach(struct ahci_softc *,
> + struct pci_attach_args *);
>  
>  static const struct ahci_device ahci_devices[] = {
>   { PCI_VENDOR_AMD,   PCI_PRODUCT_AMD_HUDSON2_SATA_1,
> @@ -148,7 +150,10 @@ static const struct ahci_device ahci_dev
>   NULL,   ahci_samsung_attach },
>  
>   { PCI_VENDOR_VIATECH,   PCI_PRODUCT_VIATECH_VT8251_SATA,
> -   ahci_no_match,ahci_vt8251_attach }
> +   ahci_no_match,ahci_vt8251_attach },
> +
> + { PCI_VENDOR_ZHAOXIN,   PCI_PRODUCT_ZHAOXIN_STORX_AHCI,
> +   NULL, ahci_storx_attach },
>  };
>  
>  int  ahci_pci_match(struct device *, void *, void *);
> @@ -279,6 +284,19 @@ ahci_samsung_attach(struct ahci_softc *s
>* as the XP941 SSD controller.
>* https://bugzilla.kernel.org/show_bug.cgi?id=60731
>* https://bugzilla.kernel.org/show_bug.cgi?id=89171
> +  */
> + sc->sc_flags |= AHCI_F_NO_MSI;
> +
> + return (0);
> +}
> +
> +int
> +ahci_storx_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
> +{
> + /*
> +  * Disable MSI with the ZX-100/ZX-200/ZX-E StorX AHCI Controller
> +  * in the Unchartevice 6640MA notebook, otherwise ahci(4) hangs
> +  * with SATA speed set to "Gen3" in BIOS.
>*/
>   sc->sc_flags |= AHCI_F_NO_MSI;
>  
> 
> 
> OpenBSD 7.5-current (RAMDISK_CD) #127: Fri Jun 14 09:55:04 MDT 2024
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
> real mem = 8026165248 (7654MB)
> avail mem = 7778664448 (7418MB)
> random: good seed from bootblocks
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.1 @ 0x9648a000 (37 entries)
> bios0: vendor Byosoft version "R20" date 05/06/2022
> bios0: IP3 Tech. ZEN1
> acpi0 at bios0: ACPI 6.0
> acpi0: tables DSDT FACP SLIC UEFI HPET APIC MCFG DMAR FPDT BGRT
>