On Wed, Feb 17, 2021 at 12:02:39PM -0600, Bjorn Helgaas wrote:
> > BTW, I asked more than once how these sysfs knobs should be handled
> > in the PCI/core.
>
> Thanks for the pointers. This is the first instance I can think of
> where we want to create PCI core sysfs files based on a driver
> binding, so there really isn't a precedent.
The MSI stuff does it today, doesn't it? eg:
virtblk_probe (this is a driver bind)
init_vq
virtio_find_vqs
vp_modern_find_vqs
vp_find_vqs
vp_find_vqs_msix
vp_request_msix_vectors
pci_alloc_irq_vectors_affinity
__pci_enable_msi_range
msi_capability_init
populate_msi_sysfs
ret = sysfs_create_groups(&pdev->dev.kobj, msi_irq_groups);
And the sysfs is removed during pci_disable_msi(), also called by the
driver
Jason