diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2011-10-06 14:08:18 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-01-06 15:10:25 -0500 |
commit | da8d1c8ba4dcb16d60be54b233deca9a7cac98dc (patch) | |
tree | ac4713f9dd29aab4d4d5b167cf61081aeb2ccdb4 /include | |
parent | 8b6a5af92c03b363df050da906480085b6cd6e00 (diff) |
PCI/sysfs: add per pci device msi[x] irq listing (v5)
This patch adds a per-pci-device subdirectory in sysfs called:
/sys/bus/pci/devices/<device>/msi_irqs
This sub-directory exports the set of msi vectors allocated by a given
pci device, by creating a numbered sub-directory for each vector beneath
msi_irqs. For each vector various attributes can be exported.
Currently the only attribute is called mode, which tracks the
operational mode of that vector (msi vs. msix)
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/msi.h | 3 | ||||
-rw-r--r-- | include/linux/pci.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h index 05acced439a3..ce93a341337d 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef LINUX_MSI_H | 1 | #ifndef LINUX_MSI_H |
2 | #define LINUX_MSI_H | 2 | #define LINUX_MSI_H |
3 | 3 | ||
4 | #include <linux/kobject.h> | ||
4 | #include <linux/list.h> | 5 | #include <linux/list.h> |
5 | 6 | ||
6 | struct msi_msg { | 7 | struct msi_msg { |
@@ -44,6 +45,8 @@ struct msi_desc { | |||
44 | 45 | ||
45 | /* Last set MSI message */ | 46 | /* Last set MSI message */ |
46 | struct msi_msg msg; | 47 | struct msi_msg msg; |
48 | |||
49 | struct kobject kobj; | ||
47 | }; | 50 | }; |
48 | 51 | ||
49 | /* | 52 | /* |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 7cda65b5f798..84225c756bd1 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -336,6 +336,7 @@ struct pci_dev { | |||
336 | struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ | 336 | struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ |
337 | #ifdef CONFIG_PCI_MSI | 337 | #ifdef CONFIG_PCI_MSI |
338 | struct list_head msi_list; | 338 | struct list_head msi_list; |
339 | struct kset *msi_kset; | ||
339 | #endif | 340 | #endif |
340 | struct pci_vpd *vpd; | 341 | struct pci_vpd *vpd; |
341 | #ifdef CONFIG_PCI_ATS | 342 | #ifdef CONFIG_PCI_ATS |