summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2010-02-26 14:04:41 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-28 00:43:32 -0800
commitb55ac1b22690d2e5b02a61cf6d69c2d66969c79d (patch)
treed336b38719dba482e2734f2091f5a60dfcb134b4 /include
parent7ad506fa1adc2da3d394c562f09b8e1b3026c402 (diff)
downloadlinux-b55ac1b22690d2e5b02a61cf6d69c2d66969c79d.tar.bz2
pci: Add helper to find a VPD resource data type
This patch adds the pci_vpd_find_tag() helper function to find VPD resource data types in a buffer. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 198d062640b7..e30ceea7345b 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -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 */