Re: [PATCH 15/16 v6] PCI: document the SR-IOV sysfs entries

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Yu Zhao
Date: Monday, November 17, 2008 - 1:09 am

On Fri, Nov 14, 2008 at 08:55:38AM +0800, Greg KH wrote:

The problem is the sysfs directory of the PCI device is created by the
kobject_add() in the device_add() as follows. And the static entries
bundled with the 'pci_bus_type' are created by the bus_add_device().
Between the kobject_add() and the kobject_uevent(), we don't have any
other choice to add the dynamic entries.

In device_add():

	error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id);
	...
	error = bus_add_device(dev);
	...
	kobject_uevent(&dev->kobj, KOBJ_ADD);


So looks like the only way is to make the dynamic entries bundled with
the 'pci_bus_type', which means they would become static no matter the
device supports the entries (i.e. corresponding capabilities) or not.

Thanks,
Yu
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Yu Zhao, (Wed Oct 22, 1:38 am)
[PATCH 3/16 v6] PCI: export __pci_read_base, Yu Zhao, (Wed Oct 22, 1:41 am)
git repository for SR-IOV development?, H L, (Thu Nov 6, 9:51 am)
Re: git repository for SR-IOV development?, Greg KH, (Thu Nov 6, 9:59 am)
RE: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Fischer, Anna, (Thu Nov 6, 10:38 am)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Matthew Wilcox, (Thu Nov 6, 10:47 am)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Matthew Wilcox, (Thu Nov 6, 11:36 am)
Re: git repository for SR-IOV development?, H L, (Thu Nov 6, 12:58 pm)
RE: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Fischer, Anna, (Thu Nov 6, 1:04 pm)
RE: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Fischer, Anna, (Thu Nov 6, 2:35 pm)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Simon Horman, (Thu Nov 6, 3:24 pm)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Anthony Liguori, (Thu Nov 6, 3:38 pm)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Anthony Liguori, (Thu Nov 6, 3:40 pm)
Re: git repository for SR-IOV development?, Simon Horman, (Thu Nov 6, 3:56 pm)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Matthew Wilcox, (Thu Nov 6, 3:58 pm)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Chris Wright, (Thu Nov 6, 4:54 pm)
RE: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Dong, Eddie, (Thu Nov 6, 6:52 pm)
Re: git repository for SR-IOV development?, Greg KH, (Thu Nov 6, 6:58 pm)
RE: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Nakajima, Jun, (Thu Nov 6, 7:08 pm)
RE: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Leonid Grossman, (Fri Nov 7, 12:29 am)
Re: git repository for SR-IOV development?, Yu Zhao, (Fri Nov 7, 6:09 am)
RE: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Fischer, Anna, (Sat Nov 8, 4:09 am)
RE: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Leonid Grossman, (Sat Nov 8, 8:37 am)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Muli Ben-Yehuda, (Sat Nov 8, 11:41 pm)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Avi Kivity, (Sun Nov 9, 12:37 pm)
Re: [PATCH 0/16 v6] PCI: Linux kernel SR-IOV support, Avi Kivity, (Tue Nov 11, 2:00 am)
Re: [PATCH 15/16 v6] PCI: document the SR-IOV sysfs entries, Yu Zhao, (Mon Nov 17, 1:09 am)