Re: [PATCH v9 6/7] PCI: document SR-IOV sysfs entries

From: Greg KH
Date: Wed Feb 18 2009 - 10:35:27 EST


On Wed, Feb 18, 2009 at 03:21:55AM +0800, Yu Zhao wrote:
> > Care to describe what you are trying to do first?
>
> I'd like to link child PCI devices to their parent PCI device's
> subdirectory. These child PCI devices are PCI functions that are on
> the same level as their parent in the PCI hierarchy, so current PCI code
> won't create symbol links for them in their parent directory as what it
> does for PCI bridge. For example, device 01:00.0 is the parent and 01:00.1
> is the child, I'd like to put a symbol link into
> /sys/bus/pci/device/0000:01:00.0/child/ which points to
> /sys/bus/pci/device/0000:01:00.1. This can let user space application
> know the relationship between this two devices.

If .1 is really the child of .0, then make it so in the sysfs tree in
the first place with the topology of the devices. That way you don't
need any special "child" directory, as that would be different from all
other device types in the system.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/