diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index e2575f86133a..6f62a499023f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1349,5 +1349,19 @@ static inline bool pci_is_pcie(struct pci_dev *dev) | |||
1349 | 1349 | ||
1350 | void pci_request_acs(void); | 1350 | void pci_request_acs(void); |
1351 | 1351 | ||
1352 | |||
1353 | #define PCI_VPD_LRDT_TAG_SIZE 3 | ||
1354 | |||
1355 | /** | ||
1356 | * pci_vpd_lrdt_size - Extracts the Large Resource Data Type length | ||
1357 | * @lrdt: Pointer to the beginning of the Large Resource Data Type tag | ||
1358 | * | ||
1359 | * Returns the extracted Large Resource Data Type length. | ||
1360 | */ | ||
1361 | static inline u16 pci_vpd_lrdt_size(const u8 *lrdt) | ||
1362 | { | ||
1363 | return (u16)lrdt[1] + ((u16)lrdt[2] << 8); | ||
1364 | } | ||
1365 | |||
1352 | #endif /* __KERNEL__ */ | 1366 | #endif /* __KERNEL__ */ |
1353 | #endif /* LINUX_PCI_H */ | 1367 | #endif /* LINUX_PCI_H */ |