3 * Purpose: Provide PCI VPD support
5 * Copyright (C) 2010 Broadcom Corporation.
10 int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, u8 rdt)
14 for (i = off; i < len; ) {
17 if (val & PCI_VPD_LRDT) {
18 /* Don't return success of the tag isn't complete */
19 if (i + PCI_VPD_LRDT_TAG_SIZE > len)
25 i += PCI_VPD_LRDT_TAG_SIZE +
26 pci_vpd_lrdt_size(&buf[i]);
28 u8 tag = val & ~PCI_VPD_SRDT_LEN_MASK;
33 if (tag == PCI_VPD_SRDT_END)
36 i += PCI_VPD_SRDT_TAG_SIZE +
37 pci_vpd_srdt_size(&buf[i]);
43 EXPORT_SYMBOL_GPL(pci_vpd_find_tag);