Re: nvme on 2019 macbooks

From: Yuri Pankov <ypankov_at_fastmail.com>
Date: Fri, 1 May 2020 04:24:49 +0300
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?

So it looks like we need to fallback to MSI if we failed to enable 
MSI-X.  With the attached patch we still fail to attach the target 
device (as below) most likely due to the quirks needed as seen in linux 
driver, but it's definitely a start:

nvme0: CREATE IO CQ (05) sqid:0 cid:15 nsid:0 cdw10:00800001 cdw11:00010003
nvme0: INVALID_FIELD (00/02) sqid:0 cid:15 cdw0:0
nvme0: nvme_create_io_cq failed!

Received on Thu Apr 30 2020 - 23:24:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:23 UTC