On Mon, Feb 06, 2023 at 10:04:10AM -0800, Logan Ellis wrote:
> Hi Jonathan,
> 
> Wanted to provide update: I was able to build a release image from source 
> using another amd64 VM and I incorporated your changes. The disk is now 
> detected by the installer using `sysctl hw.disknames`. `fdisk -g sd0` gave 
> “error writing GPT” when attempting to partition the drive (after running 
> `MAKEDEV` for the corresponding sd0 device). I also attempted to write a GPT 
> to disk using Apple’s Disk Utilities from a recovery boot ahead of time, but 
> that did not appear to have any impact either.
> 
> One thing I did note: the duid in disk label for the sd0 device was all zeros 
> (I’ll attach the logs). Not sure if that’s relevant.
> 
> This is a bit out of my realm of expertise at this point. Is there anything 
> else obvious that I might be missing? Thanks again for your help thus far. 
> Dmesg and disklabel to follow. 

requires a different submission queue size according to linux

Index: sys/dev/ic/nvme.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/nvme.c,v
retrieving revision 1.106
diff -u -p -r1.106 nvme.c
--- sys/dev/ic/nvme.c   25 Nov 2022 03:20:09 -0000      1.106
+++ sys/dev/ic/nvme.c   7 Feb 2023 01:40:54 -0000
@@ -232,7 +232,11 @@ nvme_enable(struct nvme_softc *sc)
 
        CLR(cc, NVME_CC_IOCQES_MASK | NVME_CC_IOSQES_MASK | NVME_CC_SHN_MASK |
            NVME_CC_AMS_MASK | NVME_CC_MPS_MASK | NVME_CC_CSS_MASK);
+#if 0
        SET(cc, NVME_CC_IOSQES(6));     /* Submission queue size == 2**6 (64) */
+#else
+       SET(cc, NVME_CC_IOSQES(7));     /* Submission queue size == 2**7 (128) 
*/
+#endif
        SET(cc, NVME_CC_IOCQES(4));     /* Completion queue size == 2**4 (16) */
        SET(cc, NVME_CC_SHN(NVME_CC_SHN_NONE));
        SET(cc, NVME_CC_CSS(NVME_CC_CSS_NVM));
Index: sys/dev/pci/nvme_pci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/nvme_pci.c,v
retrieving revision 1.10
diff -u -p -r1.10 nvme_pci.c
--- sys/dev/pci/nvme_pci.c      11 Mar 2022 18:00:51 -0000      1.10
+++ sys/dev/pci/nvme_pci.c      2 Feb 2023 06:06:21 -0000
@@ -72,7 +72,8 @@ nvme_pci_match(struct device *parent, vo
 
        if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_APPLE &&
            (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_NVME1 ||
-           PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_NVME2))
+           PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_NVME2 ||
+           PCI_PRODUCT(pa->pa_id) == 0x2005))
                return (1);
 
        return (0);

Reply via email to