]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/pci.h
pci: Add helper to find a VPD resource data type
[net-next-2.6.git] / include / linux / pci.h
index 198d062640b71b31759c77601a1dd51f516ff121..e30ceea7345b02736d7ae2f9105bb4d62ebeed2f 100644 (file)
@@ -1395,5 +1395,17 @@ static inline u8 pci_vpd_srdt_size(const u8 *srdt)
        return (*srdt) & PCI_VPD_SRDT_LEN_MASK;
 }
 
+/**
+ * pci_vpd_find_tag - Locates the Resource Data Type tag provided
+ * @buf: Pointer to buffered vpd data
+ * @off: The offset into the buffer at which to begin the search
+ * @len: The length of the vpd buffer
+ * @rdt: The Resource Data Type to search for
+ *
+ * Returns the index where the Resource Data Type was found or
+ * -ENOENT otherwise.
+ */
+int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, u8 rdt);
+
 #endif /* __KERNEL__ */
 #endif /* LINUX_PCI_H */