Date: Wed, 29 Apr 2020 20:26:18 -0700 From: Neel Chauhan <neel@neelc.org> To: Yuri Pankov <ypankov@fastmail.com> Cc: current@freebsd.org Subject: Re: nvme on 2019 macbooks Message-ID: <5c205d1c8a890ff0bd3c863e6a468eb3@neelc.org> In-Reply-To: <cb02bcb1-482b-0920-507e-79213c1ba1ff@fastmail.com> References: <cb02bcb1-482b-0920-507e-79213c1ba1ff@fastmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I don't have a MacBook. I don't own one and my work gives me a ThinkPad (but runs Windows). I believe the issue on new Macs is the NVMe queue size or something. You should read the Linux driver, the FreeBSD equivalents, and then build your patch on the differences in how the hardware is handled. This is how I got my 2018 HP Spectre x360 to work (but with different subsystems), and you could do the same on newer Apple NVMe. If you get something working, consider making a patch and submitting it. That's what I done with my Spectre, and it has been in HEAD for a few months now. -Neel === https://www.neelc.org/ On 2020-04-29 10:43, Yuri Pankov wrote: > I have tried booting latest -current snapshot on 2019 macbook pro 16, > and noticed that nvme driver didn't attach, as class reported is > 0x018002 and not 0x010802 that we expect in nvme_pci.c. > > The following linux changes seem to be related: > https://github.com/torvalds/linux/commit/66341331ba0d2de4ff421cdc401a1e34de50502a > https://github.com/torvalds/linux/commit/d38e9f04ebf667d9cb8185b45bff747485f1d3e9 > > I have tried adding the exact PCI IDs, but that also fails as number > of msix vectors seems to be 0 in nvme_ctrlr_setup_interrupts() and > nvme_ctrlr_configure_intx() fails with "unable to allocate shared > IRQ". > > Any hints on how to proceed here? > > pciconf excerpt: > none7@pci0:4:0:0: class=0x018002 rev=0x01 hdr=0x00 vendor=0x106b > device=0x2005 subvendor=0x106b subdevice=0x1800 > vendor = "Apple Inc." > device = "ANS2 NVMe Controller" > class = mass storage > bar [10] = type Prefetchable Memory, range 64, base 0xc0400000, > size 419304, enabled > bar [18] = type Prefetchable Memory, range 64, base 0xc1400000, > size 524288, enabled > bar [20] = type Prefetchable Memory, range 64, base 0xc1600000, > size 65536, enabled > cap 01[40] = powerspec 3 supports D0 D3 current D0 > cap 05[50] = MSI supports 8 messages, 64 bit > cap 10[70] = PCI-Express 2 endpoint max data 256(256) RO NS > link x4(x4) speed 8.0(8.0) ASPM L1(L1) ClockPM enabled > ecap 0001[100] = AER 2 0 fatal 0 non-fatal 1 corrected > ecap 0019[148] = PCIe Sec 1 lane errors 0 > ecap 0018[168] = LTR 1 > ecap 001e[170] = L1 PM Substated 1 > ecap 000b[180] = Vendor [1] ID 0002 Rev 1 Length 256 > ecap 0015[280] = Resizable BAR 1 > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5c205d1c8a890ff0bd3c863e6a468eb3>