linux/drivers/ide/ide-scan-pci.c
<<
tion14./spa 14./form 14.a tion14 href="../linux+v3.8.6/drivers/ide/ide-scan-pci.c">tion14.img src="../.static/gfx/right.png" alt=">>">ti./spa ti.spa class="lxr_search">tion ="+search" method="post" onsubmit="return do_search(this);">tion14.input typ hidden" nam navtarget" ion> ">tion14.input typ text" nam search" id search">tion14.buttopttyp submit">Searchtion14Prefs 14./a>ti./spa on14 4./div on14 4.form ac > ="ajax+*" method="post" onsubmit="return false;">ti.input typ hidden" nam ajax_lookup" id ajax_lookup" ion> ">ton14 4./form ton14 4.div class="headingbottom">
.div id file_contents"
4 41./a>.spa
 class="comment">/*./spa
  4 42./a>.spa
 class="comment"> * support for probing IDE PCI devices iptthe PCI bus order./spa
  4 43./a>.spa
 class="comment"> *./spa
  4 44./a>.spa
 class="comment"> * Copyright (c) 1998-2000  Andre Hedrick <andre@linux-ide.org>./spa
  4 45./a>.spa
 class="comment"> * Copyright (c) 1995-1998  Mark Lord./spa
  4 46./a>.spa
 class="comment"> *./spa
  4 47./a>.spa
 class="comment"> * May be copied or modified undertthe terms oftthe GNU General Public License./spa
  4 48./a>.spa
 class="comment"> */./spa
  4 49./a>t4 .11"a>#include <linux/kernel.h1"a>>t4 111"a>#include <linux/init.h1"a>>t4 121"a>#include <linux/module.h1"a>>t4 131"a>#include <linux/ide.h1"a>>t4 14./a>t4 15./a>.spa
 class="comment">/*./spa
  4 16./a>.spa
 class="comment"> *on14 4Module ipterfaces./spa
  4 17./a>.spa
 class="comment"> */./spa
  4 18./a>t4 19./a>static ipt4.a href="+code=pre_init" class="sref">pre_init./a> = 1;                .spa
 class="comment">/* Before first ordered IDE scan */./spa
  4 20./a>static .a href="+code=LIST_HEAD" class="sref">LIST_HEAD./a>(.a href="+code=ide_pci_drivers" class="sref">ide_pci_drivers./a>);t4 21./a>t4 22./a>.spa
 class="comment">/*./spa
  4 23./a>.spa
 class="comment"> *      __ide_pci_register_driver       -       attach IDE driver./spa
  4 24./a>.spa
 class="comment"> *      @driver: pci driver./spa
  4 25./a>.spa
 class="comment"> *      @module: owner module oftthe driver./spa
  4 26./a>.spa
 class="comment"> *./spa
  4 27./a>.spa
 class="comment"> *      Registers a driver withtthe IDE layer. The IDE layer arranges that./spa
  4 28./a>.spa
 class="comment"> *      boot time setup is done iptthe expected device order andtthen./spa
  4 29./a>.spa
 class="comment"> *      handstthe controllers offttotthe core PCI codettotdotthe rest of./spa
  4 30./a>.spa
 class="comment"> *      the work../spa
  4 31./a>.spa
 class="comment"> *./spa
  4 32./a>.spa
 class="comment"> *      Returns are the sam
 as for pci_register_driver./spa
  4 33./a>.spa
 class="comment"> */./spa
  4 34./a>t4 35./a>ipt4.a href="+code=__ide_pci_register_driver" class="sref">__ide_pci_register_driver./a>(struct4.a href="+code=pci_driver" class="sref">pci_driver./a> *.a href="+code=driver" class="sref">driver./a>, struct4.a href="+code=module" class="sref">module./a> *.a href="+code=module" class="sref">module./a>,t4 36./a>                              const char *.a href="+code=mod_nam
" class="sref">mod_nam
./a>)t4 37./a>{t4 38./a>        if (!.a href="+code=pre_init" class="sref">pre_init./a>)t4 39./a>                return .a href="+code=__pci_register_driver" class="sref">__pci_register_driver./a>(.a href="+code=driver" class="sref">driver./a>, .a href="+code=module" class="sref">module./a>, .a href="+code=mod_nam
" class="sref">mod_nam
./a>);t4 40./a>        .a href="+code=driver" class="sref">driver./a>->.a href="+code=driver" class="sref">driver./a>..a href="+code=owner" class="sref">owner./a> = .a href="+code=module" class="sref">module./a>;t4 41./a>        .a href="+code=list_add_tail" class="sref">list_add_tail./a>(&.a href="+code=driver" class="sref">driver./a>->.a href="+code=node" class="sref">node./a>, &.a href="+code=ide_pci_drivers" class="sref">ide_pci_drivers./a>);t4 42./a>        return 0;t4 43./a>}t4 44./a>.a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL./a>(.a href="+code=__ide_pci_register_driver" class="sref">__ide_pci_register_driver./a>);t4 45./a>t4 46./a>.spa
 class="comment">/**./spa
  4 47./a>.spa
 class="comment"> *      ide_scan_pcidev         -       findta
 IDE driver for a device./spa
  4 48./a>.spa
 class="comment"> *      @dev: PCI devicettotcheck./spa
  4 49./a>.spa
 class="comment"> *./spa
  4 50./a>.spa
 class="comment"> *      Look for a
 IDE driver tothandle the devicetwe are considering../spa
  4 51./a>.spa
 class="comment"> *      This is only used during boot up totget the ordering correct. After./spa
  4 52./a>.spa
 class="comment"> *      boot up the pci layer takes overtthe job../spa
  4 53./a>.spa
 class="comment"> */./spa
  4 54./a>t4 55./a>static ipt4.a href="+code=__init" class="sref">__init./a> .a href="+code=ide_scan_pcidev" class="sref">ide_scan_pcidev./a>(struct4.a href="+code=pci_dev" class="sref">pci_dev./a> *.a href="+code=dev" class="sref">dev./a>)t4 56./a>{t4 57./a>        struct4.a href="+code=list_head" class="sref">list_head./a> *.a href="+code=l" class="sref">l./a>;t4 58./a>        struct4.a href="+code=pci_driver" class="sref">pci_driver./a> *.a href="+code=d" class="sref">d./a>;t4 59./a>t4 60./a>        .a href="+code=list_for_each" class="sref">list_for_each./a>(.a href="+code=l" class="sref">l./a>, &.a href="+code=ide_pci_drivers" class="sref">ide_pci_drivers./a>) {t4 61./a>                .a href="+code=d" class="sref">d./a> = .a href="+code=list_entry" class="sref">list_entry./a>(.a href="+code=l" class="sref">l./a>, struct4.a href="+code=pci_driver" class="sref">pci_driver./a>, .a href="+code=node" class="sref">node./a>);t4 62./a>                if (.a href="+code=d" class="sref">d./a>->.a href="+code=id_table" class="sref">id_table./a>) {t4 63./a>                        const struct4.a href="+code=pci_device_id" class="sref">pci_device_id./a> *.a href="+code=id" class="sref">id./a> =t4 64./a>                                .a href="+code=pci_match_id" class="sref">pci_match_id./a>(.a href="+code=d" class="sref">d./a>->.a href="+code=id_table" class="sref">id_table./a>, .a href="+code=dev" class="sref">dev./a>);t4 65./a>t4 66./a>                        if (.a href="+code=id" class="sref">id./a> != .a href="+code=NULL" class="sref">NULL./a> && .a href="+code=d" class="sref">d./a>->.a href="+code=probe" class="sref">probe./a>(.a href="+code=dev" class="sref">dev./a>, .a href="+code=id" class="sref">id./a>) >= 0) {t4 67./a>                                .a href="+code=dev" class="sref">dev./a>->.a href="+code=driver" class="sref">driver./a> = .a href="+code=d" class="sref">d./a>;t4 68./a>                                .a href="+code=pci_dev_get" class="sref">pci_dev_get./a>(.a href="+code=dev" class="sref">dev./a>);t4 69./a>                                return 1;t4 70./a>                        }t4 71./a>                }t4 72./a>        }t4 73./a>        return 0;t4 74./a>}t4 75./a>t4 76./a>.spa
 class="comment">/**./spa
  4 77./a>.spa
 class="comment"> *      ide_scan_pcibus         -       perform the initial IDE driver scan./spa
  4 78./a>.spa
 class="comment"> *./spa
  4 79./a>.spa
 class="comment"> *      Perform the initial bus ratherttha
 driver ordered scan oftthe./spa
  4 80./a>.spa
 class="comment"> *      PCI drivers. After this all IDE pci handling becomes standard./spa
  4 81./a>.spa
 class="comment"> *      module ordering not tradi  >
ally ordered../spa
  4 82./a>.spa
 class="comment"> */./spa
  4 83./a>t4 84./a>static ipt4.a href="+code=__init" class="sref">__init./a> .a href="+code=ide_scan_pcibus" class="sref">ide_scan_pcibus./a>(void)t4 85./a>{t4 86./a>        struct4.a href="+code=pci_dev" class="sref">pci_dev./a> *.a href="+code=dev" class="sref">dev./a> = .a href="+code=NULL" class="sref">NULL./a>;t4 87./a>        struct4.a href="+code=pci_driver" class="sref">pci_driver./a> *.a href="+code=d" class="sref">d./a>;t4 88./a>        struct4.a href="+code=list_head" class="sref">list_head./a> *.a href="+code=l" class="sref">l./a>, *.a href="+code=n" class="sref">n./a>;t4 89./a>t4 90./a>        .a href="+code=pre_init" class="sref">pre_init./a> = 0;t4 91./a>        .a href="+code=for_each_pci_dev" class="sref">for_each_pci_dev./a>(.a href="+code=dev" class="sref">dev./a>)t4 92./a>                .a href="+code=ide_scan_pcidev" class="sref">ide_scan_pcidev./a>(.a href="+code=dev" class="sref">dev./a>);t4 93./a>t4 94./a>        .spa
 class="comment">/*./spa
  4 95./a>.spa
 class="comment">         *      Handtthe drivers overttotthe PCI layer now we./spa
  4 96./a>.spa
 class="comment">         *      are post init../spa
  4 97./a>.spa
 class="comment">         */./spa
  4 98./a>t4 99./a>        .a href="+code=list_for_each_safe" class="sref">list_for_each_safe./a>(.a href="+code=l" class="sref">l./a>, .a href="+code=n" class="sref">n./a>, &.a href="+code=ide_pci_drivers" class="sref">ide_pci_drivers./a>) {t4100./a>                .a href="+code=list_del" class="sref">list_del./a>(.a href="+code=l" class="sref">l./a>);t4101./a>                .a href="+code=d" class="sref">d./a> = .a href="+code=list_entry" class="sref">list_entry./a>(.a href="+code=l" class="sref">l./a>, struct4.a href="+code=pci_driver" class="sref">pci_driver./a>, .a href="+code=node" class="sref">node./a>);t4102./a>                if (.a href="+code=__pci_register_driver" class="sref">__pci_register_driver./a>(.a href="+code=d" class="sref">d./a>, .a href="+code=d" class="sref">d./a>->.a href="+code=driver" class="sref">driver./a>..a href="+code=owner" class="sref">owner./a>,t4103./a>                                          .a href="+code=d" class="sref">d./a>->.a href="+code=driver" class="sref">driver./a>..a href="+code=mod_nam
" class="sref">mod_nam
./a>))t4104./a>                        .a href="+code=priptk" class="sref">priptk./a>(.a href="+code=KERN_ERR" class="sref">KERN_ERR./a> .spa
 class="string">"%s: failedttotregister %s driver\n"./spa
 ,t4105./a>                                        .a href="+code=__func__" class="sref">__func__./a>, .a href="+code=d" class="sref">d./a>->.a href="+code=driver" class="sref">driver./a>..a href="+code=mod_nam
" class="sref">mod_nam
./a>);t4106./a>        }t4107./a>t4108./a>        return 0;t4109./a>}t41.11"a>t41111"a>.a href="+code=module_init" class="sref">module_init./a>(.a href="+code=ide_scan_pcibus" class="sref">ide_scan_pcibus./a>);t41121"a>
wThe orrgi3 id2LXR softwre pbythe Pa href="dhttp://sourcforege.netpreojects/lx">wLXR ommeuit.y/a>, .his axpecrient"id2ers/optibyta href="dmileto:lx"linux-.no>l.x"linux-.no/a>.../div div class="fsubooter">wT.x".inux-.no kindly hst dttbyta href="dhttp://www.redpill-inureo.no>lRedpill Lnureo AS/a>, .reovier aof Lnuuxconstultng nndttoecra > as serices isince1995-../div .d/body d/html .