On Tue, 1 Jun 2010 13:05:25 +0800 Frank Pan <frankpzh@xxxxxxxxx> wrote: > Greetings, > > The motivation is make VF device visible to PF driver. PF driver > may need this to access VF's PCI configuration. > Another use case is in sysfs symbolic linking. Some of VF's sysfs > entries are created by PF driver. For example, /sys/class/net/ethx/vfx > in Intel 82576 NIC driver. Makeing a symbolic link from VF's pci device > to this path also must be done in PF's driver. > > Currently, there is no hint about VF's bus/devfn in PF's pci_dev. > The offset and stride entries(which are used to calculate bus/devfn > of VF devices) in VF's PCI configuration is also invisible in PF's > driver. So IMO this helper function is needed. > > Any reply is appreciated, THX. > > (ps: gmail will do line wrap/tab replace, use attachment instead to patch) Per the discussion in this thread it sounds like this really has nothing to do with sysfs and more to do with being a convenient API for drivers. Is that correct? If so, and assuming there's not some other way of getting this info from a driver, I'm ok with it, but it should be submitted as part of a patchset including driver code that uses it. -- Jesse Barnes, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html