Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2020 07:29:18 -0700
From:      Chuck Tuffli <chuck@freebsd.org>
To:        Miroslav Lachman <000.fbsd@quip.cz>
Cc:        Scott Long <scottl@samsco.org>, Kurt Jaeger <pi@freebsd.org>, Warner Losh <imp@bsdimp.com>,  FreeBSD-Current <freebsd-current@freebsd.org>
Subject:   Re: PCIe NVME drives not detected on Dell R6515
Message-ID:  <CAKAYmM%2Bz6gASCpzScMAfWx64NDv7u9ekiXf7XqnYUjja6ptVNQ@mail.gmail.com>
In-Reply-To: <6e6461d1-fbc4-c306-f71f-54767f2849cb@quip.cz>
References:  <bc00d2f4-d281-e125-3333-65f38da20817@quip.cz> <0F8BCB8C-DE60-4A34-A4D8-F1BB4B9F906A@samsco.org> <CANCZdfprct8pELBaev=Ub3sXb_JRx9xovUhzxDpSwY2rXfMtrg@mail.gmail.com> <9EF043C1-FF8F-4997-B59A-EC3BF7D1CEEE@samsco.org> <31E8B2BE-BED2-4084-868D-32C48CB3CD6E@samsco.org> <573f5fab-1ef6-151f-18ca-58d3a4a89c72@quip.cz> <07B6763F-C23B-4B7C-B76A-26267AC35453@samsco.org> <fe25f330-979c-a1ea-6ca6-fce80e869f04@quip.cz> <20200417194431.GD39563@home.opsec.eu> <148dcdf7-f185-f14f-52ee-d4df3a2a1dc7@quip.cz> <8D8E1F62-AB66-47E1-8444-3D66F8EADA74@samsco.org> <c7fe1d15-a2f7-5aee-466e-a5444340c267@quip.cz> <F8D7C4AF-90D5-4997-B4C3-F7EDF4C787EE@samsco.org> <015c7aa8-9385-4219-1bf1-0137f65ed80d@quip.cz> <90C35FEF-690C-4D04-A0D8-D3E5A448C744@samsco.org> <4736a46d-716d-7860-ff56-6c1d7391dbeb@quip.cz> <6e6461d1-fbc4-c306-f71f-54767f2849cb@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 4, 2020 at 11:12 AM Miroslav Lachman <000.fbsd@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKAYmM%2Bz6gASCpzScMAfWx64NDv7u9ekiXf7XqnYUjja6ptVNQ>