diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index e30ceea7345b..cfff32fc6e35 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1373,6 +1373,8 @@ void pci_request_acs(void); | |||
1373 | #define PCI_VPD_LRDT_TAG_SIZE 3 | 1373 | #define PCI_VPD_LRDT_TAG_SIZE 3 |
1374 | #define PCI_VPD_SRDT_TAG_SIZE 1 | 1374 | #define PCI_VPD_SRDT_TAG_SIZE 1 |
1375 | 1375 | ||
1376 | #define PCI_VPD_INFO_FLD_HDR_SIZE 3 | ||
1377 | |||
1376 | /** | 1378 | /** |
1377 | * pci_vpd_lrdt_size - Extracts the Large Resource Data Type length | 1379 | * pci_vpd_lrdt_size - Extracts the Large Resource Data Type length |
1378 | * @lrdt: Pointer to the beginning of the Large Resource Data Type tag | 1380 | * @lrdt: Pointer to the beginning of the Large Resource Data Type tag |
@@ -1396,6 +1398,17 @@ static inline u8 pci_vpd_srdt_size(const u8 *srdt) | |||
1396 | } | 1398 | } |
1397 | 1399 | ||
1398 | /** | 1400 | /** |
1401 | * pci_vpd_info_field_size - Extracts the information field length | ||
1402 | * @lrdt: Pointer to the beginning of an information field header | ||
1403 | * | ||
1404 | * Returns the extracted information field length. | ||
1405 | */ | ||
1406 | static inline u8 pci_vpd_info_field_size(const u8 *info_field) | ||
1407 | { | ||
1408 | return info_field[2]; | ||
1409 | } | ||
1410 | |||
1411 | /** | ||
1399 | * pci_vpd_find_tag - Locates the Resource Data Type tag provided | 1412 | * pci_vpd_find_tag - Locates the Resource Data Type tag provided |
1400 | * @buf: Pointer to buffered vpd data | 1413 | * @buf: Pointer to buffered vpd data |
1401 | * @off: The offset into the buffer at which to begin the search | 1414 | * @off: The offset into the buffer at which to begin the search |