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>
This commit is contained in:

committed by
Jesse Barnes

parent
9f728f53dd
commit
24a4742f0b
@@ -214,10 +214,15 @@ enum pci_bus_speed {
|
||||
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 @@ 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;
|
||||
|
Reference in New Issue
Block a user