linux/drivers/pci/vpd.c
<<
2 v9.>/spae=" 9.>/form=" 9.>a 2 v9. href="../linux+v3.8.6/drivers/pci/vpd.c"> 2 v9.>img src="../.static/gfx/right.png" alt=">>"> 2>/spae=" 2>spae class="lxr_search"> 2 v 2 v9.>input typ Prhidden" nam Prnavtarget" 3 14 Pr"> 2 v9.>input typ Prtext" nam Prsearch" idPrsearch"> 2 v9.>butt6v3typ Prsubmit">Search/form=" >/spae=" 2>spae class="lxr_prefs"=" 9.>a href="+prefs?return=drivers/pci/vpd.c" 2 v9. onclick="return ajax_prefs();"> 2 v9.Prefs" 9.>/a> 2>/spae=" v9. .>/div=" v9. .>form acalue="ajax+*" method="post" onsubmit="return false;"> 2>input typ Prhidden" nam Prajax_lookup" idPrajax_lookup" 3 14 Pr"> v9. .>/form=" v9. .>div class="headingbott6m">div idPrcontent">" >div idPrfile_contents"=
. .1>/a>>spae class="comment">/*>/spae=". .2>/a>>spae class="comment"> * File:        vpd.c>/spae=". .3>/a>>spae class="comment"> * Purpose:     Provide PCI VPD support>/spae=". .4>/a>>spae class="comment"> *>/spae=". .5>/a>>spae class="comment"> * Copyright (C) 2010 Broadcom Corporaalue.>/spae=". .6>/a>>spae class="comment"> */>/spae=". .7>/a> . .8>/a>#include <linux/pci.h>/a>> . .9>/a>#include <linux/export.h>/a>> . rinta> . 11>/a>int.>a href="+code=pci_vpd_find_tag" class="sref">pci_vpd_find_tag>/a>(const.>a href="+code=u8" class="sref">u8>/a> *>a href="+code=buf" class="sref">buf>/a>, unsigned int.>a href="+code=off" class="sref">off>/a>, unsigned int.>a href="+code=len" class="sref">len>/a>, >a href="+code=u8" class="sref">u8>/a> >a href="+code=rdt" class="sref">rdt>/a>) . 12>/a>{ . 13>/a>        int.>a href="+code=i" class="sref">i>/a>; . 14nta> . 15>/a>        for (>a href="+code=i" class="sref">i>/a> =.>a href="+code=off" class="sref">off>/a>;.>a href="+code=i" class="sref">i>/a> <.>a href="+code=len" class="sref">len>/a>; ) { . 16>/a>                >a href="+code=u8" class="sref">u8>/a> >a href="+code=3 1" class="sref">3 1>/a> =.>a href="+code=buf" class="sref">buf>/a>[>a href="+code=i" class="sref">i>/a>]; . 17>/a> . 18>/a>                if (>a href="+code=3 1" class="sref">3 1>/a> &.>a href="+code=PCI_VPD_LRDT" class="sref">PCI_VPD_LRDT>/a>) { . 19>/a>                        >spae class="comment">/* Don't return success of the tag isn't complete */>/spae=". 20>/a>                        if (>a href="+code=i" class="sref">i>/a> +.>a href="+code=PCI_VPD_LRDT_TAG_SIZE" class="sref">PCI_VPD_LRDT_TAG_SIZE>/a> >.>a href="+code=len" class="sref">len>/a>) . 21>/a>                        drivers/s="line" nam
PrL21">.  2
6v33.14 >1  v4.ss="fre2lass="linne" nam
PrL2">. .2>/a>>s . 13>/a>2     23                if (>a href="+code=i" class="srsref">3 1>/a> =.>a href="+ccode=buf" class="sref">rdt>/a>) . 14nta>2i>/a>; . 15>/a>2     25="drivers/pci/vpd.c#L18" idPrL18"2class="l2ne" nam
PrL16">. 16>/a>2     2         >a href="+coe class="e=i" class="sref">i>/a> +.>a href="+ccode=buf" class="_TAG_SIZE" class="sref">PCI_VPD_LRDT_TAG_SIZE>/a> >.>a href+ivers/pci/vpd.c#L18" idPrL18"2class="l2ne" nam
PrL17">. 17>/a>2pci_vpd_find_tag>/a>lhre_sizea href="+cde=buf" class="sref">buf>/a>[>a href="+code=i" class="sref">i>/a>]; . 18>/a>2     2         if (>a href=} elsedrivers/pci/vpd.c#L19" idPrL19"2class="l2ne" nam
PrL19">. 19>/a>2     2                 >spae class="e=u8" class="sref">u8>/a> >a href="+code=3 1" class="sref">pci_vpd_findt.>a hr+code=buf" class="sref">3 1>/a> &.>a href="+co~de=buf" class="_TAG_SIZS>/a>LEN_MASKf">PCI_VPD_LRDT_TAG_SIZS>/a>LEN_MASKf="drivers/pci/vpd.c#L14" idPrL14"3class="l3ne" nam
PrL20">. 20>/a>3     3f="drivers/pci/vpd.c#L11" idPrL11"3class="l3ne" nam
PrL21">. 21>/a>3     3                 drivers/s="l"+code=i" class="srsref">pci_vpd_findt.>a hr+ccode=buf" class="sref">rdt>/a>) . .2>/a>>3 i>/a>; . .3>/a>>s     33="drivers/pci/vpd.c#L11" idPrL11"3class="l3ne" nam
PrL14">. 14nta>3pci_vpd_findt.>a hr+ccode=buf" class="_TAG_SIZS>/a>ENDf">PCI_VPD_LRDT_TAG_SIZS>/a>ENDf="drivers/pci/vpd.c#L12" idPrL12"3class="l3ne" nam
PrL15">. 15>/a>3     35                drivers/s="line" nam
PrL21">.  2
6v33.14 >1  v4.ss="fre3class="l3ne" nam
PrL16">. 16>/a>3     36="drivers/pci/vpd.c#L11" idPrL11"3class="l3ne" nam
PrL17">. 17>/a>3i>/a> +.>a href="+ccode=buf" class="_TAG_SIZS" class="sref">PCI_VPD_LRDT_TAG_SIZS>/a> >.>a href+ivers/pci/vpd.c#L18" idPrL18"3class="l3ne" nam
PrL18">. 18>/a>3     3         if (>a href= drivers/s="l"e=i" class="sr_tag>/a>shre_sizef">pci_vpd_find_tag>/a>shre_sizea href="+cde=buf" class="sref">buf>/a>[>a href="+code=i" class="sref">i>/a>]; . 19>/a>3     3                 >spa}ivers/pci/vpd.c#L4" idPrL4" clclass="l4ne" nam
PrL20">. 20>/a>4     4             }ivers/pci/vpd.c#L4" idPrL4" clclass="l4ne" nam
PrL21">. 21>/a>4     41="drivers/pci/vpd.c#L11" idPrL11"4lass="li4ne" nam
PrL2">. .2>/a>>4 PCI_VPD_LRDTENOENef="drivers/pci/vpd.c#L14" idPrL14"4lass="li4ne" nam
PrL3">. .3>/a>>4     43="dr}ivers/pci/vpd.c#L4" idPrL4" cllass="linne" nam
PrL4">. .4>/a>>sPCI_VPD_LRDTEXPORT_SYMBOL_GPLa hrede=pci_vpd_find_tag" class="sref">pci_vpd_find_tag>/a>(const.>a hr)rivers/pci/vpd.c#L14" idPrL14"4class="l4ne" nam
PrL15">. 15>/a>4     45="drivers/pci/vpd.c#L18" idPrL18"4class="l4ne" nam
PrL16">. 16>/a>4     46ref="+code=pci_vpd_find_tag" class="info_keywordf">pci_vpd_find_tag>/a>(consinfo_keyworda href="+code=u8" class="sref">u8>/a> *>a href="+code=buf" class="sref">buf>/a>, unsigned int.>a href="+code=off" class="sref">off>/a>, unsigned inivers/pci/vpd.c#L18" idPrL18"4class="l4ne" nam
PrL17">. 17>/a>4a href="+code=len" class="sref">len>/a>, >a href="+cof="+cocharcode=buf" class="kwf">len>/a>, >a kwf="drivers/pci/vpd.c#L12" idPrL12"4class="l4ne" nam
PrL18">. 18>/a>4     48f="drivers/pci/vpd.c#L13" idPrL13"4class="l4ne" nam
PrL19">. 19>/a>4     4             "+code=i" class="sref">i>/a>; . 20>/a>5     5f="drivers/pci/vpd.c#L11" idPrL11"5class="l5ne" nam
PrL21">. 21>/a>5     5             ="+code=i" class="sref">i>/a> =.>a href="+code=off" class="sref">off>/a>;.>a href="+code=i" class="sref">i>/a> <.>a hrefcode=PCI_VPD_LRDT_TAG_SIZINFO_FLD_HDR="sref">PCI_VPD_LRDT_TAG_SIZINFO_FLD_HDR="sre href="+ccode=off" class="sref">off>/a>;.>a href="+fcode=PCI_VPD_LRDTsref">len>/a>; ) { . .2>/a>>5 buf>/a>[>a href="+code=i" class="sref">i>/a>]; len>/a>, >a kwf="d[0]+f="+cf="+civers/pci/vpd.c#L19" idPrL19"5lass="li5ne" nam
PrL3">. .3>/a>>5     53                if (>a hde=i" class="srsref">buf>/a>[>a href="+code=i" class="sref">i>/a>]; len>/a>, >a kwf="d[1]rivers/pci/vpd.c#L12" idPrL12"5lass="li5ne" nam
PrL4">. .4>/a>>5i>/a>; . .5>/a>>s     55="drivers/pci/vpd.c#L18" idPrL18"5class="l5ne" nam
PrL16">. 16>/a>5     5         >a href="+code=u8" class="sef">i>/a> +.>a href="+ccode=buf" class="_TAG_SIZINFO_FLD_HDR="sref">PCI_VPD_LRDT_TAG_SIZINFO_FLD_HDR="sre href+ivers/pci/vpd.c#L18" idPrL18"5class="l5ne" nam
PrL17">. 17>/a>5pci_vpd_find_tag>/a>info_field_sizea href="+cde=buf" class="sref">buf>/a>[>a href="+code=i" class="sref">i>/a>]; . 18>/a>5     5         if (}ivers/pci/vpd.c#L4" idPrL4" c5class="l5ne" nam
PrL19">. 19>/a>5     59="drivers/pci/vpd.c#L18" idPrL18"6class="l6ne" nam
PrL20">. 20>/a>6     6             ss of t-de=i" class="srENOENef">PCI_VPD_LRDTENOENef="drivers/pci/vpd.c#L14" idPrL14"6class="l6ne" nam
PrL21">. 21>/a>6     61="dr}ivers/pci/vpd.c#L4" idPrL4" c6lass="li6ne" nam
PrL2">. .2>/a>>6 PCI_VPD_LRDTEXPORT_SYMBOL_GPLa hrede=pci_vpd_find_tag" class="info_keywordf">pci_vpd_find_tag>/a>(consinfo_keyworda hr)rivers/pci/vpd.c#L14" idPrL14"6lass="li6ne" nam
PrL3">. .3>/a>>6     6lass="/pre
The original LXR software by'vers/pci/http://source="+ge.net/projects/lxr">LXR Don&unityf="+co9.>i experi'al .c#Lnt">by&vers/pci/mailto:lxr@.h>/a.no { xr@.h>/a.nof="+.
 idPrcotent" nam
Prsubfooter">
 xr..h>/a.no kconly hostef=by&vers/pci/http://www.redpill-.h>pro.no {Redpill Lh>pro ASf="+copPD suprisn&Lh>/aof="+ulting and oper="