Re: Intel TigerLake NVMe vmd: Adding Support & Debugging a Patch

From: Chuck Tuffli <ctuffli_at_gmail.com>
Date: Thu, 31 Dec 2020 14:40:17 -0800
On Wed, Dec 30, 2020 at 4:38 PM Neel Chauhan <neel_at_neelc.org> wrote:
>
> Hi Chuck,
>
> On 2020-12-30 10:04, Chuck Tuffli wrote:
> > What is the output from
> > # pciconf -rb pci0:0:14:0 0x40:0x48
>
> The output is:
>
> 01 00 00 00 01 2e 68 02  00

Perfect. The Linux driver says the 8086:9a0b device you have "... may
provide root port configuration information which limits bus
numbering" which causes the code to read the VM Capability register
(0x40) and the VM Configuration register (0x44). Here, VMCAP = 0x0001
where bit 0 set appears to mean the config register has starting bus
number information. VMCFG = 0x2e01 where bits 5:4 give the coded start
number of bus 224 or 0xe0 which matches the PCI bridge shown in the
lspci output (i.e. 10000:e0:06.0).

I wonder if mirroring the logic in [1] and setting
    bus->rman.rm_start = 224;
in vmd_attach() might help.

> I was also able to stop kernel panics by adding:
>
> rman_fini(&sc->vmd_bus.rman);
>
> In the fail: statement in vmd_attach().
>
> But I still cannot detect the SSD.

[1] https://github.com/torvalds/linux/blob/master/drivers/pci/controller/vmd.c#L507

--chuck
Received on Thu Dec 31 2020 - 21:40:29 UTC

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