> Date: Sun, 16 Jun 2024 16:37:10 +0000
> From: Klemens Nanni <[email protected]>
>
> 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 -0000 1.17
> +++ sys/dev/pci/ahci_pci.c 15 Jun 2024 20:19:30 -0000
> @@ -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;
>
>
>