summaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2011-05-10 10:02:11 -0600
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-05-21 12:17:08 -0700
commit24a4742f0be6226eb0106fbb17caf4d711d1ad43 (patch)
tree43c61634fec10605571321daa38b81de4006eab6 /include/linux/pci.h
parent9f728f53dd70396f3183d2f0861022259471824b (diff)
downloadlinux-24a4742f0be6226eb0106fbb17caf4d711d1ad43.tar.gz
linux-24a4742f0be6226eb0106fbb17caf4d711d1ad43.tar.bz2
linux-24a4742f0be6226eb0106fbb17caf4d711d1ad43.zip
PCI: Track the size of each saved capability data area
This will allow us to store and load it later. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index df4d69b82144..61ef8f2f9b19 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -214,12 +214,17 @@ enum pci_bus_speed {
PCI_SPEED_UNKNOWN = 0xff,
};
-struct pci_cap_saved_state {
- struct hlist_node next;
+struct pci_cap_saved_data {
char cap_nr;
+ unsigned int size;
u32 data[0];
};
+struct pci_cap_saved_state {
+ struct hlist_node next;
+ struct pci_cap_saved_data cap;
+};
+
struct pcie_link_state;
struct pci_vpd;
struct pci_sriov;
@@ -366,7 +371,7 @@ static inline struct pci_cap_saved_state *pci_find_saved_cap(
struct hlist_node *pos;
hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
- if (tmp->cap_nr == cap)
+ if (tmp->cap.cap_nr == cap)
return tmp;
}
return NULL;