diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2011-05-10 12:02:11 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-05-21 15:17:08 -0400 |
commit | 24a4742f0be6226eb0106fbb17caf4d711d1ad43 (patch) | |
tree | 43c61634fec10605571321daa38b81de4006eab6 /include/linux/pci.h | |
parent | 9f728f53dd70396f3183d2f0861022259471824b (diff) |
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.h | 11 |
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 { | |||
214 | PCI_SPEED_UNKNOWN = 0xff, | 214 | PCI_SPEED_UNKNOWN = 0xff, |
215 | }; | 215 | }; |
216 | 216 | ||
217 | struct pci_cap_saved_state { | 217 | struct pci_cap_saved_data { |
218 | struct hlist_node next; | ||
219 | char cap_nr; | 218 | char cap_nr; |
219 | unsigned int size; | ||
220 | u32 data[0]; | 220 | u32 data[0]; |
221 | }; | 221 | }; |
222 | 222 | ||
223 | struct pci_cap_saved_state { | ||
224 | struct hlist_node next; | ||
225 | struct pci_cap_saved_data cap; | ||
226 | }; | ||
227 | |||
223 | struct pcie_link_state; | 228 | struct pcie_link_state; |
224 | struct pci_vpd; | 229 | struct pci_vpd; |
225 | struct pci_sriov; | 230 | struct pci_sriov; |
@@ -366,7 +371,7 @@ static inline struct pci_cap_saved_state *pci_find_saved_cap( | |||
366 | struct hlist_node *pos; | 371 | struct hlist_node *pos; |
367 | 372 | ||
368 | hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { | 373 | hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { |
369 | if (tmp->cap_nr == cap) | 374 | if (tmp->cap.cap_nr == cap) |
370 | return tmp; | 375 | return tmp; |
371 | } | 376 | } |
372 | return NULL; | 377 | return NULL; |