This fixes a kernel panic when probing for vmd_bus on Intel TigerLake on 14-CURRENT. Apparently, vmd_bus is a type of PCI bus, but still registers as a separate device class.
PR: 256915
Differential D31071
vmd: Rename vmd_bus class to pci nc on Jul 6 2021, 1:19 AM. Authored by Tags None Referenced Files
Details This fixes a kernel panic when probing for vmd_bus on Intel TigerLake on 14-CURRENT. Apparently, vmd_bus is a type of PCI bus, but still registers as a separate device class. PR: 256915 This is tested to load the VMD-based SSD on an Intel TigerLake system (HP Spectre x360 13t-aw200)
Diff Detail
Event Timeline
Comment Actions https://reviews.freebsd.org/D31073 implements the hints, and is presented for testing only at the moment. Comment Actions Can we not just rename the PCI bus that VMD creates to "pci"? There are some other places that use this same sort of check to know if they are dealing with a PCI device. I think renaming the bus device might really be the simplest approach. We do this for other PCI buses we discover via curious means (e.g. qpi.c). Comment Actions Instead of asserting, I renamed the class to pci. It works! Now I just have to worry about rebuilding my custom drm-kmod branch. Comment Actions It would be good to note, that to find out if a child is attached to vmd, that they will have to look for the vmd device and not the bus. I have some uncommitted code that had to skip a check in the PCI hot plug code when in VMD mode. So I added code to walk the chain to see how it was attached. It would be good to have a comment here why this was done. |