[Bug 285993] nvme device breakage in 14.2 STABLE n270867-25df691800f0
Date: Mon, 14 Apr 2025 15:49:53 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285993
--- Comment #11 from Warner Losh <imp@FreeBSD.org> ---
bus_child_present is a newbus dispatch method.
sys/dev/pci/pci_pci.c: DEVMETHOD(bus_child_present, pcib_child_present),
sys/dev/pccbb/pccbb_pci.c: DEVMETHOD(bus_child_present,
cbb_child_present),
is where it's implemented. Since there are no cardbus NVMe drive, the first one
is relevant.
int
pcib_child_present(device_t dev, device_t child)
{
#ifdef PCI_HP
struct pcib_softc *sc = device_get_softc(dev);
int retval;
retval = bus_child_present(dev);
if (retval != 0 && sc->flags & PCIB_HOTPLUG)
retval = pcib_hotplug_present(sc);
return (retval);
#else
return (bus_child_present(dev));
#endif
}
which right away suggests you could work around this with a nooptions PCI_HP
kernel.
But that code says that if all my parents think the child is there, then check
its hotplug status:
/*
* Returns -1 if the card is fully inserted, powered, and ready for
* access. Otherwise, returns 0.
*/
static int
pcib_hotplug_present(struct pcib_softc *sc)
{
/* Card must be inserted. */
if (!pcib_hotplug_inserted(sc))
return (0);
/* Require the Data Link Layer to be active. */
if (!(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE))
return (0);
return (-1);
}
(yes, I checked, this is the right protocol to use).
So the next debugging point is to add code in pcib_hotplug_present to see which
of these conditions fails.
--
You are receiving this mail because:
You are the assignee for the bug.