linux/drivers/pci/vpd.c
<<
tion.18/spaue= .18/forme= .18a tion.1 href="../linux+vion0.2/drivers/pci/vpd.c">tion.18img src="../.static/gfx/right.png" alt=">>">ti8/spaue=ti8spau class="lxr_search">tiontion.18input typ v3hidden" nam v3navtarget" > v3">tion.18input typ v3text" nam v3search" idv3search">tion.18butt typ v3submit">Searchtion.1Prefs= .18/a>ti8/spaue=on.1 18/dive=on.1 18form acvalu="ajax+*" method="post" onsubmit="return false;">ti8input typ v3hidden" nam v3ajax_lookup" idv3ajax_lookup" > v3">ton.1 18/forme=ton.1 18div class="headingbott m">= 8div idv3file_contents"e
1 118/a>8spau class="comment">/*8/spaue=1 128/a>8spau class="comment"> * File:        vpd.c8/spaue=1 138/a>8spau class="comment"> * Purpose:     Provide PCI VPD support8/spaue=1 148/a>8spau class="comment"> *8/spaue=1 158/a>8spau class="comment"> * Copyright (C) 2010 Broadcom Corporavalu.8/spaue=1 168/a>8spau class="comment"> */8/spaue=1 178/a>t1 188/a>#include <linux/pci.h8/a>>t1 198/a>#include <linux/export.h8/a>>t1 ptioa>t1 118/a>int18a href="+code=pci_vpd_find_tag" class="sref">pci_vpd_find_tag8/a>(const18a href="+code=u8" class="sref">u88/a> *8a href="+code=buf" class="sref">buf8/a>, unsigned int18a href="+code=off" class="sref">off8/a>, unsigned int18a href="+code=len" class="sref">len8/a>, 8a href="+code=u8" class="sref">u88/a> 8a href="+code=rdt" class="sref">rdt8/a>)t1 128/a>{t1 138/a>        int18a href="+code=i" class="sref">i8/a>;t1 14ioa>t1 158/a>        for (8a href="+code=i" class="sref">i8/a> =18a href="+code=off" class="sref">off8/a>;18a href="+code=i" class="sref">i8/a> <18a href="+code=len" class="sref">len8/a>; ) {t1 168/a>                8a href="+code=u8" class="sref">u88/a> 8a href="+code= >
" class="sref"> >
8/a> =18a href="+code=buf" class="sref">buf8/a>[8a href="+code=i" class="sref">i8/a>];t1 178/a>t1 188/a>                if (8a href="+code= >
" class="sref"> >
8/a> &18a href="+code=PCI_VPD_LRDT" class="sref">PCI_VPD_LRDT8/a>) {t1 198/a>                        8spau class="comment">/* Don't return success of the tag isn't complete */8/spaue=1 208/a>                        if (8a href="+code=i" class="sref">i8/a> +18a href="+code=PCI_VPD_LRDT_TAG_SIZE" class="sref">PCI_VPD_LRDT_TAG_SIZE8/a> >18a href="+code=len" class="sref">len8/a>)t1 218/a>                                break;t1 228/a>t1 238/a>                        if (8a href="+code= >
" class="sref"> >
8/a> ==18a href="+code=rdt" class="sref">rdt8/a>)t1 248/a>                                return 8a href="+code=i" class="sref">i8/a>;t1 258/a>t1 268/a>                        8a href="+code=i" class="sref">i8/a> +=18a href="+code=PCI_VPD_LRDT_TAG_SIZE" class="sref">PCI_VPD_LRDT_TAG_SIZE8/a> +t1 278/a>                             8a href="+code=pci_vpd_lrdt_size" class="sref">pci_vpd_lrdt_size8/a>(&8a href="+code=buf" class="sref">buf8/a>[8a href="+code=i" class="sref">i8/a>]);t1 288/a>                } else {t1 298/a>                        8a href="+code=u8" class="sref">u88/a> 8a href="+code=tag" class="sref">tag8/a> =18a href="+code= >
" class="sref"> >
8/a> &1~8a href="+code=PCI_VPD_SRDT_LEN_MASK" class="sref">PCI_VPD_SRDT_LEN_MASK8/a>;t1 3tioa>t1 318/a>                        if (8a href="+code=tag" class="sref">tag8/a> ==18a href="+code=rdt" class="sref">rdt8/a>)t1 328/a>                                return 8a href="+code=i" class="sref">i8/a>;t1 33ioa>t1 348/a>                        if (8a href="+code=tag" class="sref">tag8/a> ==18a href="+code=PCI_VPD_SRDT_END" class="sref">PCI_VPD_SRDT_END8/a>)t1 358/a>                                break;t1 36ioa>t1 378/a>                        8a href="+code=i" class="sref">i8/a> +=18a href="+code=PCI_VPD_SRDT_TAG_SIZE" class="sref">PCI_VPD_SRDT_TAG_SIZE8/a> +t1 388/a>                             8a href="+code=pci_vpd_srdt_size" class="sref">pci_vpd_srdt_size8/a>(&8a href="+code=buf" class="sref">buf8/a>[8a href="+code=i" class="sref">i8/a>]);t1 398/a>                }=1 408/a>        }=1 41ioa>t1 428/a>        return -8a href="+code=ENOENT" class="sref">ENOENT8/a>;t1 43ioa>}=1 448/a>8a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL8/a>(8a href="+code=pci_vpd_find_tag" class="sref">pci_vpd_find_tag8/a>);t1 458/a>t1 468/a>int18a href="+code=pci_vpd_find_info_keyword" class="sref">pci_vpd_find_info_keyword8/a>(const18a href="+code=u8" class="sref">u88/a> *8a href="+code=buf" class="sref">buf8/a>, unsigned int18a href="+code=off" class="sref">off8/a>,t1 478/a>                              unsigned int18a href="+code=len" class="sref">len8/a>, const1char *8a href="+code=kw" class="sref">kw8/a>)t1 488/a>{t1 498/a>        int18a href="+code=i" class="sref">i8/a>;t1 5tioa>t1 518/a>        for (8a href="+code=i" class="sref">i8/a> =18a href="+code=off" class="sref">off8/a>;18a href="+code=i" class="sref">i8/a> +18a href="+code=PCI_VPD_INFO_FLD_HDR_SIZE" class="sref">PCI_VPD_INFO_FLD_HDR_SIZE8/a> <=18a href="+code=off" class="sref">off8/a> +18a href="+code=len" class="sref">len8/a>;) {t1 528/a>                if (8a href="+code=buf" class="sref">buf8/a>[8a href="+code=i" class="sref">i8/a> +10] ==18a href="+code=kw" class="sref">kw8/a>[0] &&t1 538/a>                    8a href="+code=buf" class="sref">buf8/a>[8a href="+code=i" class="sref">i8/a> +11] ==18a href="+code=kw" class="sref">kw8/a>[1])t1 548/a>                        return 8a href="+code=i" class="sref">i8/a>;t1 558/a>t1 568/a>                8a href="+code=i" class="sref">i8/a> +=18a href="+code=PCI_VPD_INFO_FLD_HDR_SIZE" class="sref">PCI_VPD_INFO_FLD_HDR_SIZE8/a> +t1 578/a>                     8a href="+code=pci_vpd_info_field_size" class="sref">pci_vpd_info_field_size8/a>(&8a href="+code=buf" class="sref">buf8/a>[8a href="+code=i" class="sref">i8/a>]);t1 588/a>        }=1 598/a>t1 608/a>        return -8a href="+code=ENOENT" class="sref">ENOENT8/a>;t1 61ioa>}=1 628/a>8a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL8/a>(8a href="+code=pci_vpd_find_info_keyword" class="sref">pci_vpd_find_info_keyword8/a>);t1 638/a>8/pre>
The original LXR software by the LXR community8/a>, this experimental vers"
	 by lxr@linux.no8/a>.
8/dive=8div class="subfooter">
lxr.linux.no kindly hosted by Redpill Linpro AS8/a>, provider of Linux consulting and operavalus services since 1995.
8/dive=
8/bodye=8/htmle=