Re: PCIe NVME drives not detected on Dell R6515

From: Chuck Tuffli <chuck_at_freebsd.org>
Date: Thu, 14 May 2020 07:29:18 -0700
On Mon, May 4, 2020 at 11:12 AM Miroslav Lachman <000.fbsd_at_quip.cz> wrote:
>
> On 2020-04-27 08:02, Miroslav Lachman wrote:
> > I don't know what is with Scott. I hope he is well.
> > Is there somebody else who can help me with this issue?
> > Scott wrote there are hotplug PCIe buses not probed during boot process.
> > I am not a developer so I cannot move forward alone.
>
> The problem is with PCIe Hot Plug.
> Hot Plug bus was not enumerated thus no NVME detected.

I may have just been bitten by this as well when running FreeBSD under
qemu. The q35 machine type with PCIe emulation enables PCIe hot plug
on all the root ports, but I am not seeing any downstream devices
(either emulated like e1000 or passed through by the host) because of
a check in pcib_hotplug_present():
    /*
     * Require the Electromechanical Interlock to be engaged if
     * present.
     */
    if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_EIP &&
        (sc->pcie_slot_sta & PCIEM_SLOT_STA_EIS) == 0)
        return (0);

Under qemu, the slot indicates an Electromechanical Interlock is
Present in the capabilities register, but it does not set the
Electromechanical Interlock Status bit. This causes the PCI driver to
not probe any children. Commenting out the above code made both
emulated PCIe devices as well as host devices passed through appear in
FreeBSD. As a data point, I'm not seeing similar checks in the Linux
kernel.

Miroslav, would it be possible to comment out/delete the above code in
your kernel and retest to see if that helps your case as well?

--chuck
Received on Thu May 14 2020 - 12:29:32 UTC

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