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>
diff --git a/include/linux/pci.h b/include/linux/pci.h
index df4d69b..61ef8f2 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -214,10 +214,15 @@
PCI_SPEED_UNKNOWN = 0xff,
};
+struct pci_cap_saved_data {
+ char cap_nr;
+ unsigned int size;
+ u32 data[0];
+};
+
struct pci_cap_saved_state {
struct hlist_node next;
- char cap_nr;
- u32 data[0];
+ struct pci_cap_saved_data cap;
};
struct pcie_link_state;
@@ -366,7 +371,7 @@
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;