linux/drivers/ata/ahci.c
<<
3" /spaion /formon a 3" href="../linux+v3v2.2/drivers/ata/ahci.c">3" img src="../.static/gfx/right.png" alt=">>">3" /spaion3" spai class="lxr_search">3" 3" input typluehidden" namluenavtarget" n value">3" input typluetext" namluesearch" iduesearch">3" butttiotypluesubmit">Search3" Prefsn /a>3" /spaion /divon form acopti="ajax+*" method="post" onsubmit="return false;">3" input typluehidden" namlueajax_lookup" idueajax_lookup" n value">3 /formon3 div class="headingbotttm">n div iduefile_contents"o
 
1 /a> spai class="comment">/* /spaion
 
2 /a> spai class="comment"> *  ahci.c - AHCI SATA support /spaion
 
3 /a> spai class="comment"> * /spaion
 
4 /a> spai class="comment"> *  Maintained by:  Jeff Garzik <jgarzik@pobox.com> /spaion
 
5 /a> spai class="comment"> *                  Please ALWAYS copy linux-ide@vger.kernel.org /spaion
 
6 /a> spai class="comment"> *                  tioemails. /spaion
 
7 /a> spai class="comment"> * /spaion
 
8 /a> spai class="comment"> *  Copyright 2004-2005 Red Hat, Inc. /spaion
 
9 /a> spai class="comment"> * /spaion
  spai class="comment"> * /spaion
 11 /a> spai class="comment"> *  This program is free software; you cai redistribute it and/or modify /spaion
 12 /a> spai class="comment"> *  it under the terms of the GNU General Public License as published by /spaion
 13 /a> spai class="comment"> *  the Free Software Foundaopti; either versptio2, or (at your 
 14 /a> spai class="comment"> *  any later verspti. /spaion
 15 /a> spai class="comment"> * /spaion
 16 /a> spai class="comment"> *  This program is distributed in the hope that it will be useful, /spaion
 17 /a> spai class="comment"> *  but WITHOUT ANY WARRANTY; without even the implied warranty of /spaion
 18 /a> spai class="comment"> *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the /spaion
 19 /a> spai class="comment"> *  GNU General Public License for more details. /spaion
 2/opa> spai class="comment"> * /spaion
 21 /a> spai class="comment"> *  You should have received a copy of the GNU General Public License /spaion
 22 /a> spai class="comment"> *  along with this program; see the file COPYING.  If not, write to /spaion
 23 /a> spai class="comment"> *  the Free Software Foundaopti, 675 Mass Ave, Cambridge, MA 02139, USA. /spaion
 24 /a> spai class="comment"> * /spaion
 25 /a> spai class="comment"> * /spaion
 26 /a> spai class="comment"> * libata documentaopti is available via 'make {ps|pdf}docs', /spaion
 27 /a> spai class="comment"> * as Documentaopti/DocBook/libata.* /spaion
 28 /a> spai class="comment"> * /spaion
 29 /a> spai class="comment"> * AHCI hardware documentaopti: /spaion
 3/opa> spai class="comment"> * http://www.intel.com/technology/serialata/pdf/rev1_0.pdf /spaion
 31 /a> spai class="comment"> * http://www.intel.com/technology/serialata/pdf/rev1_1.pdf /spaion
 32 /a> spai class="comment"> * /spaion
 33 /a> spai class="comment"> */ /spaion
 34 /a>n
 35 /a>#include <linux/kernel.h /a>>n
 36 /a>#include <linux/module.h /a>>n
 37 /a>#include <linux/pci.h /a>>n
 38 /a>#include <linux/init.h /a>>n
 39 /a>#include <linux/blkdev.h /a>>n
 40 /a>#include <linux/delay.h /a>>n
 41 /a>#include <linux/interrupt.h /a>>n
 42 /a>#include <linux/dma-mapping.h /a>>n
 43 /a>#include <linux/device.h /a>>n
 44 /a>#include <linux/dmi.h /a>>n
 45 /a>#include <linux/gfp.h /a>>n
 46 /a>#include <scsi/scsi_host.h /a>>n
 47 /a>#include <scsi/scsi_cmnd.h /a>>n
 48 /a>#include <linux/libata.h /a>>n
 49 /a>#include "ahci.h /a>"n
 50 /a>n
 51 /a>#define
 a href="+code=DRV_NAME" class="sref">DRV_NAME /a>         spai class="string">"ahci"
 52 /a>#define
 a href="+code=DRV_VERSION" class="sref">DRV_VERSION /a>      spai class="string">"3.0"
 53 /a>n
 54 /a>enum {n
 55 /a>         a href="+code=AHCI_PCI_BAR_STA2X11" class="sref">AHCI_PCI_BAR_STA2X11 /a>    = 0,n
 56 /a>         a href="+code=AHCI_PCI_BAR_STANDARD" class="sref">AHCI_PCI_BAR_STANDARD /a>   = 5,n
 57 /a>};n
 58 /a>n
 59 /a>enum  a href="+code=board_ids" class="sref">board_ids /a> {n
 60 /a>         spai class="comment">/* board IDs by feature in alphabetical order */ /spaion
 61 /a>         a href="+code=board_ahci" class="sref">board_ahci /a>,n
 62 /a>         a href="+code=board_ahci_ign_iferr" class="sref">board_ahci_ign_iferr /a>,n
 63 /a>         a href="+code=board_ahci_nosntf" class="sref">board_ahci_nosntf /a>,n
 64 /a>         a href="+code=board_ahci_yes_fbs" class="sref">board_ahci_yes_fbs /a>,n
 65 /a>n
 66 /a>         spai class="comment">/* board IDs for specific chipsets in alphabetical order */ /spaion
 67 /a>         a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a>,n
 68 /a>         a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a>,n
 69 /a>         a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a>,n
 70 /a>         a href="+code=board_ahci_mv" class="sref">board_ahci_mv /a>,n
 71 /a>         a href="+code=board_ahci_sb600" class="sref">board_ahci_sb600 /a>,n
 72 /a>         a href="+code=board_ahci_sb700" class="sref">board_ahci_sb700 /a>,        spai class="comment">/* for SB700 and SB800 */ /spaion
 73 /a>         a href="+code=board_ahci_vt8251" class="sref">board_ahci_vt8251 /a>,n
 74 /a>n
 75 /a>         spai class="comment">/* aliases */ /spaion
 76 /a>         a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a>    =  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a>,n
 77 /a>         a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a>        =  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a>,n
 78 /a>         a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a>        =  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a>,n
 79 /a>         a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a>        =  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a>,n
 80 /a>};n
 81 /a>n
 82 /a>static int  a href="+code=ahci_init_one" class="sref">ahci_init_one /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>, const struct  a href="+code=pci_device_id" class="sref">pci_device_id /a> * a href="+code=ent" class="sref">ent /a>);n
 83 /a>static int  a href="+code=ahci_vt8251_hardreset" class="sref">ahci_vt8251_hardreset /a>(struct  a href="+code=ata_link" class="sref">ata_link /a> * a href="+code=link" class="sref">link /a>, unsigned int * a href="+code=class" class="sref">class /a>,n
 84 /a>                                 unsigned long  a href="+code=deadline" class="sref">deadline /a>);n
 85 /a>static int  a href="+code=ahci_p5wdh_hardreset" class="sref">ahci_p5wdh_hardreset /a>(struct  a href="+code=ata_link" class="sref">ata_link /a> * a href="+code=link" class="sref">link /a>, unsigned int * a href="+code=class" class="sref">class /a>,n
 86 /a>                                unsigned long  a href="+code=deadline" class="sref">deadline /a>);n
 87 /a>#ifdef  a href="+code=CONFIG_PM" class="sref">CONFIG_PM /a>n
 88 /a>static int  a href="+code=ahci_pci_device_suspend" class="sref">ahci_pci_device_suspend /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>,  a href="+code=pm_message_t" class="sref">pm_message_t /a>  a href="+code=mesg" class="sref">mesg /a>);n
 89 /a>static int  a href="+code=ahci_pci_device_resume" class="sref">ahci_pci_device_resume /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>);n
 90 /a>#endifn
 91 /a>n
 92 /a>static struct  a href="+code=scsi_host_template" class="sref">scsi_host_template /a>  a href="+code=ahci_sht" class="sref">ahci_sht /a> = {n
 93 /a>         a href="+code=AHCI_SHT" class="sref">AHCI_SHT /a>( spai class="string">"ahci"
 94 /a>};n
 95 /a>n
 96 /a>static struct  a href="+code=ata_port_operaoptis" class="sref">ata_port_operaoptis /a>  a href="+code=ahci_vt8251_ops" class="sref">ahci_vt8251_ops /a> = {n
 97 /a>        . a href="+code=inherits" class="sref">inherits /a>               = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
 98 /a>        . a href="+code=hardreset" class="sref">hardreset /a>              =  a href="+code=ahci_vt8251_hardreset" class="sref">ahci_vt8251_hardreset /a>,n
 99 /a>};n
100 /a>n
101 /a>static struct  a href="+code=ata_port_operaoptis" class="sref">ata_port_operaoptis /a>  a href="+code=ahci_p5wdh_ops" class="sref">ahci_p5wdh_ops /a> = {n
102 /a>        . a href="+code=inherits" class="sref">inherits /a>               = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
103 /a>        . a href="+code=hardreset" class="sref">hardreset /a>              =  a href="+code=ahci_p5wdh_hardreset" class="sref">ahci_p5wdh_hardreset /a>,n
104 /a>};n
105 /a>n
106 /a>static const struct  a href="+code=ata_port_info" class="sref">ata_port_info /a>  a href="+code=ahci_port_info" class="sref">ahci_port_info /a>[] = {n
107 /a>         spai class="comment">/* by features */ /spaion
108 /a>        [ a href="+code=board_ahci" class="sref">board_ahci /a>] = {n
109 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a>,n
110 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
111 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
112 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
113 /a>        },n
114 /a>        [ a href="+code=board_ahci_ign_iferr" class="sref">board_ahci_ign_iferr /a>] = {n
115 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_IGN_IRQ_IF_ERR" class="sref">AHCI_HFLAG_IGN_IRQ_IF_ERR /a>),n
116 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a>,n
117 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
118 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
119 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
120 /a>        },n
121 /a>        [ a href="+code=board_ahci_nosntf" class="sref">board_ahci_nosntf /a>] = {n
122 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_NO_SNTF" class="sref">AHCI_HFLAG_NO_SNTF /a>),n
123 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a>,n
124 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
125 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
126 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
127 /a>        },n
128 /a>        [ a href="+code=board_ahci_yes_fbs" class="sref">board_ahci_yes_fbs /a>] = {n
129 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_YES_FBS" class="sref">AHCI_HFLAG_YES_FBS /a>),n
130 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a>,n
131 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
132 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
133 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
134 /a>        },n
135 /a>         spai class="comment">/* by chipsets */ /spaion
136 /a>        [ a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a>] = {n
137 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_NO_FPDMA_AA" class="sref">AHCI_HFLAG_NO_FPDMA_AA /a> |  a href="+code=AHCI_HFLAG_NO_PMP" class="sref">AHCI_HFLAG_NO_PMP /a> |n
138 /a>                                  a href="+code=AHCI_HFLAG_YES_NCQ" class="sref">AHCI_HFLAG_YES_NCQ /a>),n
139 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a> |  a href="+code=ATA_FLAG_NO_DIPM" class="sref">ATA_FLAG_NO_DIPM /a>,n
140 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
141 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
142 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
143 /a>        },n
144 /a>        [ a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a>] = {n
145 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_NO_FPDMA_AA" class="sref">AHCI_HFLAG_NO_FPDMA_AA /a> |  a href="+code=AHCI_HFLAG_NO_PMP" class="sref">AHCI_HFLAG_NO_PMP /a>),n
146 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a>,n
147 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
148 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
149 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
150 /a>        },n
151 /a>        [ a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a>] = {n
152 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_NO_FPDMA_AA" class="sref">AHCI_HFLAG_NO_FPDMA_AA /a>),n
153 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a>,n
154 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
155 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
156 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
157 /a>        },n
158 /a>        [ a href="+code=board_ahci_mv" class="sref">board_ahci_mv /a>] = {n
159 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_NO_NCQ" class="sref">AHCI_HFLAG_NO_NCQ /a> |  a href="+code=AHCI_HFLAG_NO_MSI" class="sref">AHCI_HFLAG_NO_MSI /a> |n
160 /a>                                  a href="+code=AHCI_HFLAG_MV_PATA" class="sref">AHCI_HFLAG_MV_PATA /a> |  a href="+code=AHCI_HFLAG_NO_PMP" class="sref">AHCI_HFLAG_NO_PMP /a>),n
161 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=ATA_FLAG_SATA" class="sref">ATA_FLAG_SATA /a> |  a href="+code=ATA_FLAG_PIO_DMA" class="sref">ATA_FLAG_PIO_DMA /a>,n
162 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
163 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
164 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_ops" class="sref">ahci_ops /a>,n
165 /a>        },n
166 /a>        [ a href="+code=board_ahci_sb600" class="sref">board_ahci_sb600 /a>] = {n
167 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_IGN_SERR_INTERNAL" class="sref">AHCI_HFLAG_IGN_SERR_INTERNAL /a> |n
168 /a>                                  a href="+code=AHCI_HFLAG_NO_MSI" class="sref">AHCI_HFLAG_NO_MSI /a> |  a href="+code=AHCI_HFLAG_SECT255" class="sref">AHCI_HFLAG_SECT255 /a> |n
169 /a>                                  a href="+code=AHCI_HFLAG_32BIT_ONLY" class="sref">AHCI_HFLAG_32BIT_ONLY /a>),n
170 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a>,n
171 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
172 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
173 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_pmp_retry_srst_ops" class="sref">ahci_pmp_retry_srst_ops /a>,n
174 /a>        },n
175 /a>        [ a href="+code=board_ahci_sb700" class="sref">board_ahci_sb700 /a>] = {   spai class="comment">/* for SB700 and SB800 */ /spaion
176 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_IGN_SERR_INTERNAL" class="sref">AHCI_HFLAG_IGN_SERR_INTERNAL /a>),n
177 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a>,n
178 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
179 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
180 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_pmp_retry_srst_ops" class="sref">ahci_pmp_retry_srst_ops /a>,n
181 /a>        },n
182 /a>        [ a href="+code=board_ahci_vt8251" class="sref">board_ahci_vt8251 /a>] = {n
183 /a>                 a href="+code=AHCI_HFLAGS" class="sref">AHCI_HFLAGS /a>     ( a href="+code=AHCI_HFLAG_NO_NCQ" class="sref">AHCI_HFLAG_NO_NCQ /a> |  a href="+code=AHCI_HFLAG_NO_PMP" class="sref">AHCI_HFLAG_NO_PMP /a>),n
184 /a>                . a href="+code=flags" class="sref">flags /a>          =  a href="+code=AHCI_FLAG_COMMON" class="sref">AHCI_FLAG_COMMON /a>,n
185 /a>                . a href="+code=pio_mask" class="sref">pio_mask /a>       =  a href="+code=ATA_PIO4" class="sref">ATA_PIO4 /a>,n
186 /a>                . a href="+code=udma_mask" class="sref">udma_mask /a>      =  a href="+code=ATA_UDMA6" class="sref">ATA_UDMA6 /a>,n
187 /a>                . a href="+code=port_ops" class="sref">port_ops /a>       = & a href="+code=ahci_vt8251_ops" class="sref">ahci_vt8251_ops /a>,n
188 /a>        },n
189 /a>};n
190 /a>n
191 /a>static const struct  a href="+code=pci_device_id" class="sref">pci_device_id /a>  a href="+code=ahci_pci_tbl" class="sref">ahci_pci_tbl /a>[] = {n
192 /a>         spai class="comment">/* Intel */ /spaion
193 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2652),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH6 */ /spaion
194 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2653),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH6M */ /spaion
195 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x27c1),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH7 */ /spaion
196 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x27c5),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH7M */ /spaion
197 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x27c3),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH7R */ /spaion
198 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=AL" class="sref">AL /a>, 0x5288),  a href="+code=board_ahci_ign_iferr" class="sref">board_ahci_ign_iferr /a> },  spai class="comment">/* ULi M5288 */ /spaion
199 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2681),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ESB2 */ /spaion
200 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2682),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ESB2 */ /spaion
201 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2683),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ESB2 */ /spaion
202 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x27c6),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH7-M DH */ /spaion
203 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2821),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH8 */ /spaion
204 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2822),  a href="+code=board_ahci_nosntf" class="sref">board_ahci_nosntf /a> },  spai class="comment">/* ICH8 */ /spaion
205 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2824),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH8 */ /spaion
206 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2829),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH8M */ /spaion
207 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x282a),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH8M */ /spaion
208 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2922),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9 */ /spaion
209 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2923),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9 */ /spaion
210 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2924),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9 */ /spaion
211 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2925),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9 */ /spaion
212 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2927),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9 */ /spaion
213 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2929),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9M */ /spaion
214 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x292a),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9M */ /spaion
215 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x292b),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9M */ /spaion
216 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x292c),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9M */ /spaion
217 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x292f),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9M */ /spaion
218 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x294d),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9 */ /spaion
219 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x294e),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH9M */ /spaion
220 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x502a),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Tolapai */ /spaion
221 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x502b),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Tolapai */ /spaion
222 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3a05),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH10 */ /spaion
223 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3a22),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH10 */ /spaion
224 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3a25),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* ICH10 */ /spaion
225 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3b22),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PCH AHCI */ /spaion
226 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3b23),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PCH AHCI */ /spaion
227 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3b24),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PCH RAID */ /spaion
228 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3b25),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PCH RAID */ /spaion
229 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3b29),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PCH AHCI */ /spaion
230 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3b2b),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PCH RAID */ /spaion
231 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3b2c),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PCH RAID */ /spaion
232 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x3b2f),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PCH AHCI */ /spaion
233 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1c02),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* CPT AHCI */ /spaion
234 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1c03),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* CPT AHCI */ /spaion
235 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1c04),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* CPT RAID */ /spaion
236 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1c05),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* CPT RAID */ /spaion
237 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1c06),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* CPT RAID */ /spaion
238 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1c07),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* CPT RAID */ /spaion
239 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1d02),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PBG AHCI */ /spaion
240 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1d04),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PBG RAID */ /spaion
241 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1d06),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PBG RAID */ /spaion
242 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2826),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* PBG RAID */ /spaion
243 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x2323),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* DH89xxCC AHCI */ /spaion
244 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1e02),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Panther Point AHCI */ /spaion
245 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1e03),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Panther Point AHCI */ /spaion
246 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1e04),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Panther Point RAID */ /spaion
247 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1e05),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Panther Point RAID */ /spaion
248 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1e06),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Panther Point RAID */ /spaion
249 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1e07),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Panther Point RAID */ /spaion
250 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x1e0e),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Panther Point RAID */ /spaion
251 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x8c02),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point AHCI */ /spaion
252 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x8c03),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point AHCI */ /spaion
253 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x8c04),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point RAID */ /spaion
254 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x8c05),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point RAID */ /spaion
255 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x8c06),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point RAID */ /spaion
256 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x8c07),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point RAID */ /spaion
257 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x8c0e),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point RAID */ /spaion
258 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x8c0f),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point RAID */ /spaion
259 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x9c02),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point-LP AHCI */ /spaion
260 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x9c03),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point-LP AHCI */ /spaion
261 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x9c04),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point-LP RAID */ /spaion
262 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x9c05),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point-LP RAID */ /spaion
263 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x9c06),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point-LP RAID */ /spaion
264 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x9c07),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point-LP RAID */ /spaion
265 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x9c0e),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point-LP RAID */ /spaion
266 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=INTEL" class="sref">INTEL /a>, 0x9c0f),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* Lynx Point-LP RAID */ /spaion
267 /a>n
268 /a>         spai class="comment">/* JMicron 360/1/3/5/6, match class to avoid IDE function */ /spaion
269 /a>        {  a href="+code=PCI_VENDOR_ID_JMICRON" class="sref">PCI_VENDOR_ID_JMICRON /a>,  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,n
270 /a>           a href="+code=PCI_CLASS_STORAGE_SATA_AHCI" class="sref">PCI_CLASS_STORAGE_SATA_AHCI /a>, 0xffffff,  a href="+code=board_ahci_ign_iferr" class="sref">board_ahci_ign_iferr /a> },n
271 /a>         spai class="comment">/* JMicron 362B and 362C have an AHCI function with IDE class code */ /spaion
272 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=JMICRON" class="sref">JMICRON /a>, 0x2362),  a href="+code=board_ahci_ign_iferr" class="sref">board_ahci_ign_iferr /a> },n
273 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=JMICRON" class="sref">JMICRON /a>, 0x236f),  a href="+code=board_ahci_ign_iferr" class="sref">board_ahci_ign_iferr /a> },n
274 /a>n
275 /a>         spai class="comment">/* ATI */ /spaion
276 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ATI" class="sref">ATI /a>, 0x4380),  a href="+code=board_ahci_sb600" class="sref">board_ahci_sb600 /a> },  spai class="comment">/* ATI SB600 */ /spaion
277 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ATI" class="sref">ATI /a>, 0x4390),  a href="+code=board_ahci_sb700" class="sref">board_ahci_sb700 /a> },  spai class="comment">/* ATI SB700/800 */ /spaion
278 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ATI" class="sref">ATI /a>, 0x4391),  a href="+code=board_ahci_sb700" class="sref">board_ahci_sb700 /a> },  spai class="comment">/* ATI SB700/800 */ /spaion
279 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ATI" class="sref">ATI /a>, 0x4392),  a href="+code=board_ahci_sb700" class="sref">board_ahci_sb700 /a> },  spai class="comment">/* ATI SB700/800 */ /spaion
280 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ATI" class="sref">ATI /a>, 0x4393),  a href="+code=board_ahci_sb700" class="sref">board_ahci_sb700 /a> },  spai class="comment">/* ATI SB700/800 */ /spaion
281 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ATI" class="sref">ATI /a>, 0x4394),  a href="+code=board_ahci_sb700" class="sref">board_ahci_sb700 /a> },  spai class="comment">/* ATI SB700/800 */ /spaion
282 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ATI" class="sref">ATI /a>, 0x4395),  a href="+code=board_ahci_sb700" class="sref">board_ahci_sb700 /a> },  spai class="comment">/* ATI SB700/800 */ /spaion
283 /a>n
284 /a>         spai class="comment">/* AMD */ /spaion
285 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=AMD" class="sref">AMD /a>, 0x7800),  a href="+code=board_ahci" class="sref">board_ahci /a> },  spai class="comment">/* AMD Hudson-2 */ /spaion
286 /a>         spai class="comment">/* AMD is using RAID class only for ahci controllers */ /spaion
287 /a>        {  a href="+code=PCI_VENDOR_ID_AMD" class="sref">PCI_VENDOR_ID_AMD /a>,  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,n
288 /a>           a href="+code=PCI_CLASS_STORAGE_RAID" class="sref">PCI_CLASS_STORAGE_RAID /a> << 8, 0xffffff,  a href="+code=board_ahci" class="sref">board_ahci /a> },n
289 /a>n
290 /a>         spai class="comment">/* VIA */ /spaion
291 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=VIA" class="sref">VIA /a>, 0x3349),  a href="+code=board_ahci_vt8251" class="sref">board_ahci_vt8251 /a> },  spai class="comment">/* VIA VT8251 */ /spaion
292 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=VIA" class="sref">VIA /a>, 0x6287),  a href="+code=board_ahci_vt8251" class="sref">board_ahci_vt8251 /a> },  spai class="comment">/* VIA VT8251 */ /spaion
293 /a>n
294 /a>         spai class="comment">/* NVIDIA */ /spaion
295 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x044c),  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a> },       spai class="comment">/* MCP65 */ /spaion
296 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x044d),  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a> },       spai class="comment">/* MCP65 */ /spaion
297 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x044e),  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a> },       spai class="comment">/* MCP65 */ /spaion
298 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x044f),  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a> },       spai class="comment">/* MCP65 */ /spaion
299 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x045c),  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a> },       spai class="comment">/* MCP65 */ /spaion
300 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x045d),  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a> },       spai class="comment">/* MCP65 */ /spaion
301 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x045e),  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a> },       spai class="comment">/* MCP65 */ /spaion
302 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x045f),  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a> },       spai class="comment">/* MCP65 */ /spaion
303 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0550),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
304 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0551),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
305 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0552),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
306 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0553),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
307 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0554),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
308 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0555),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
309 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0556),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
310 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0557),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
311 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0558),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
312 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0559),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
313 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x055a),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
314 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x055b),  a href="+code=board_ahci_mcp67" class="sref">board_ahci_mcp67 /a> },       spai class="comment">/* MCP67 */ /spaion
315 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0580),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
316 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0581),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
317 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0582),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
318 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0583),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
319 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0584),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
320 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0585),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
321 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0586),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
322 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0587),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
323 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0588),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
324 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0589),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
325 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x058a),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
326 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x058b),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
327 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x058c),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
328 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x058d),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
329 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x058e),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
330 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x058f),  a href="+code=board_ahci_mcp_linux" class="sref">board_ahci_mcp_linux /a> },   spai class="comment">/* Linux ID */ /spaion
331 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f0),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
332 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f1),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
333 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f2),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
334 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f3),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
335 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f4),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
336 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f5),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
337 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f6),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
338 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f7),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
339 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f8),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
340 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07f9),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
341 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07fa),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
342 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x07fb),  a href="+code=board_ahci_mcp73" class="sref">board_ahci_mcp73 /a> },       spai class="comment">/* MCP73 */ /spaion
343 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad0),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
344 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad1),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
345 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad2),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
346 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad3),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
347 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad4),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
348 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad5),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
349 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad6),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
350 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad7),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
351 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad8),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
352 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ad9),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
353 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ada),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
354 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0adb),  a href="+code=board_ahci_mcp77" class="sref">board_ahci_mcp77 /a> },       spai class="comment">/* MCP77 */ /spaion
355 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ab4),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
356 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ab5),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
357 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ab6),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
358 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ab7),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
359 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ab8),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
360 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0ab9),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
361 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0aba),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
362 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0abb),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
363 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0abc),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
364 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0abd),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
365 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0abe),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
366 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0abf),  a href="+code=board_ahci_mcp79" class="sref">board_ahci_mcp79 /a> },       spai class="comment">/* MCP79 */ /spaion
367 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d84),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
368 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d85),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
369 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d86),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
370 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d87),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
371 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d88),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
372 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d89),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
373 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d8a),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
374 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d8b),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
375 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d8c),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
376 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d8d),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
377 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d8e),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
378 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=NVIDIA" class="sref">NVIDIA /a>, 0x0d8f),  a href="+code=board_ahci_mcp89" class="sref">board_ahci_mcp89 /a> },       spai class="comment">/* MCP89 */ /spaion
379 /a>n
380 /a>         spai class="comment">/* SiS */ /spaion
381 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=SI" class="sref">SI /a>, 0x1184),  a href="+code=board_ahci" class="sref">board_ahci /a> },                 spai class="comment">/* SiS 966 */ /spaion
382 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=SI" class="sref">SI /a>, 0x1185),  a href="+code=board_ahci" class="sref">board_ahci /a> },                 spai class="comment">/* SiS 968 */ /spaion
383 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=SI" class="sref">SI /a>, 0x0186),  a href="+code=board_ahci" class="sref">board_ahci /a> },                 spai class="comment">/* SiS 968 */ /spaion
384 /a>n
385 /a>         spai class="comment">/* ST Microelectronics */ /spaion
386 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=STMICRO" class="sref">STMICRO /a>, 0xCC06),  a href="+code=board_ahci" class="sref">board_ahci /a> },            spai class="comment">/* ST ConneXt */ /spaion
387 /a>n
388 /a>         spai class="comment">/* Marvell */ /spaion
389 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=MARVELL" class="sref">MARVELL /a>, 0x6145),  a href="+code=board_ahci_mv" class="sref">board_ahci_mv /a> },         spai class="comment">/* 6145 */ /spaion
390 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=MARVELL" class="sref">MARVELL /a>, 0x6121),  a href="+code=board_ahci_mv" class="sref">board_ahci_mv /a> },         spai class="comment">/* 6121 */ /spaion
391 /a>        {  a href="+code=PCI_DEVICE" class="sref">PCI_DEVICE /a>(0x1b4b, 0x9123),n
392 /a>          . a href="+code=class" class="sref">class /a> =  a href="+code=PCI_CLASS_STORAGE_SATA_AHCI" class="sref">PCI_CLASS_STORAGE_SATA_AHCI /a>,n
393 /a>          . a href="+code=class_mask" class="sref">class_mask /a> = 0xffffff,n
394 /a>          . a href="+code=driver_data" class="sref">driver_data /a> =  a href="+code=board_ahci_yes_fbs" class="sref">board_ahci_yes_fbs /a> },                   spai class="comment">/* 88se9128 */ /spaion
395 /a>        {  a href="+code=PCI_DEVICE" class="sref">PCI_DEVICE /a>(0x1b4b, 0x9125),n
396 /a>          . a href="+code=driver_data" class="sref">driver_data /a> =  a href="+code=board_ahci_yes_fbs" class="sref">board_ahci_yes_fbs /a> },                   spai class="comment">/* 88se9125 */ /spaion
397 /a>        {  a href="+code=PCI_DEVICE" class="sref">PCI_DEVICE /a>(0x1b4b, 0x917a),n
398 /a>          . a href="+code=driver_data" class="sref">driver_data /a> =  a href="+code=board_ahci_yes_fbs" class="sref">board_ahci_yes_fbs /a> },                   spai class="comment">/* 88se9172 */ /spaion
399 /a>        {  a href="+code=PCI_DEVICE" class="sref">PCI_DEVICE /a>(0x1b4b, 0x9192),n
400 /a>          . a href="+code=driver_data" class="sref">driver_data /a> =  a href="+code=board_ahci_yes_fbs" class="sref">board_ahci_yes_fbs /a> },                   spai class="comment">/* 88se9172 on some Gigabyte */ /spaion
401 /a>        {  a href="+code=PCI_DEVICE" class="sref">PCI_DEVICE /a>(0x1b4b, 0x91a3),n
402 /a>          . a href="+code=driver_data" class="sref">driver_data /a> =  a href="+code=board_ahci_yes_fbs" class="sref">board_ahci_yes_fbs /a> },n
403 /a>n
404 /a>         spai class="comment">/* Promise */ /spaion
405 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=PROMISE" class="sref">PROMISE /a>, 0x3f20),  a href="+code=board_ahci" class="sref">board_ahci /a> },    spai class="comment">/* PDC42819 */ /spaion
406 /a>n
407 /a>         spai class="comment">/* Asmedia */ /spaion
408 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ASMEDIA" class="sref">ASMEDIA /a>, 0x0601),  a href="+code=board_ahci" class="sref">board_ahci /a> },    spai class="comment">/* ASM1060 */ /spaion
409 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ASMEDIA" class="sref">ASMEDIA /a>, 0x0602),  a href="+code=board_ahci" class="sref">board_ahci /a> },    spai class="comment">/* ASM1060 */ /spaion
410 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ASMEDIA" class="sref">ASMEDIA /a>, 0x0611),  a href="+code=board_ahci" class="sref">board_ahci /a> },    spai class="comment">/* ASM1061 */ /spaion
411 /a>        {  a href="+code=PCI_VDEVICE" class="sref">PCI_VDEVICE /a>( a href="+code=ASMEDIA" class="sref">ASMEDIA /a>, 0x0612),  a href="+code=board_ahci" class="sref">board_ahci /a> },    spai class="comment">/* ASM1062 */ /spaion
412 /a>n
413 /a>         spai class="comment">/* Generic, PCI class code for AHCI */ /spaion
414 /a>        {  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,  a href="+code=PCI_ANY_ID" class="sref">PCI_ANY_ID /a>,n
415 /a>           a href="+code=PCI_CLASS_STORAGE_SATA_AHCI" class="sref">PCI_CLASS_STORAGE_SATA_AHCI /a>, 0xffffff,  a href="+code=board_ahci" class="sref">board_ahci /a> },n
416 /a>n
417 /a>        { }      spai class="comment">/* terminate list */ /spaion
418 /a>};n
419 /a>n
420 /a>n
421 /a>static struct  a href="+code=pci_driver" class="sref">pci_driver /a>  a href="+code=ahci_pci_driver" class="sref">ahci_pci_driver /a> = {n
422 /a>        . a href="+code=naml" class="sref">naml /a>                   =  a href="+code=DRV_NAME" class="sref">DRV_NAME /a>,n
423 /a>        . a href="+code=id_tabll" class="sref">id_tabll /a>               =  a href="+code=ahci_pci_tbl" class="sref">ahci_pci_tbl /a>,n
424 /a>        . a href="+code=probl" class="sref">probl /a>                  =  a href="+code=ahci_init_onl" class="sref">ahci_init_onl /a>,n
425 /a>        . a href="+code=removl" class="sref">removl /a>                 =  a href="+code=ata_pci_removl_onl" class="sref">ata_pci_removl_onl /a>,n
426 /a>#ifdef  a href="+code=CONFIG_PM" class="sref">CONFIG_PM /a>n
427 /a>        . a href="+code=suspend" class="sref">suspend /a>                =  a href="+code=ahci_pci_device_suspend" class="sref">ahci_pci_device_suspend /a>,n
428 /a>        . a href="+code=resuml" class="sref">resuml /a>                 =  a href="+code=ahci_pci_device_resuml" class="sref">ahci_pci_device_resuml /a>,n
429 /a>#endifn
430 /a>};n
431 /a>n
432 /a>#if  a href="+code=defined" class="sref">defined /a>( a href="+code=CONFIG_PATA_MARVELL" class="sref">CONFIG_PATA_MARVELL /a>) ||  a href="+code=defined" class="sref">defined /a>( a href="+code=CONFIG_PATA_MARVELL_MODULE" class="sref">CONFIG_PATA_MARVELL_MODULE /a>)n
433 /a>static int  a href="+code=marvell_enabll" class="sref">marvell_enabll /a>;n
434 /a>#elsen
435 /a>static int  a href="+code=marvell_enabll" class="sref">marvell_enabll /a> = 1;n
436 /a>#endifn
437 /a> a href="+code=module_param" class="sref">module_param /a>( a href="+code=marvell_enabll" class="sref">marvell_enabll /a>, int, 0644);n
438 /a> a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC /a>( a href="+code=marvell_enabll" class="sref">marvell_enabll /a>,  spai class="string">"Marvell SATA via AHCI (1 = enablld)" /spaio);n
439 /a>n
440 /a>n
441 /a>static void  a href="+code=ahci_pci_savl_initial_config" class="sref">ahci_pci_savl_initial_config /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>,n
442 /a>                                         struct  a href="+code=ahci_host_priv" class="sref">ahci_host_priv /a> * a href="+code=hpriv" class="sref">hpriv /a>)n
443 /a>{n
444 /a>        unsigned int  a href="+code=force_port_map" class="sref">force_port_map /a> = 0;n
445 /a>        unsigned int  a href="+code=mask_port_map" class="sref">mask_port_map /a> = 0;n
446 /a>n
447 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=vendor" class="sref">vendor /a> ==  a href="+code=PCI_VENDOR_ID_JMICRON" class="sref">PCI_VENDOR_ID_JMICRON /a> &&  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=device" class="sref">device /a> == 0x2361) {n
448 /a>                 a href="+code=dev_info" class="sref">dev_info /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,  spai class="string">"JMB361 has only one port\n" /spaio);n
449 /a>                 a href="+code=force_port_map" class="sref">force_port_map /a> = 1;n
450 /a>        }n
451 /a>n
452 /a>         spai class="comment">/* /spaion
453 /a> spai class="comment">         * Temporary Marvell 6145 hack: PATA port presence /spaion
454 /a> spai class="comment">         * is asserted through the standard AHCI port /spaion
455 /a> spai class="comment">         * presence register, as bit 4 (counting from 0) /spaion
456 /a> spai class="comment">         */ /spaion
457 /a>        if ( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> &  a href="+code=AHCI_HFLAG_MV_PATA" class="sref">AHCI_HFLAG_MV_PATA /a>) {n
458 /a>                if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=device" class="sref">device /a> == 0x6121)n
459 /a>                         a href="+code=mask_port_map" class="sref">mask_port_map /a> = 0x3;n
460 /a>                elsen
461 /a>                         a href="+code=mask_port_map" class="sref">mask_port_map /a> = 0xf;n
462 /a>                 a href="+code=dev_info" class="sref">dev_info /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n
463 /a>                           spai class="string">"Disabling your PATA port. Use the boot option 'ahci.marvell_enabll=0' to avoid this.\n" /spaio);n
464 /a>        }n
465 /a>n
466 /a>         a href="+code=ahci_savl_initial_config" class="sref">ahci_savl_initial_config /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,  a href="+code=hpriv" class="sref">hpriv /a>,  a href="+code=force_port_map" class="sref">force_port_map /a>,n
467 /a>                                  a href="+code=mask_port_map" class="sref">mask_port_map /a>);n
468 /a>}n
469 /a>n
470 /a>static int  a href="+code=ahci_pci_reset_controller" class="sref">ahci_pci_reset_controller /a>(struct  a href="+code=ata_host" class="sref">ata_host /a> * a href="+code=host" class="sref">host /a>)n
471 /a>{n
472 /a>        struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a> =  a href="+code=to_pci_dev" class="sref">to_pci_dev /a>( a href="+code=host" class="sref">host /a>-> a href="+code=dev" class="sref">dev /a>);n
473 /a>n
474 /a>         a href="+code=ahci_reset_controller" class="sref">ahci_reset_controller /a>( a href="+code=host" class="sref">host /a>);n
475 /a>n
476 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=vendor" class="sref">vendor /a> ==  a href="+code=PCI_VENDOR_ID_INTEL" class="sref">PCI_VENDOR_ID_INTEL /a>) {n
477 /a>                struct  a href="+code=ahci_host_priv" class="sref">ahci_host_priv /a> * a href="+code=hpriv" class="sref">hpriv /a> =  a href="+code=host" class="sref">host /a>-> a href="+code=private_data" class="sref">private_data /a>;n
478 /a>                 a href="+code=u16" class="sref">u16 /a>  a href="+code=tmp16" class="sref">tmp16 /a>;n
479 /a>n
480 /a>                 spai class="comment">/* configure PCS */ /spaion
481 /a>                 a href="+code=pci_read_config_word" class="sref">pci_read_config_word /a>( a href="+code=pdev" class="sref">pdev /a>, 0x92, & a href="+code=tmp16" class="sref">tmp16 /a>);n
482 /a>                if (( a href="+code=tmp16" class="sref">tmp16 /a> &  a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=port_map" class="sref">port_map /a>) !=  a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=port_map" class="sref">port_map /a>) {n
483 /a>                         a href="+code=tmp16" class="sref">tmp16 /a> |=  a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=port_map" class="sref">port_map /a>;n
484 /a>                         a href="+code=pci_write_config_word" class="sref">pci_write_config_word /a>( a href="+code=pdev" class="sref">pdev /a>, 0x92,  a href="+code=tmp16" class="sref">tmp16 /a>);n
485 /a>                }n
486 /a>        }n
487 /a>n
488 /a>        return 0;n
489 /a>}n
490 /a>n
491 /a>static void  a href="+code=ahci_pci_init_controller" class="sref">ahci_pci_init_controller /a>(struct  a href="+code=ata_host" class="sref">ata_host /a> * a href="+code=host" class="sref">host /a>)n
492 /a>{n
493 /a>        struct  a href="+code=ahci_host_priv" class="sref">ahci_host_priv /a> * a href="+code=hpriv" class="sref">hpriv /a> =  a href="+code=host" class="sref">host /a>-> a href="+code=private_data" class="sref">private_data /a>;n
494 /a>        struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a> =  a href="+code=to_pci_dev" class="sref">to_pci_dev /a>( a href="+code=host" class="sref">host /a>-> a href="+code=dev" class="sref">dev /a>);n
495 /a>        void  a href="+code=__iomem" class="sref">__iomem /a> * a href="+code=port_mmio" class="sref">port_mmio /a>;n
496 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=tmp" class="sref">tmp /a>;n
497 /a>        int  a href="+code=mv" class="sref">mv /a>;n
498 /a>n
499 /a>        if ( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> &  a href="+code=AHCI_HFLAG_MV_PATA" class="sref">AHCI_HFLAG_MV_PATA /a>) {n
500 /a>                if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=device" class="sref">device /a> == 0x6121)n
501 /a>                         a href="+code=mv" class="sref">mv /a> = 2;n
502 /a>                elsen
503 /a>                         a href="+code=mv" class="sref">mv /a> = 4;n
504 /a>                 a href="+code=port_mmio" class="sref">port_mmio /a> =  a href="+code=__ahci_port_base" class="sref">__ahci_port_base /a>( a href="+code=host" class="sref">host /a>,  a href="+code=mv" class="sref">mv /a>);n
505 /a>n
506 /a>                 a href="+code=writel" class="sref">writel /a>(0,  a href="+code=port_mmio" class="sref">port_mmio /a> +  a href="+code=PORT_IRQ_MASK" class="sref">PORT_IRQ_MASK /a>);n
507 /a>n
508 /a>                 spai class="comment">/* clear port IRQ */ /spaion
509 /a>                 a href="+code=tmp" class="sref">tmp /a> =  a href="+code=readl" class="sref">readl /a>( a href="+code=port_mmio" class="sref">port_mmio /a> +  a href="+code=PORT_IRQ_STAT" class="sref">PORT_IRQ_STAT /a>);n
510 /a>                 a href="+code=VPRINTK" class="sref">VPRINTK /a>( spai class="string">"PORT_IRQ_STAT 0x%x\n" /spaio,  a href="+code=tmp" class="sref">tmp /a>);n
511 /a>                if ( a href="+code=tmp" class="sref">tmp /a>)n
512 /a>                         a href="+code=writel" class="sref">writel /a>( a href="+code=tmp" class="sref">tmp /a>,  a href="+code=port_mmio" class="sref">port_mmio /a> +  a href="+code=PORT_IRQ_STAT" class="sref">PORT_IRQ_STAT /a>);n
513 /a>        }n
514 /a>n
515 /a>         a href="+code=ahci_init_controller" class="sref">ahci_init_controller /a>( a href="+code=host" class="sref">host /a>);n
516 /a>}n
517 /a>n
518 /a>static int  a href="+code=ahci_vt8251_hardreset" class="sref">ahci_vt8251_hardreset /a>(struct  a href="+code=ata_link" class="sref">ata_link /a> * a href="+code=link" class="sref">link /a>, unsigned int * a href="+code=class" class="sref">class /a>,n
519 /a>                                 unsigned long  a href="+code=deadlinl" class="sref">deadlinl /a>)n
520 /a>{n
521 /a>        struct  a href="+code=ata_port" class="sref">ata_port /a> * a href="+code=ap" class="sref">ap /a> =  a href="+code=link" class="sref">link /a>-> a href="+code=ap" class="sref">ap /a>;n
522 /a>         a href="+code=bool" class="sref">bool /a>  a href="+code=onlinl" class="sref">onlinl /a>;n
523 /a>        int  a href="+code=rc" class="sref">rc /a>;n
524 /a>n
525 /a>         a href="+code=DPRINTK" class="sref">DPRINTK /a>( spai class="string">"ENTER\n" /spaio);n
526 /a>n
527 /a>         a href="+code=ahci_stop_enginl" class="sref">ahci_stop_enginl /a>( a href="+code=ap" class="sref">ap /a>);n
528 /a>n
529 /a>         a href="+code=rc" class="sref">rc /a> =  a href="+code=sata_link_hardreset" class="sref">sata_link_hardreset /a>( a href="+code=link" class="sref">link /a>,  a href="+code=sata_ehc_deb_timing" class="sref">sata_ehc_deb_timing /a>(& a href="+code=link" class="sref">link /a>-> a href="+code=eh_context" class="sref">eh_context /a>),n
530 /a>                                  a href="+code=deadlinl" class="sref">deadlinl /a>, & a href="+code=onlinl" class="sref">onlinl /a>,  a href="+code=NULL" class="sref">NULL /a>);n
531 /a>n
532 /a>         a href="+code=ahci_start_enginl" class="sref">ahci_start_enginl /a>( a href="+code=ap" class="sref">ap /a>);n
533 /a>n
534 /a>         a href="+code=DPRINTK" class="sref">DPRINTK /a>( spai class="string">"EXIT, rc=%d, class=%u\n" /spaio,  a href="+code=rc" class="sref">rc /a>, * a href="+code=class" class="sref">class /a>);n
535 /a>n
536 /a>         spai class="comment">/* vt8251 doesn't clear BSY on signature FIS reception, /spaion
537 /a> spai class="comment">         * request follow-up softreset. /spaion
538 /a> spai class="comment">         */ /spaion
539 /a>        return  a href="+code=onlinl" class="sref">onlinl /a> ? - a href="+code=EAGAIN" class="sref">EAGAIN /a> :  a href="+code=rc" class="sref">rc /a>;n
540 /a>}n
541 /a>n
542 /a>static int  a href="+code=ahci_p5wdh_hardreset" class="sref">ahci_p5wdh_hardreset /a>(struct  a href="+code=ata_link" class="sref">ata_link /a> * a href="+code=link" class="sref">link /a>, unsigned int * a href="+code=class" class="sref">class /a>,n
543 /a>                                unsigned long  a href="+code=deadlinl" class="sref">deadlinl /a>)n
544 /a>{n
545 /a>        struct  a href="+code=ata_port" class="sref">ata_port /a> * a href="+code=ap" class="sref">ap /a> =  a href="+code=link" class="sref">link /a>-> a href="+code=ap" class="sref">ap /a>;n
546 /a>        struct  a href="+code=ahci_port_priv" class="sref">ahci_port_priv /a> * a href="+code=pp" class="sref">pp /a> =  a href="+code=ap" class="sref">ap /a>-> a href="+code=private_data" class="sref">private_data /a>;n
547 /a>         a href="+code=u8" class="sref">u8 /a> * a href="+code=d2h_fis" class="sref">d2h_fis /a> =  a href="+code=pp" class="sref">pp /a>-> a href="+code=rx_fis" class="sref">rx_fis /a> +  a href="+code=RX_FIS_D2H_REG" class="sref">RX_FIS_D2H_REG /a>;n
548 /a>        struct  a href="+code=ata_taskfill" class="sref">ata_taskfill /a>  a href="+code=tf" class="sref">tf /a>;n
549 /a>         a href="+code=bool" class="sref">bool /a>  a href="+code=onlinl" class="sref">onlinl /a>;n
550 /a>        int  a href="+code=rc" class="sref">rc /a>;n
551 /a>n
552 /a>         a href="+code=ahci_stop_enginl" class="sref">ahci_stop_enginl /a>( a href="+code=ap" class="sref">ap /a>);n
553 /a>n
554 /a>         spai class="comment">/* clear D2H reception area to properly wait for D2H FIS */ /spaion
555 /a>         a href="+code=ata_tf_init" class="sref">ata_tf_init /a>( a href="+code=link" class="sref">link /a>-> a href="+code=device" class="sref">device /a>, & a href="+code=tf" class="sref">tf /a>);n
556 /a>         a href="+code=tf" class="sref">tf /a>. a href="+code=command" class="sref">command /a> = 0x80;n
557 /a>         a href="+code=ata_tf_to_fis" class="sref">ata_tf_to_fis /a>(& a href="+code=tf" class="sref">tf /a>, 0, 0,  a href="+code=d2h_fis" class="sref">d2h_fis /a>);n
558 /a>n
559 /a>         a href="+code=rc" class="sref">rc /a> =  a href="+code=sata_link_hardreset" class="sref">sata_link_hardreset /a>( a href="+code=link" class="sref">link /a>,  a href="+code=sata_ehc_deb_timing" class="sref">sata_ehc_deb_timing /a>(& a href="+code=link" class="sref">link /a>-> a href="+code=eh_context" class="sref">eh_context /a>),n
560 /a>                                  a href="+code=deadlinl" class="sref">deadlinl /a>, & a href="+code=onlinl" class="sref">onlinl /a>,  a href="+code=NULL" class="sref">NULL /a>);n
561 /a>n
562 /a>         a href="+code=ahci_start_enginl" class="sref">ahci_start_enginl /a>( a href="+code=ap" class="sref">ap /a>);n
563 /a>n
564 /a>         spai class="comment">/* The pseudo configuration device on SIMG4726 attached to /spaion
565 /a> spai class="comment">         * ASUS P5W-DH Deluxe doesn't send signature FIS after /spaion
566 /a> spai class="comment">         * hardreset if no device is attached to the first downstream /spaion
567 /a> spai class="comment">         * port && the pseudo device locks up on SRST w/ PMP==0.  To /spaion
568 /a> spai class="comment">         * work around this, wait for !BSY only briefly.  If BSY isn't /spaion
569 /a> spai class="comment">         * cleared, perform CLO and proceed to IDENTIFY (achieved by /spaion
570 /a> spai class="comment">         * ATA_LFLAG_NO_SRST and ATA_LFLAG_ASSUME_ATA). /spaion
571 /a> spai class="comment">         * /spaion
572 /a> spai class="comment">         * Wait for two seconds.  Devices attached to downstream port /spaion
573 /a> spai class="comment">         * which can't process the following IDENTIFY after this will /spaion
574 /a> spai class="comment">         * have to be reset again.  For most cases, this should /spaion
575 /a> spai class="comment">         * suffice while making probing snappish enough. /spaion
576 /a> spai class="comment">         */ /spaion
577 /a>        if ( a href="+code=onlinl" class="sref">onlinl /a>) {n
578 /a>                 a href="+code=rc" class="sref">rc /a> =  a href="+code=ata_wait_after_reset" class="sref">ata_wait_after_reset /a>( a href="+code=link" class="sref">link /a>,  a href="+code=jiffies" class="sref">jiffies /a> + 2 *  a href="+code=HZ" class="sref">HZ /a>,n
579 /a>                                           a href="+code=ahci_check_ready" class="sref">ahci_check_ready /a>);n
580 /a>                if ( a href="+code=rc" class="sref">rc /a>)n
581 /a>                         a href="+code=ahci_kick_enginl" class="sref">ahci_kick_enginl /a>( a href="+code=ap" class="sref">ap /a>);n
582 /a>        }n
583 /a>        return  a href="+code=rc" class="sref">rc /a>;n
584 /a>}n
585 /a>n
586 /a>#ifdef  a href="+code=CONFIG_PM" class="sref">CONFIG_PM /a>n
587 /a>static int  a href="+code=ahci_pci_device_suspend" class="sref">ahci_pci_device_suspend /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>,  a href="+code=pm_message_t" class="sref">pm_message_t /a>  a href="+code=mesg" class="sref">mesg /a>)n
588 /a>{n
589 /a>        struct  a href="+code=ata_host" class="sref">ata_host /a> * a href="+code=host" class="sref">host /a> =  a href="+code=dev_get_drvdata" class="sref">dev_get_drvdata /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>);n
590 /a>        struct  a href="+code=ahci_host_priv" class="sref">ahci_host_priv /a> * a href="+code=hpriv" class="sref">hpriv /a> =  a href="+code=host" class="sref">host /a>-> a href="+code=private_data" class="sref">private_data /a>;n
591 /a>        void  a href="+code=__iomem" class="sref">__iomem /a> * a href="+code=mmio" class="sref">mmio /a> =  a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=mmio" class="sref">mmio /a>;n
592 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=ctl" class="sref">ctl /a>;n
593 /a>n
594 /a>        if ( a href="+code=mesg" class="sref">mesg /a>. a href="+code=event" class="sref">event /a> &  a href="+code=PM_EVENT_SUSPEND" class="sref">PM_EVENT_SUSPEND /a> &&n
595 /a>             a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> &  a href="+code=AHCI_HFLAG_NO_SUSPEND" class="sref">AHCI_HFLAG_NO_SUSPEND /a>) {n
596 /a>                 a href="+code=dev_err" class="sref">dev_err /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n
597 /a>                         spai class="string">"BIOS update required for suspend/resuml\n" /spaio);n
598 /a>                return - a href="+code=EIO" class="sref">EIO /a>;n
599 /a>        }n
600 /a>n
601 /a>        if ( a href="+code=mesg" class="sref">mesg /a>. a href="+code=event" class="sref">event /a> &  a href="+code=PM_EVENT_SLEEP" class="sref">PM_EVENT_SLEEP /a>) {n
602 /a>                 spai class="comment">/* AHCI spec rev1.1 section 8.3.3: /spaion
603 /a> spai class="comment">                 * Software must disable interrupts prior to requesting a /spaion
604 /a> spai class="comment">                 * transition of the HBA to D3 state. /spaion
605 /a> spai class="comment">                 */ /spaion
606 /a>                 a href="+code=ctl" class="sref">ctl /a> =  a href="+code=readl" class="sref">readl /a>( a href="+code=mmio" class="sref">mmio /a> +  a href="+code=HOST_CTL" class="sref">HOST_CTL /a>);n
607 /a>                 a href="+code=ctl" class="sref">ctl /a> &= ~ a href="+code=HOST_IRQ_EN" class="sref">HOST_IRQ_EN /a>;n
608 /a>                 a href="+code=writel" class="sref">writel /a>( a href="+code=ctl" class="sref">ctl /a>,  a href="+code=mmio" class="sref">mmio /a> +  a href="+code=HOST_CTL" class="sref">HOST_CTL /a>);n
609 /a>                 a href="+code=readl" class="sref">readl /a>( a href="+code=mmio" class="sref">mmio /a> +  a href="+code=HOST_CTL" class="sref">HOST_CTL /a>);  spai class="comment">/* flush */ /spaion
610 /a>        }n
611 /a>n
612 /a>        return  a href="+code=ata_pci_device_suspend" class="sref">ata_pci_device_suspend /a>( a href="+code=pdev" class="sref">pdev /a>,  a href="+code=mesg" class="sref">mesg /a>);n
613 /a>}n
614 /a>n
615 /a>static int  a href="+code=ahci_pci_device_resuml" class="sref">ahci_pci_device_resuml /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>)n
616 /a>{n
617 /a>        struct  a href="+code=ata_host" class="sref">ata_host /a> * a href="+code=host" class="sref">host /a> =  a href="+code=dev_get_drvdata" class="sref">dev_get_drvdata /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>);n
618 /a>        int  a href="+code=rc" class="sref">rc /a>;n
619 /a>n
620 /a>         a href="+code=rc" class="sref">rc /a> =  a href="+code=ata_pci_device_do_resuml" class="sref">ata_pci_device_do_resuml /a>( a href="+code=pdev" class="sref">pdev /a>);n
621 /a>        if ( a href="+code=rc" class="sref">rc /a>)n
622 /a>                return  a href="+code=rc" class="sref">rc /a>;n
623 /a>n
624 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>. a href="+code=power" class="sref">power /a>. a href="+code=power_state" class="sref">power_state /a>. a href="+code=event" class="sref">event /a> ==  a href="+code=PM_EVENT_SUSPEND" class="sref">PM_EVENT_SUSPEND /a>) {n
625 /a>                 a href="+code=rc" class="sref">rc /a> =  a href="+code=ahci_pci_reset_controller" class="sref">ahci_pci_reset_controller /a>( a href="+code=host" class="sref">host /a>);n
626 /a>                if ( a href="+code=rc" class="sref">rc /a>)n
627 /a>                        return  a href="+code=rc" class="sref">rc /a>;n
628 /a>n
629 /a>                 a href="+code=ahci_pci_init_controller" class="sref">ahci_pci_init_controller /a>( a href="+code=host" class="sref">host /a>);n
630 /a>        }n
631 /a>n
632 /a>         a href="+code=ata_host_resuml" class="sref">ata_host_resuml /a>( a href="+code=host" class="sref">host /a>);n
633 /a>n
634 /a>        return 0;n
635 /a>}n
636 /a>#endifn
637 /a>n
638 /a>static int  a href="+code=ahci_configure_dma_masks" class="sref">ahci_configure_dma_masks /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>, int  a href="+code=using_dac" class="sref">using_dac /a>)n
639 /a>{n
640 /a>        int  a href="+code=rc" class="sref">rc /a>;n
641 /a>n
642 /a>         spai class="comment">/* /spaion
643 /a> spai class="comment">         * If the device fixup already set the dma_mask to some non-standard /spaion
644 /a> spai class="comment">         * value, don't extend it here. This happens on STA2X11, for example. /spaion
645 /a> spai class="comment">         */ /spaion
646 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dma_mask" class="sref">dma_mask /a> &&  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dma_mask" class="sref">dma_mask /a> <  a href="+code=DMA_BIT_MASK" class="sref">DMA_BIT_MASK /a>(32))n
647 /a>                return 0;n
648 /a>n
649 /a>        if ( a href="+code=using_dac" class="sref">using_dac /a> &&n
650 /a>            ! a href="+code=pci_set_dma_mask" class="sref">pci_set_dma_mask /a>( a href="+code=pdev" class="sref">pdev /a>,  a href="+code=DMA_BIT_MASK" class="sref">DMA_BIT_MASK /a>(64))) {n
651 /a>                 a href="+code=rc" class="sref">rc /a> =  a href="+code=pci_set_consistent_dma_mask" class="sref">pci_set_consistent_dma_mask /a>( a href="+code=pdev" class="sref">pdev /a>,  a href="+code=DMA_BIT_MASK" class="sref">DMA_BIT_MASK /a>(64));n
652 /a>                if ( a href="+code=rc" class="sref">rc /a>) {n
653 /a>                         a href="+code=rc" class="sref">rc /a> =  a href="+code=pci_set_consistent_dma_mask" class="sref">pci_set_consistent_dma_mask /a>( a href="+code=pdev" class="sref">pdev /a>,  a href="+code=DMA_BIT_MASK" class="sref">DMA_BIT_MASK /a>(32));n
654 /a>                        if ( a href="+code=rc" class="sref">rc /a>) {n
655 /a>                                 a href="+code=dev_err" class="sref">dev_err /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n
656 /a>                                         spai class="string">"64-bit DMA enable failed\n" /spaio);n
657 /a>                                return  a href="+code=rc" class="sref">rc /a>;n
658 /a>                        }n
659 /a>                }n
660 /a>        } else {n
661 /a>                 a href="+code=rc" class="sref">rc /a> =  a href="+code=pci_set_dma_mask" class="sref">pci_set_dma_mask /a>( a href="+code=pdev" class="sref">pdev /a>,  a href="+code=DMA_BIT_MASK" class="sref">DMA_BIT_MASK /a>(32));n
662 /a>                if ( a href="+code=rc" class="sref">rc /a>) {n
663 /a>                         a href="+code=dev_err" class="sref">dev_err /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,  spai class="string">"32-bit DMA enable failed\n" /spaio);n
664 /a>                        return  a href="+code=rc" class="sref">rc /a>;n
665 /a>                }n
666 /a>                 a href="+code=rc" class="sref">rc /a> =  a href="+code=pci_set_consistent_dma_mask" class="sref">pci_set_consistent_dma_mask /a>( a href="+code=pdev" class="sref">pdev /a>,  a href="+code=DMA_BIT_MASK" class="sref">DMA_BIT_MASK /a>(32));n
667 /a>                if ( a href="+code=rc" class="sref">rc /a>) {n
668 /a>                         a href="+code=dev_err" class="sref">dev_err /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n
669 /a>                                 spai class="string">"32-bit consistent DMA enable failed\n" /spaio);n
670 /a>                        return  a href="+code=rc" class="sref">rc /a>;n
671 /a>                }n
672 /a>        }n
673 /a>        return 0;n
674 /a>}n
675 /a>n
676 /a>static void  a href="+code=ahci_pci_print_info" class="sref">ahci_pci_print_info /a>(struct  a href="+code=ata_host" class="sref">ata_host /a> * a href="+code=host" class="sref">host /a>)n
677 /a>{n
678 /a>        struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a> =  a href="+code=to_pci_dev" class="sref">to_pci_dev /a>( a href="+code=host" class="sref">host /a>-> a href="+code=dev" class="sref">dev /a>);n
679 /a>         a href="+code=u16" class="sref">u16 /a>  a href="+code=cc" class="sref">cc /a>;n
680 /a>        const char * a href="+code=scc_s" class="sref">scc_s /a>;n
681 /a>n
682 /a>         a href="+code=pci_read_config_word" class="sref">pci_read_config_word /a>( a href="+code=pdev" class="sref">pdev /a>, 0x0a, & a href="+code=cc" class="sref">cc /a>);n
683 /a>        if ( a href="+code=cc" class="sref">cc /a> ==  a href="+code=PCI_CLASS_STORAGE_IDE" class="sref">PCI_CLASS_STORAGE_IDE /a>)n
684 /a>                 a href="+code=scc_s" class="sref">scc_s /a> =  spai class="string">"IDE" /spaio;n
685 /a>        else if ( a href="+code=cc" class="sref">cc /a> ==  a href="+code=PCI_CLASS_STORAGE_SATA" class="sref">PCI_CLASS_STORAGE_SATA /a>)n
686 /a>                 a href="+code=scc_s" class="sref">scc_s /a> =  spai class="string">"SATA" /spaio;n
687 /a>        else if ( a href="+code=cc" class="sref">cc /a> ==  a href="+code=PCI_CLASS_STORAGE_RAID" class="sref">PCI_CLASS_STORAGE_RAID /a>)n
688 /a>                 a href="+code=scc_s" class="sref">scc_s /a> =  spai class="string">"RAID" /spaio;n
689 /a>        elsen
690 /a>                 a href="+code=scc_s" class="sref">scc_s /a> =  spai class="string">"unknown" /spaio;n
691 /a>n
692 /a>         a href="+code=ahci_print_info" class="sref">ahci_print_info /a>( a href="+code=host" class="sref">host /a>,  a href="+code=scc_s" class="sref">scc_s /a>);n
693 /a>}n
694 /a>n
695 /a> spai class="comment">/* On ASUS P5W DH Deluxe, the second port of PCI device 00:1f.2 is /spaion
696 /a> spai class="comment"> * hardwired to on-board SIMG 4726.  The chipset is ICH8 and doesn't /spaion
697 /a> spai class="comment"> * support PMP and the 4726 either directly exports the device /spaion
698 /a> spai class="comment"> * attached to the first downstream port or acts as a hardware storage /spaion
699 /a> spai class="comment"> * controller and emulate a single ATA device (cai be RAID 0/1 or some /spaion
700 /a> spai class="comment"> * other configuration). /spaion
701 /a> spai class="comment"> * /spaion
702 /a> spai class="comment"> * When there's no device attached to the first downstream port of the /spaion
703 /a> spai class="comment"> * 4726, "Config Disk" appears, which is a pseudo ATA device to /spaion
704 /a> spai class="comment"> * configure the 4726.  However, ATA emulation of the device is very /spaion
705 /a> spai class="comment"> * laml.  It doesn't send signature D2H Reg FIS after the initial /spaion
706 /a> spai class="comment"> * hardreset, pukes on SRST w/ PMP==0 and has bunch of other issues. /spaion
707 /a> spai class="comment"> * /spaion
708 /a> spai class="comment"> * The following function works around the problem by always using /spaion
709 /a> spai class="comment"> * hardreset on the port and not depending on receiving signature FIS /spaion
710 /a> spai class="comment"> * afterward.  If signature FIS isn't received soon, ATA class is /spaion
711 /a> spai class="comment"> * assumld without follow-up softreset. /spaion
712 /a> spai class="comment"> */ /spaion
713 /a>static void  a href="+code=ahci_p5wdh_workaround" class="sref">ahci_p5wdh_workaround /a>(struct  a href="+code=ata_host" class="sref">ata_host /a> * a href="+code=host" class="sref">host /a>)n
714 /a>{n
715 /a>        static struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a>  a href="+code=sysids" class="sref">sysids /a>[] = {n
716 /a>                {n
717 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"P5W DH Deluxe" /spaio,n
718 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
719 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_SYS_VENDOR" class="sref">DMI_SYS_VENDOR /a>,n
720 /a>                                           spai class="string">"ASUSTEK COMPUTER INC" /spaio),n
721 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_PRODUCT_NAME" class="sref">DMI_PRODUCT_NAME /a>,  spai class="string">"P5W DH Deluxe" /spaio),n
722 /a>                        },n
723 /a>                },n
724 /a>                { }n
725 /a>        };n
726 /a>        struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a> =  a href="+code=to_pci_dev" class="sref">to_pci_dev /a>( a href="+code=host" class="sref">host /a>-> a href="+code=dev" class="sref">dev /a>);n
727 /a>n
728 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=bus" class="sref">bus /a>-> a href="+code=number" class="sref">number /a> == 0 &&  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=devfn" class="sref">devfn /a> ==  a href="+code=PCI_DEVFN" class="sref">PCI_DEVFN /a>(0x1f, 2) &&n
729 /a>             a href="+code=dmi_check_system" class="sref">dmi_check_system /a>( a href="+code=sysids" class="sref">sysids /a>)) {n
730 /a>                struct  a href="+code=ata_port" class="sref">ata_port /a> * a href="+code=ap" class="sref">ap /a> =  a href="+code=host" class="sref">host /a>-> a href="+code=ports" class="sref">ports /a>[1];n
731 /a>n
732 /a>                 a href="+code=dev_info" class="sref">dev_info /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n
733 /a>                          spai class="string">"enabling ASUS P5W DH Deluxe on-board SIMG4726 workaround\n" /spaio);n
734 /a>n
735 /a>                 a href="+code=ap" class="sref">ap /a>-> a href="+code=ops" class="sref">ops /a> = & a href="+code=ahci_p5wdh_ops" class="sref">ahci_p5wdh_ops /a>;n
736 /a>                 a href="+code=ap" class="sref">ap /a>-> a href="+code=link" class="sref">link /a>. a href="+code=flags" class="sref">flags /a> |=  a href="+code=ATA_LFLAG_NO_SRST" class="sref">ATA_LFLAG_NO_SRST /a> |  a href="+code=ATA_LFLAG_ASSUME_ATA" class="sref">ATA_LFLAG_ASSUME_ATA /a>;n
737 /a>        }n
738 /a>}n
739 /a>n
740 /a> spai class="comment">/* only some SB600 ahci controllers can do 64bit DMA */ /spaion
741 /a>static  a href="+code=bool" class="sref">bool /a>  a href="+code=ahci_sb600_enable_64bit" class="sref">ahci_sb600_enable_64bit /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>)n
742 /a>{n
743 /a>        static const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a>  a href="+code=sysids" class="sref">sysids /a>[] = {n
744 /a>                 spai class="comment">/* /spaion
745 /a> spai class="comment">                 * The oldest version known to be broken is 0901 and /spaion
746 /a> spai class="comment">                 * working is 1501 which was released on 2007-10-26. /spaion
747 /a> spai class="comment">                 * Enable 64bit DMA on 1501 and anything newer. /spaion
748 /a> spai class="comment">                 * /spaion
749 /a> spai class="comment">                 * Please read bko#9412 for more info. /spaion
750 /a> spai class="comment">                 */ /spaion
751 /a>                {n
752 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"ASUS M2A-VM" /spaio,n
753 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
754 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_VENDOR" class="sref">DMI_BOARD_VENDOR /a>,n
755 /a>                                           spai class="string">"ASUSTeK Computer INC." /spaio),n
756 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_NAME" class="sref">DMI_BOARD_NAME /a>,  spai class="string">"M2A-VM" /spaio),n
757 /a>                        },n
758 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> =  spai class="string">"20071026" /spaio,       spai class="comment">/* yyyymmdd */ /spaion
759 /a>                },n
760 /a>                 spai class="comment">/* /spaion
761 /a> spai class="comment">                 * All BIOS versions for the MSI K9A2 Platinum (MS-7376) /spaion
762 /a> spai class="comment">                 * support 64bit DMA. /spaion
763 /a> spai class="comment">                 * /spaion
764 /a> spai class="comment">                 * BIOS versions earlier thai 1.5 had the Manufacturer DMI /spaion
765 /a> spai class="comment">                 * fields as "MICRO-STAR INTERANTIONAL CO.,LTD". /spaion
766 /a> spai class="comment">                 * This spelling mistake was fixed in BIOS version 1.5, so /spaion
767 /a> spai class="comment">                 * 1.5 and later have the Manufacturer as /spaion
768 /a> spai class="comment">                 * "MICRO-STAR INTERNATIONAL CO.,LTD". /spaion
769 /a> spai class="comment">                 * So try to match on DMI_BOARD_VENDOR of "MICRO-STAR INTER". /spaion
770 /a> spai class="comment">                 * /spaion
771 /a> spai class="comment">                 * BIOS versions earlier thai 1.9 had a Board Product Name /spaion
772 /a> spai class="comment">                 * DMI field of "MS-7376". This was chaiged to be /spaion
773 /a> spai class="comment">                 * "K9A2 Platinum (MS-7376)" in version 1.9, but we can still /spaion
774 /a> spai class="comment">                 * match on DMI_BOARD_NAME of "MS-7376". /spaion
775 /a> spai class="comment">                 */ /spaion
776 /a>                {n
777 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"MSI K9A2 Platinum" /spaio,n
778 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
779 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_VENDOR" class="sref">DMI_BOARD_VENDOR /a>,n
780 /a>                                           spai class="string">"MICRO-STAR INTER" /spaio),n
781 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_NAME" class="sref">DMI_BOARD_NAME /a>,  spai class="string">"MS-7376" /spaio),n
782 /a>                        },n
783 /a>                },n
784 /a>                 spai class="comment">/* /spaion
785 /a> spai class="comment">                 * All BIOS versions for the MSI K9AGM2 (MS-7327) support /spaion
786 /a> spai class="comment">                 * 64bit DMA. /spaion
787 /a> spai class="comment">                 * /spaion
788 /a> spai class="comment">                 * This board also had the typo mentioned above in the /spaion
789 /a> spai class="comment">                 * Manufacturer DMI field (fixed in BIOS version 1.5), so /spaion
790 /a> spai class="comment">                 * match on DMI_BOARD_VENDOR of "MICRO-STAR INTER" again. /spaion
791 /a> spai class="comment">                 */ /spaion
792 /a>                {n
793 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"MSI K9AGM2" /spaio,n
794 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
795 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_VENDOR" class="sref">DMI_BOARD_VENDOR /a>,n
796 /a>                                           spai class="string">"MICRO-STAR INTER" /spaio),n
797 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_NAME" class="sref">DMI_BOARD_NAME /a>,  spai class="string">"MS-7327" /spaio),n
798 /a>                        },n
799 /a>                },n
800 /a>                 spai class="comment">/* /spaion
801 /a> spai class="comment">                 * All BIOS versions for the Asus M3A support 64bit DMA. /spaion
802 /a> spai class="comment">                 * (all release versions from 0301 to 1206 were tested) /spaion
803 /a> spai class="comment">                 */ /spaion
804 /a>                {n
805 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"ASUS M3A" /spaio,n
806 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
807 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_VENDOR" class="sref">DMI_BOARD_VENDOR /a>,n
808 /a>                                           spai class="string">"ASUSTeK Computer INC." /spaio),n
809 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_NAME" class="sref">DMI_BOARD_NAME /a>,  spai class="string">"M3A" /spaio),n
810 /a>                        },n
811 /a>                },n
812 /a>                { }n
813 /a>        };n
814 /a>        const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a> * a href="+code=match" class="sref">match /a>;n
815 /a>        int  a href="+code=year" class="sref">year /a>,  a href="+code=month" class="sref">month /a>,  a href="+code=date" class="sref">date /a>;n
816 /a>        char  a href="+code=buf" class="sref">buf /a>[9];n
817 /a>n
818 /a>         a href="+code=match" class="sref">match /a> =  a href="+code=dmi_first_match" class="sref">dmi_first_match /a>( a href="+code=sysids" class="sref">sysids /a>);n
819 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=bus" class="sref">bus /a>-> a href="+code=number" class="sref">number /a> != 0 ||  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=devfn" class="sref">devfn /a> !=  a href="+code=PCI_DEVFN" class="sref">PCI_DEVFN /a>(0x12, 0) ||n
820 /a>            ! a href="+code=match" class="sref">match /a>)n
821 /a>                return  a href="+code=false" class="sref">false /a>;n
822 /a>n
823 /a>        if (! a href="+code=match" class="sref">match /a>-> a href="+code=driver_data" class="sref">driver_data /a>)n
824 /a>                goto  a href="+code=enable_64bit" class="sref">enable_64bit /a>;n
825 /a>n
826 /a>         a href="+code=dmi_get_date" class="sref">dmi_get_date /a>( a href="+code=DMI_BIOS_DATE" class="sref">DMI_BIOS_DATE /a>, & a href="+code=year" class="sref">year /a>, & a href="+code=month" class="sref">month /a>, & a href="+code=date" class="sref">date /a>);n
827 /a>         a href="+code=snprintf" class="sref">snprintf /a>( a href="+code=buf" class="sref">buf /a>, sizeof( a href="+code=buf" class="sref">buf /a>),  spai class="string">"%04d%02d%02d" /spaio,  a href="+code=year" class="sref">year /a>,  a href="+code=month" class="sref">month /a>,  a href="+code=date" class="sref">date /a>);n
828 /a>n
829 /a>        if ( a href="+code=strcmp" class="sref">strcmp /a>( a href="+code=buf" class="sref">buf /a>,  a href="+code=match" class="sref">match /a>-> a href="+code=driver_data" class="sref">driver_data /a>) >= 0)n
830 /a>                goto  a href="+code=enable_64bit" class="sref">enable_64bit /a>;n
831 /a>        else {n
832 /a>                 a href="+code=dev_warn" class="sref">dev_warn /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n
833 /a>                          spai class="string">"%s: BIOS too old, forcing 32bit DMA, update BIOS\n" /spaio,n
834 /a>                          a href="+code=match" class="sref">match /a>-> a href="+code=ident" class="sref">ident /a>);n
835 /a>                return  a href="+code=false" class="sref">false /a>;n
836 /a>        }n
837 /a>n
838 /a> a href="+code=enable_64bit" class="sref">enable_64bit /a>:n
839 /a>         a href="+code=dev_warn" class="sref">dev_warn /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,  spai class="string">"%s: enabling 64bit DMA\n" /spaio,  a href="+code=match" class="sref">match /a>-> a href="+code=ident" class="sref">ident /a>);n
840 /a>        return  a href="+code=true" class="sref">true /a>;n
841 /a>}n
842 /a>n
843 /a>static  a href="+code=bool" class="sref">bool /a>  a href="+code=ahci_broken_system_poweroff" class="sref">ahci_broken_system_poweroff /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>)n
844 /a>{n
845 /a>        static const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a>  a href="+code=broken_systems" class="sref">broken_systems /a>[] = {n
846 /a>                {n
847 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"HP Compaq nx6310" /spaio,n
848 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
849 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_SYS_VENDOR" class="sref">DMI_SYS_VENDOR /a>,  spai class="string">"Hewlett-Packard" /spaio),n
850 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_PRODUCT_NAME" class="sref">DMI_PRODUCT_NAME /a>,  spai class="string">"HP Compaq nx6310" /spaio),n
851 /a>                        },n
852 /a>                         spai class="comment">/* PCI slot number of the controller */ /spaion
853 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> = (void *)0x1FUL,n
854 /a>                },n
855 /a>                {n
856 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"HP Compaq 6720s" /spaio,n
857 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
858 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_SYS_VENDOR" class="sref">DMI_SYS_VENDOR /a>,  spai class="string">"Hewlett-Packard" /spaio),n
859 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_PRODUCT_NAME" class="sref">DMI_PRODUCT_NAME /a>,  spai class="string">"HP Compaq 6720s" /spaio),n
860 /a>                        },n
861 /a>                         spai class="comment">/* PCI slot number of the controller */ /spaion
862 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> = (void *)0x1FUL,n
863 /a>                },n
864 /a>n
865 /a>                { }      spai class="comment">/* terminate list */ /spaion
866 /a>        };n
867 /a>        const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a> * a href="+code=dmi" class="sref">dmi /a> =  a href="+code=dmi_first_match" class="sref">dmi_first_match /a>( a href="+code=broken_systems" class="sref">broken_systems /a>);n
868 /a>n
869 /a>        if ( a href="+code=dmi" class="sref">dmi /a>) {n
870 /a>                unsigned long  a href="+code=slot" class="sref">slot /a> = (unsigned long) a href="+code=dmi" class="sref">dmi /a>-> a href="+code=driver_data" class="sref">driver_data /a>;n
871 /a>                 spai class="comment">/* apply the quirk only to on-board controllers */ /spaion
872 /a>                return  a href="+code=slot" class="sref">slot /a> ==  a href="+code=PCI_SLOT" class="sref">PCI_SLOT /a>( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=devfn" class="sref">devfn /a>);n
873 /a>        }n
874 /a>n
875 /a>        return  a href="+code=false" class="sref">false /a>;n
876 /a>}n
877 /a>n
878 /a>static  a href="+code=bool" class="sref">bool /a>  a href="+code=ahci_broken_suspend" class="sref">ahci_broken_suspend /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>)n
879 /a>{n
880 /a>        static const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a>  a href="+code=sysids" class="sref">sysids /a>[] = {n
881 /a>                 spai class="comment">/* /spaion
882 /a> spai class="comment">                 * On HP dv[4-6] and HDX18 with earlier BIOSen, link /spaion
883 /a> spai class="comment">                 * to the harddisk doesn't become online after /spaion
884 /a> spai class="comment">                 * resuming from STR.  Warn and fail suspend. /spaion
885 /a> spai class="comment">                 * /spaion
886 /a> spai class="comment">                 * http://bugzilla.kernel.org/show_bug.cgi?idu12276 /spaion
887 /a> spai class="comment">                 * /spaion
888 /a> spai class="comment">                 * Use dates instead of versions to match as HP is /spaion
889 /a> spai class="comment">                 * apparently recycling both product and version /spaion
890 /a> spai class="comment">                 * strings. /spaion
891 /a> spai class="comment">                 * /spaion
892 /a> spai class="comment">                 * http://bugzilla.kernel.org/show_bug.cgi?idu15462 /spaion
893 /a> spai class="comment">                 */ /spaion
894 /a>                {n
895 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"dv4" /spaio,n
896 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
897 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_SYS_VENDOR" class="sref">DMI_SYS_VENDOR /a>,  spai class="string">"Hewlett-Packard" /spaio),n
898 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_PRODUCT_NAME" class="sref">DMI_PRODUCT_NAME /a>,n
899 /a>                                           spai class="string">"HP Pavilion dv4 Notebook PC" /spaio),n
900 /a>                        },n
901 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> =  spai class="string">"20090105" /spaio,       spai class="comment">/* F.30 */ /spaion
902 /a>                },n
903 /a>                {n
904 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"dv5" /spaio,n
905 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
906 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_SYS_VENDOR" class="sref">DMI_SYS_VENDOR /a>,  spai class="string">"Hewlett-Packard" /spaio),n
907 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_PRODUCT_NAME" class="sref">DMI_PRODUCT_NAME /a>,n
908 /a>                                           spai class="string">"HP Pavilion dv5 Notebook PC" /spaio),n
909 /a>                        },n
910 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> =  spai class="string">"20090506" /spaio,       spai class="comment">/* F.16 */ /spaion
911 /a>                },n
912 /a>                {n
913 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"dv6" /spaio,n
914 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
915 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_SYS_VENDOR" class="sref">DMI_SYS_VENDOR /a>,  spai class="string">"Hewlett-Packard" /spaio),n
916 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_PRODUCT_NAME" class="sref">DMI_PRODUCT_NAME /a>,n
917 /a>                                           spai class="string">"HP Pavilion dv6 Notebook PC" /spaio),n
918 /a>                        },n
919 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> =  spai class="string">"20090423" /spaio,       spai class="comment">/* F.21 */ /spaion
920 /a>                },n
921 /a>                {n
922 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"HDX18" /spaio,n
923 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
924 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_SYS_VENDOR" class="sref">DMI_SYS_VENDOR /a>,  spai class="string">"Hewlett-Packard" /spaio),n
925 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_PRODUCT_NAME" class="sref">DMI_PRODUCT_NAME /a>,n
926 /a>                                           spai class="string">"HP HDX18 Notebook PC" /spaio),n
927 /a>                        },n
928 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> =  spai class="string">"20090430" /spaio,       spai class="comment">/* F.23 */ /spaion
929 /a>                },n
930 /a>                 spai class="comment">/* /spaion
931 /a> spai class="comment">                 * Acer eMachines G725 has the saml problem.  BIOS /spaion
932 /a> spai class="comment">                 * V1.03 is known to be broken.  V3.04 is known to /spaion
933 /a> spai class="comment">                 * work.  Between, there are V1.06, V2.06 and V3.03 /spaion
934 /a> spai class="comment">                 * that we don't have much idea about.  For now, /spaion
935 /a> spai class="comment">                 * blacklist anything older thai V3.04. /spaion
936 /a> spai class="comment">                 * /spaion
937 /a> spai class="comment">                 * http://bugzilla.kernel.org/show_bug.cgi?idu15104 /spaion
938 /a> spai class="comment">                 */ /spaion
939 /a>                {n
940 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"G725" /spaio,n
941 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
942 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_SYS_VENDOR" class="sref">DMI_SYS_VENDOR /a>,  spai class="string">"eMachines" /spaio),n
943 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_PRODUCT_NAME" class="sref">DMI_PRODUCT_NAME /a>,  spai class="string">"eMachines G725" /spaio),n
944 /a>                        },n
945 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> =  spai class="string">"20091216" /spaio,       spai class="comment">/* V3.04 */ /spaion
946 /a>                },n
947 /a>                { }      spai class="comment">/* terminate list */ /spaion
948 /a>        };n
949 /a>        const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a> * a href="+code=dmi" class="sref">dmi /a> =  a href="+code=dmi_first_match" class="sref">dmi_first_match /a>( a href="+code=sysids" class="sref">sysids /a>);n
950 /a>        int  a href="+code=year" class="sref">year /a>,  a href="+code=month" class="sref">month /a>,  a href="+code=date" class="sref">date /a>;n
951 /a>        char  a href="+code=buf" class="sref">buf /a>[9];n
952 /a>n
953 /a>        if (! a href="+code=dmi" class="sref">dmi /a> ||  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=bus" class="sref">bus /a>-> a href="+code=number" class="sref">number /a> ||  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=devfn" class="sref">devfn /a> !=  a href="+code=PCI_DEVFN" class="sref">PCI_DEVFN /a>(0x1f, 2))n
954 /a>                return  a href="+code=false" class="sref">false /a>;n
955 /a>n
956 /a>         a href="+code=dmi_get_date" class="sref">dmi_get_date /a>( a href="+code=DMI_BIOS_DATE" class="sref">DMI_BIOS_DATE /a>, & a href="+code=year" class="sref">year /a>, & a href="+code=month" class="sref">month /a>, & a href="+code=date" class="sref">date /a>);n
957 /a>         a href="+code=snprintf" class="sref">snprintf /a>( a href="+code=buf" class="sref">buf /a>, sizeof( a href="+code=buf" class="sref">buf /a>),  spai class="string">"%04d%02d%02d" /spaio,  a href="+code=year" class="sref">year /a>,  a href="+code=month" class="sref">month /a>,  a href="+code=date" class="sref">date /a>);n
958 /a>n
959 /a>        return  a href="+code=strcmp" class="sref">strcmp /a>( a href="+code=buf" class="sref">buf /a>,  a href="+code=dmi" class="sref">dmi /a>-> a href="+code=driver_data" class="sref">driver_data /a>) < 0;n
960 /a>}n
961 /a>n
962 /a>static  a href="+code=bool" class="sref">bool /a>  a href="+code=ahci_broken_online" class="sref">ahci_broken_online /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>)n
963 /a>{n
964 /a>#define  a href="+code=ENCODE_BUSDEVFN" class="sref">ENCODE_BUSDEVFN /a>( a href="+code=bus" class="sref">bus /a>,  a href="+code=slot" class="sref">slot /a>,  a href="+code=func" class="sref">func /a>)                        \n
965 /a>        (void *)(unsigned long)((( a href="+code=bus" class="sref">bus /a>) << 8) |  a href="+code=PCI_DEVFN" class="sref">PCI_DEVFN /a>(( a href="+code=slot" class="sref">slot /a>), ( a href="+code=func" class="sref">func /a>)))n
966 /a>        static const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a>  a href="+code=sysids" class="sref">sysids /a>[] = {n
967 /a>                 spai class="comment">/* /spaion
968 /a> spai class="comment">                 * There are several gigabyte boards which use /spaion
969 /a> spai class="comment">                 * SIMG5723s configured as hardware RAID.  Certain /spaion
970 /a> spai class="comment">                 * 5723 firmware revisions shipped there keep the link /spaion
971 /a> spai class="comment">                 * online but fail to answer properly to SRST or /spaion
972 /a> spai class="comment">                 * IDENTIFY when no device is attached downstream /spaion
973 /a> spai class="comment">                 * causing libata to retry quite a few times leading /spaion
974 /a> spai class="comment">                 * to excessive detection delay. /spaion
975 /a> spai class="comment">                 * /spaion
976 /a> spai class="comment">                 * As these firmwares respond to the second reset try /spaion
977 /a> spai class="comment">                 * with invalid device signature, considering unknown /spaion
978 /a> spai class="comment">                 * sig as offline works around the problem acceptably. /spaion
979 /a> spai class="comment">                 */ /spaion
980 /a>                {n
981 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"EP45-DQ6" /spaio,n
982 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
983 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_VENDOR" class="sref">DMI_BOARD_VENDOR /a>,n
984 /a>                                           spai class="string">"Gigabyte Technology Co., Ltd." /spaio),n
985 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_NAME" class="sref">DMI_BOARD_NAME /a>,  spai class="string">"EP45-DQ6" /spaio),n
986 /a>                        },n
987 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> =  a href="+code=ENCODE_BUSDEVFN" class="sref">ENCODE_BUSDEVFN /a>(0x0a, 0x00, 0),n
988 /a>                },n
989 /a>                {n
990 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"EP45-DS5" /spaio,n
991 /a>                        . a href="+code=matches" class="sref">matches /a> = {n
992 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_VENDOR" class="sref">DMI_BOARD_VENDOR /a>,n
993 /a>                                           spai class="string">"Gigabyte Technology Co., Ltd." /spaio),n
994 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_BOARD_NAME" class="sref">DMI_BOARD_NAME /a>,  spai class="string">"EP45-DS5" /spaio),n
995 /a>                        },n
996 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> =  a href="+code=ENCODE_BUSDEVFN" class="sref">ENCODE_BUSDEVFN /a>(0x03, 0x00, 0),n
997 /a>                },n
998 /a>                { }      spai class="comment">/* terminate list */ /spaion
999 /a>        };n1000 /a>#undef  a href="+code=ENCODE_BUSDEVFN" class="sref">ENCODE_BUSDEVFN /a>
1001 /a>        const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a> * a href="+code=dmi" class="sref">dmi /a> =  a href="+code=dmi_first_match" class="sref">dmi_first_match /a>( a href="+code=sysids" class="sref">sysids /a>);n1002 /a>        unsigned int  a href="+code=val" class="sref">val /a>;n1003 /a>n1004 /a>        if (! a href="+code=dmi" class="sref">dmi /a>)n1005 /a>                return  a href="+code=false" class="sref">false /a>;n1006 /a>n1007 /a>         a href="+code=val" class="sref">val /a> = (unsigned long) a href="+code=dmi" class="sref">dmi /a>-> a href="+code=driver_data" class="sref">driver_data /a>;n1008 /a>n1009 /a>        return  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=bus" class="sref">bus /a>-> a href="+code=number" class="sref">number /a> == ( a href="+code=val" class="sref">val /a> >> 8) &&  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=devfn" class="sref">devfn /a> == ( a href="+code=val" class="sref">val /a> & 0xff);n1010 /a>}n1011 /a>n1012 /a>#ifdef  a href="+code=CONFIG_ATA_ACPI" class="sref">CONFIG_ATA_ACPI /a>n1013 /a>static void  a href="+code=ahci_gtf_filter_workaround" class="sref">ahci_gtf_filter_workaround /a>(struct  a href="+code=ata_host" class="sref">ata_host /a> * a href="+code=host" class="sref">host /a>)n1014 /a>{n1015 /a>        static const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a>  a href="+code=sysids" class="sref">sysids /a>[] = {n1016 /a>                 spai class="comment">/* /spaion1017 /a> spai class="comment">                 * Aspire 3810T issues a bunch of SATA enable commands /spaion1018 /a> spai class="comment">                 * via _GTF including ai invalid one and one which is /spaion1019 /a> spai class="comment">                 * rejected by the device.  Among the successful ones /spaion1020 /a> spai class="comment">                 * is FPDMA non-zero offset enable which when enabled /spaion1021 /a> spai class="comment">                 * only on the drive side leads to NCQ command /spaion1022 /a> spai class="comment">                 * failures.  Filter it out. /spaion1023 /a> spai class="comment">                 */ /spaion1024 /a>                {n1025 /a>                        . a href="+code=ident" class="sref">ident /a> =  spai class="string">"Aspire 3810T" /spaio,n1026 /a>                        . a href="+code=matches" class="sref">matches /a> = {n1027 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_SYS_VENDOR" class="sref">DMI_SYS_VENDOR /a>,  spai class="string">"Acer" /spaio),n1028 /a>                                 a href="+code=DMI_MATCH" class="sref">DMI_MATCH /a>( a href="+code=DMI_PRODUCT_NAME" class="sref">DMI_PRODUCT_NAME /a>,  spai class="string">"Aspire 3810T" /spaio),n1029 /a>                        },n1030 /a>                        . a href="+code=driver_data" class="sref">driver_data /a> = (void *) a href="+code=ATA_ACPI_FILTER_FPDMA_OFFSET" class="sref">ATA_ACPI_FILTER_FPDMA_OFFSET /a>,n1031 /a>                },n1032 /a>                { }n1033 /a>        };n1034 /a>        const struct  a href="+code=dmi_system_id" class="sref">dmi_system_id /a> * a href="+code=dmi" class="sref">dmi /a> =  a href="+code=dmi_first_match" class="sref">dmi_first_match /a>( a href="+code=sysids" class="sref">sysids /a>);n1035 /a>        unsigned int  a href="+code=filter" class="sref">filter /a>;n1036 /a>        int  a href="+code=i" class="sref">i /a>;n1037 /a>n1038 /a>        if (! a href="+code=dmi" class="sref">dmi /a>)n1039 /a>                return;n1040 /a>n1041 /a>         a href="+code=filter" class="sref">filter /a> = (unsigned long) a href="+code=dmi" class="sref">dmi /a>-> a href="+code=driver_data" class="sref">driver_data /a>;n1042 /a>         a href="+code=dev_info" class="sref">dev_info /a>( a href="+code=host" class="sref">host /a>-> a href="+code=dev" class="sref">dev /a>,  spai class="string">"applying extra ACPI _GTF filter 0x%x for %s\n" /spaio,n1043 /a>                  a href="+code=filter" class="sref">filter /a>,  a href="+code=dmi" class="sref">dmi /a>-> a href="+code=ident" class="sref">ident /a>);n1044 /a>n1045 /a>        for ( a href="+code=i" class="sref">i /a> = 0;  a href="+code=i" class="sref">i /a> <  a href="+code=host" class="sref">host /a>-> a href="+code=n_ports" class="sref">n_ports /a>;  a href="+code=i" class="sref">i /a>++) {n1046 /a>                struct  a href="+code=ata_port" class="sref">ata_port /a> * a href="+code=ap" class="sref">ap /a> =  a href="+code=host" class="sref">host /a>-> a href="+code=ports" class="sref">ports /a>[ a href="+code=i" class="sref">i /a>];n1047 /a>                struct  a href="+code=ata_link" class="sref">ata_link /a> * a href="+code=link" class="sref">link /a>;n1048 /a>                struct  a href="+code=ata_device" class="sref">ata_device /a> * a href="+code=dev" class="sref">dev /a>;n1049 /a>n1050 /a>                 a href="+code=ata_for_each_link" class="sref">ata_for_each_link /a>( a href="+code=link" class="sref">link /a>,  a href="+code=ap" class="sref">ap /a>,  a href="+code=EDGE" class="sref">EDGE /a>)n1051 /a>                         a href="+code=ata_for_each_dev" class="sref">ata_for_each_dev /a>( a href="+code=dev" class="sref">dev /a>,  a href="+code=link" class="sref">link /a>,  a href="+code=ALL" class="sref">ALL /a>)n1052 /a>                                 a href="+code=dev" class="sref">dev /a>-> a href="+code=gtf_filter" class="sref">gtf_filter /a> |=  a href="+code=filter" class="sref">filter /a>;n1053 /a>        }n1054 /a>}n1055 /a>#elsen1056 /a>static  a href="+code=inline" class="sref">inline /a> void  a href="+code=ahci_gtf_filter_workaround" class="sref">ahci_gtf_filter_workaround /a>(struct  a href="+code=ata_host" class="sref">ata_host /a> * a href="+code=host" class="sref">host /a>)n1057 /a>{}n1058 /a>#endifn1059 /a>n1060 /a>static int  a href="+code=ahci_init_one" class="sref">ahci_init_one /a>(struct  a href="+code=pci_dev" class="sref">pci_dev /a> * a href="+code=pdev" class="sref">pdev /a>, const struct  a href="+code=pci_device_id" class="sref">pci_device_id /a> * a href="+code=ent" class="sref">ent /a>)n1061 /a>{n1062 /a>        unsigned int  a href="+code=board_id" class="sref">board_id /a> =  a href="+code=ent" class="sref">ent /a>-> a href="+code=driver_data" class="sref">driver_data /a>;n1063 /a>        struct  a href="+code=ata_port_info" class="sref">ata_port_info /a>  a href="+code=pi" class="sref">pi /a> =  a href="+code=ahci_port_info" class="sref">ahci_port_info /a>[ a href="+code=board_id" class="sref">board_id /a>];n1064 /a>        const struct  a href="+code=ata_port_info" class="sref">ata_port_info /a> * a href="+code=ppi" class="sref">ppi /a>[] = { & a href="+code=pi" class="sref">pi /a>,  a href="+code=NULL" class="sref">NULL /a> };n1065 /a>        struct  a href="+code=device" class="sref">device /a> * a href="+code=dev" class="sref">dev /a> = & a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>;n1066 /a>        struct  a href="+code=ahci_host_priv" class="sref">ahci_host_priv /a> * a href="+code=hpriv" class="sref">hpriv /a>;n1067 /a>        struct  a href="+code=ata_host" class="sref">ata_host /a> * a href="+code=host" class="sref">host /a>;n1068 /a>        int  a href="+code=n_ports" class="sref">n_ports /a>,  a href="+code=i" class="sref">i /a>,  a href="+code=rc" class="sref">rc /a>;n1069 /a>        int  a href="+code=ahci_pci_bar" class="sref">ahci_pci_bar /a> =  a href="+code=AHCI_PCI_BAR_STANDARD" class="sref">AHCI_PCI_BAR_STANDARD /a>;n1070 /a>n1071 /a>         a href="+code=VPRINTK" class="sref">VPRINTK /a>( spai class="string">"ENTER\n" /spaio);n1072 /a>n1073 /a>         a href="+code=WARN_ON" class="sref">WARN_ON /a>((int) a href="+code=ATA_MAX_QUEUE" class="sref">ATA_MAX_QUEUE /a> >  a href="+code=AHCI_MAX_CMDS" class="sref">AHCI_MAX_CMDS /a>);n1074 /a>n1075 /a>         a href="+code=ata_print_version_once" class="sref">ata_print_version_once /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,  a href="+code=DRV_VERSION" class="sref">DRV_VERSION /a>);n1076 /a>n1077 /a>         spai class="comment">/* The AHCI driver cai only drive the SATA ports, the PATA driver /spaion1078 /a> spai class="comment">           cai drive them all so if both drivers are selected make sure /spaion1079 /a> spai class="comment">           AHCI stays out of the way */ /spaion1080 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=vendor" class="sref">vendor /a> ==  a href="+code=PCI_VENDOR_ID_MARVELL" class="sref">PCI_VENDOR_ID_MARVELL /a> && ! a href="+code=marvell_enable" class="sref">marvell_enable /a>)n1081 /a>                return - a href="+code=ENODEV" class="sref">ENODEV /a>;n1082 /a>n1083 /a>         spai class="comment">/* /spaion1084 /a> spai class="comment">         * For some reason, MCP89 on MacBook 7,1 doesn't work with /spaion1085 /a> spai class="comment">         * ahci, use ata_generic instead. /spaion1086 /a> spai class="comment">         */ /spaion1087 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=vendor" class="sref">vendor /a> ==  a href="+code=PCI_VENDOR_ID_NVIDIA" class="sref">PCI_VENDOR_ID_NVIDIA /a> &&n1088 /a>             a href="+code=pdev" class="sref">pdev /a>-> a href="+code=device" class="sref">device /a> ==  a href="+code=PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA" class="sref">PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA /a> &&n1089 /a>             a href="+code=pdev" class="sref">pdev /a>-> a href="+code=subsystem_vendor" class="sref">subsystem_vendor /a> ==  a href="+code=PCI_VENDOR_ID_APPLE" class="sref">PCI_VENDOR_ID_APPLE /a> &&n1090 /a>             a href="+code=pdev" class="sref">pdev /a>-> a href="+code=subsystem_device" class="sref">subsystem_device /a> == 0xcb89)n1091 /a>                return - a href="+code=ENODEV" class="sref">ENODEV /a>;n1092 /a>n1093 /a>         spai class="comment">/* Promise's PDC42819 is a SAS/SATA controller that has ai AHCI mode. /spaion1094 /a> spai class="comment">         * At the moment, we cai only use the AHCI mode. Let the users know /spaion1095 /a> spai class="comment">         * that for SAS drives they're out of luck. /spaion1096 /a> spai class="comment">         */ /spaion1097 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=vendor" class="sref">vendor /a> ==  a href="+code=PCI_VENDOR_ID_PROMISE" class="sref">PCI_VENDOR_ID_PROMISE /a>)n1098 /a>                 a href="+code=dev_info" class="sref">dev_info /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n1099 /a>                          spai class="string">"PDC42819 cai only drive SATA devices with this driver\n" /spaio);n1100 /a>n1101 /a>         spai class="comment">/* The Connext uses non-standard BAR */ /spaion1102 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=vendor" class="sref">vendor /a> ==  a href="+code=PCI_VENDOR_ID_STMICRO" class="sref">PCI_VENDOR_ID_STMICRO /a> &&  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=device" class="sref">device /a> == 0xCC06)n1103 /a>                 a href="+code=ahci_pci_bar" class="sref">ahci_pci_bar /a> =  a href="+code=AHCI_PCI_BAR_STA2X11" class="sref">AHCI_PCI_BAR_STA2X11 /a>;n1104 /a>n1105 /a>         spai class="comment">/* acquire resources */ /spaion1106 /a>         a href="+code=rc" class="sref">rc /a> =  a href="+code=pcim_enable_device" class="sref">pcim_enable_device /a>( a href="+code=pdev" class="sref">pdev /a>);n1107 /a>        if ( a href="+code=rc" class="sref">rc /a>)n1108 /a>                return  a href="+code=rc" class="sref">rc /a>;n1109 /a>n1110 /a>         spai class="comment">/* AHCI controllers often implement SFF compatible interface. /spaion1111 /a> spai class="comment">         * Grab all PCI BARs just in case. /spaion1112 /a> spai class="comment">         */ /spaion1113 /a>         a href="+code=rc" class="sref">rc /a> =  a href="+code=pcim_iomap_regions_request_all" class="sref">pcim_iomap_regions_request_all /a>( a href="+code=pdev" class="sref">pdev /a>, 1 <<  a href="+code=ahci_pci_bar" class="sref">ahci_pci_bar /a>,  a href="+code=DRV_NAME" class="sref">DRV_NAME /a>);n1114 /a>        if ( a href="+code=rc" class="sref">rc /a> == - a href="+code=EBUSY" class="sref">EBUSY /a>)n1115 /a>                 a href="+code=pcim_pin_device" class="sref">pcim_pin_device /a>( a href="+code=pdev" class="sref">pdev /a>);n1116 /a>        if ( a href="+code=rc" class="sref">rc /a>)n1117 /a>                return  a href="+code=rc" class="sref">rc /a>;n1118 /a>n1119 /a>        if ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=vendor" class="sref">vendor /a> ==  a href="+code=PCI_VENDOR_ID_INTEL" class="sref">PCI_VENDOR_ID_INTEL /a> &&n1120 /a>            ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=device" class="sref">device /a> == 0x2652 ||  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=device" class="sref">device /a> == 0x2653)) {n1121 /a>                 a href="+code=u8" class="sref">u8 /a>  a href="+code=map" class="sref">map /a>;n1122 /a>n1123 /a>                 spai class="comment">/* ICH6s share the saml PCI ID for both piix and ahci /spaion1124 /a> spai class="comment">                 * modes.  Enabling ahci mode while MAP indicates /spaion1125 /a> spai class="comment">                 * combined mode is a bad idea.  Yield to ata_piix. /spaion1126 /a> spai class="comment">                 */ /spaion1127 /a>                 a href="+code=pci_read_config_byte" class="sref">pci_read_config_byte /a>( a href="+code=pdev" class="sref">pdev /a>,  a href="+code=ICH_MAP" class="sref">ICH_MAP /a>, & a href="+code=map" class="sref">map /a>);n1128 /a>                if ( a href="+code=map" class="sref">map /a> & 0x3) {n1129 /a>                         a href="+code=dev_info" class="sref">dev_info /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n1130 /a>                                  spai class="string">"controller is in combined mode, cai't enable AHCI mode\n" /spaio);n1131 /a>                        return - a href="+code=ENODEV" class="sref">ENODEV /a>;n1132 /a>                }n1133 /a>        }n1134 /a>n1135 /a>         a href="+code=hpriv" class="sref">hpriv /a> =  a href="+code=devm_kzalloc" class="sref">devm_kzalloc /a>( a href="+code=dev" class="sref">dev /a>, sizeof(* a href="+code=hpriv" class="sref">hpriv /a>),  a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL /a>);n1136 /a>        if (! a href="+code=hpriv" class="sref">hpriv /a>)n1137 /a>                return - a href="+code=ENOMEM" class="sref">ENOMEM /a>;n1138 /a>         a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> |= (unsigned long) a href="+code=pi" class="sref">pi /a>. a href="+code=private_data" class="sref">private_data /a>;n1139 /a>n1140 /a>         spai class="comment">/* MCP65 revision A1 and A2 cai't do MSI */ /spaion1141 /a>        if ( a href="+code=board_id" class="sref">board_id /a> ==  a href="+code=board_ahci_mcp65" class="sref">board_ahci_mcp65 /a> &&n1142 /a>            ( a href="+code=pdev" class="sref">pdev /a>-> a href="+code=revision" class="sref">revision /a> == 0xa1 ||  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=revision" class="sref">revision /a> == 0xa2))n1143 /a>                 a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> |=  a href="+code=AHCI_HFLAG_NO_MSI" class="sref">AHCI_HFLAG_NO_MSI /a>;n1144 /a>n1145 /a>         spai class="comment">/* SB800 does NOT need the workaround to ignore SERR_INTERNAL */ /spaion1146 /a>        if ( a href="+code=board_id" class="sref">board_id /a> ==  a href="+code=board_ahci_sb700" class="sref">board_ahci_sb700 /a> &&  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=revision" class="sref">revision /a> >= 0x40)n1147 /a>                 a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> &= ~ a href="+code=AHCI_HFLAG_IGN_SERR_INTERNAL" class="sref">AHCI_HFLAG_IGN_SERR_INTERNAL /a>;n1148 /a>n1149 /a>         spai class="comment">/* only some SB600s cai do 64bit DMA */ /spaion1150 /a>        if ( a href="+code=ahci_sb600_enable_64bit" class="sref">ahci_sb600_enable_64bit /a>( a href="+code=pdev" class="sref">pdev /a>))n1151 /a>                 a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> &= ~ a href="+code=AHCI_HFLAG_32BIT_ONLY" class="sref">AHCI_HFLAG_32BIT_ONLY /a>;n1152 /a>n1153 /a>        if (( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> &  a href="+code=AHCI_HFLAG_NO_MSI" class="sref">AHCI_HFLAG_NO_MSI /a>) ||  a href="+code=pci_enable_msi" class="sref">pci_enable_msi /a>( a href="+code=pdev" class="sref">pdev /a>))n1154 /a>                 a href="+code=pci_intx" class="sref">pci_intx /a>( a href="+code=pdev" class="sref">pdev /a>, 1);n1155 /a>n1156 /a>         a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=mmio" class="sref">mmio /a> =  a href="+code=pcim_iomap_table" class="sref">pcim_iomap_table /a>( a href="+code=pdev" class="sref">pdev /a>)[ a href="+code=ahci_pci_bar" class="sref">ahci_pci_bar /a>];n1157 /a>n1158 /a>         spai class="comment">/* save initial config */ /spaion1159 /a>         a href="+code=ahci_pci_save_initial_config" class="sref">ahci_pci_save_initial_config /a>( a href="+code=pdev" class="sref">pdev /a>,  a href="+code=hpriv" class="sref">hpriv /a>);n1160 /a>n1161 /a>         spai class="comment">/* prepare host */ /spaion1162 /a>        if ( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=cap" class="sref">cap /a> &  a href="+code=HOST_CAP_NCQ" class="sref">HOST_CAP_NCQ /a>) {n1163 /a>                 a href="+code=pi" class="sref">pi /a>. a href="+code=flags" class="sref">flags /a> |=  a href="+code=ATA_FLAG_NCQ" class="sref">ATA_FLAG_NCQ /a>;n1164 /a>                 spai class="comment">/* /spaion1165 /a> spai class="comment">                 * Auto-activate optimization is supposed to be /spaion1166 /a> spai class="comment">                 * supported on all AHCI controllers indicating NCQ /spaion1167 /a> spai class="comment">                 * capability, but it seems to be brokei on some /spaion1168 /a> spai class="comment">                 * chipsets including NVIDIAs. /spaion1169 /a> spai class="comment">                 */ /spaion1170 /a>                if (!( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> &  a href="+code=AHCI_HFLAG_NO_FPDMA_AA" class="sref">AHCI_HFLAG_NO_FPDMA_AA /a>))n1171 /a>                         a href="+code=pi" class="sref">pi /a>. a href="+code=flags" class="sref">flags /a> |=  a href="+code=ATA_FLAG_FPDMA_AA" class="sref">ATA_FLAG_FPDMA_AA /a>;n1172 /a>        }n1173 /a>n1174 /a>        if ( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=cap" class="sref">cap /a> &  a href="+code=HOST_CAP_PMP" class="sref">HOST_CAP_PMP /a>)n1175 /a>                 a href="+code=pi" class="sref">pi /a>. a href="+code=flags" class="sref">flags /a> |=  a href="+code=ATA_FLAG_PMP" class="sref">ATA_FLAG_PMP /a>;n1176 /a>n1177 /a>         a href="+code=ahci_set_em_messages" class="sref">ahci_set_em_messages /a>( a href="+code=hpriv" class="sref">hpriv /a>, & a href="+code=pi" class="sref">pi /a>);n1178 /a>n1179 /a>        if ( a href="+code=ahci_brokei_system_poweroff" class="sref">ahci_brokei_system_poweroff /a>( a href="+code=pdev" class="sref">pdev /a>)) {n1180 /a>                 a href="+code=pi" class="sref">pi /a>. a href="+code=flags" class="sref">flags /a> |=  a href="+code=ATA_FLAG_NO_POWEROFF_SPINDOWN" class="sref">ATA_FLAG_NO_POWEROFF_SPINDOWN /a>;n1181 /a>                 a href="+code=dev_info" class="sref">dev_info /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n1182 /a>                         spai class="string">"quirky BIOS, skipping spindowi on poweroff\n" /spaio);n1183 /a>        }n1184 /a>n1185 /a>        if ( a href="+code=ahci_brokei_suspend" class="sref">ahci_brokei_suspend /a>( a href="+code=pdev" class="sref">pdev /a>)) {n1186 /a>                 a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> |=  a href="+code=AHCI_HFLAG_NO_SUSPEND" class="sref">AHCI_HFLAG_NO_SUSPEND /a>;n1187 /a>                 a href="+code=dev_warn" class="sref">dev_warn /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n1188 /a>                          spai class="string">"BIOS update required for suspend/resume\n" /spaio);n1189 /a>        }n1190 /a>n1191 /a>        if ( a href="+code=ahci_brokei_online" class="sref">ahci_brokei_online /a>( a href="+code=pdev" class="sref">pdev /a>)) {n1192 /a>                 a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=flags" class="sref">flags /a> |=  a href="+code=AHCI_HFLAG_SRST_TOUT_IS_OFFLINE" class="sref">AHCI_HFLAG_SRST_TOUT_IS_OFFLINE /a>;n1193 /a>                 a href="+code=dev_info" class="sref">dev_info /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,n1194 /a>                          spai class="string">"online status unreliable, applying workaround\n" /spaio);n1195 /a>        }n1196 /a>n1197 /a>         spai class="comment">/* CAP.NP sometimes indicate the index of the last enabled /spaion1198 /a> spai class="comment">         * port, at other times, that of the last possible port, so /spaion1199 /a> spai class="comment">         * determining the maximum port number requires looking at /spaion1200 /a> spai class="comment">         * both CAP.NP and port_map. /spaion1201 /a> spai class="comment">         */ /spaion1202 /a>         a href="+code=n_ports" class="sref">n_ports /a> =  a href="+code=max" class="sref">max /a>( a href="+code=ahci_nr_ports" class="sref">ahci_nr_ports /a>( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=cap" class="sref">cap /a>),  a href="+code=fls" class="sref">fls /a>( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=port_map" class="sref">port_map /a>));n1203 /a>n1204 /a>         a href="+code=host" class="sref">host /a> =  a href="+code=ata_host_alloc_pinfo" class="sref">ata_host_alloc_pinfo /a>(& a href="+code=pdev" class="sref">pdev /a>-> a href="+code=dev" class="sref">dev /a>,  a href="+code=ppi" class="sref">ppi /a>,  a href="+code=n_ports" class="sref">n_ports /a>);n1205 /a>        if (! a href="+code=host" class="sref">host /a>)n1206 /a>                return - a href="+code=ENOMEM" class="sref">ENOMEM /a>;n1207 /a>         a href="+code=host" class="sref">host /a>-> a href="+code=private_data" class="sref">private_data /a> =  a href="+code=hpriv" class="sref">hpriv /a>;n1208 /a>n1209 /a>        if (!( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=cap" class="sref">cap /a> &  a href="+code=HOST_CAP_SSS" class="sref">HOST_CAP_SSS /a>) ||  a href="+code=ahci_ignore_sss" class="sref">ahci_ignore_sss /a>)n1210 /a>                 a href="+code=host" class="sref">host /a>-> a href="+code=flags" class="sref">flags /a> |=  a href="+code=ATA_HOST_PARALLEL_SCAN" class="sref">ATA_HOST_PARALLEL_SCAN /a>;n1211 /a>        elsen1212 /a>                 a href="+code=printk" class="sref">printk /a>( a href="+code=KERN_INFO" class="sref">KERN_INFO /a>  spai class="string">"ahci: SSS flag set, parallel bus scai disabled\n" /spaio);n1213 /a>n1214 /a>        if ( a href="+code=pi" class="sref">pi /a>. a href="+code=flags" class="sref">flags /a> &  a href="+code=ATA_FLAG_EM" class="sref">ATA_FLAG_EM /a>)n1215 /a>                 a href="+code=ahci_reset_em" class="sref">ahci_reset_em /a>( a href="+code=host" class="sref">host /a>);n1216 /a>n1217 /a>        for ( a href="+code=i" class="sref">i /a> = 0;  a href="+code=i" class="sref">i /a> <  a href="+code=host" class="sref">host /a>-> a href="+code=n_ports" class="sref">n_ports /a>;  a href="+code=i" class="sref">i /a>++) {n1218 /a>                struct  a href="+code=ata_port" class="sref">ata_port /a> * a href="+code=ap" class="sref">ap /a> =  a href="+code=host" class="sref">host /a>-> a href="+code=ports" class="sref">ports /a>[ a href="+code=i" class="sref">i /a>];n1219 /a>n1220 /a>                 a href="+code=ata_port_pbar_desc" class="sref">ata_port_pbar_desc /a>( a href="+code=ap" class="sref">ap /a>,  a href="+code=ahci_pci_bar" class="sref">ahci_pci_bar /a>, -1,  spai class="string">"abar" /spaio);n1221 /a>                 a href="+code=ata_port_pbar_desc" class="sref">ata_port_pbar_desc /a>( a href="+code=ap" class="sref">ap /a>,  a href="+code=ahci_pci_bar" class="sref">ahci_pci_bar /a>,n1222 /a>                                   0x100 +  a href="+code=ap" class="sref">ap /a>-> a href="+code=port_no" class="sref">port_no /a> * 0x80,  spai class="string">"port" /spaio);n1223 /a>n1224 /a>                 spai class="comment">/* set enclosure management message type */ /spaion1225 /a>                if ( a href="+code=ap" class="sref">ap /a>-> a href="+code=flags" class="sref">flags /a> &  a href="+code=ATA_FLAG_EM" class="sref">ATA_FLAG_EM /a>)n1226 /a>                         a href="+code=ap" class="sref">ap /a>-> a href="+code=em_message_type" class="sref">em_message_type /a> =  a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=em_msg_type" class="sref">em_msg_type /a>;n1227 /a>n1228 /a>n1229 /a>                 spai class="comment">/* disabled/not-implemented port */ /spaion1230 /a>                if (!( a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=port_map" class="sref">port_map /a> & (1 <<  a href="+code=i" class="sref">i /a>)))n1231 /a>                         a href="+code=ap" class="sref">ap /a>-> a href="+code=ops" class="sref">ops /a> = & a href="+code=ata_dummy_port_ops" class="sref">ata_dummy_port_ops /a>;n1232 /a>        }n1233 /a>n1234 /a>         spai class="comment">/* apply workaround for ASUS P5W DH Deluxe mainboard */ /spaion1235 /a>         a href="+code=ahci_p5wdh_workaround" class="sref">ahci_p5wdh_workaround /a>( a href="+code=host" class="sref">host /a>);n1236 /a>n1237 /a>         spai class="comment">/* apply gtf filter quirk */ /spaion1238 /a>         a href="+code=ahci_gtf_filter_workaround" class="sref">ahci_gtf_filter_workaround /a>( a href="+code=host" class="sref">host /a>);n1239 /a>n1240 /a>         spai class="comment">/* initialize adapter */ /spaion1241 /a>         a href="+code=rc" class="sref">rc /a> =  a href="+code=ahci_configure_dma_masks" class="sref">ahci_configure_dma_masks /a>( a href="+code=pdev" class="sref">pdev /a>,  a href="+code=hpriv" class="sref">hpriv /a>-> a href="+code=cap" class="sref">cap /a> &  a href="+code=HOST_CAP_64" class="sref">HOST_CAP_64 /a>);n1242 /a>        if ( a href="+code=rc" class="sref">rc /a>)n1243 /a>                return  a href="+code=rc" class="sref">rc /a>;n1244 /a>n1245 /a>         a href="+code=rc" class="sref">rc /a> =  a href="+code=ahci_pci_reset_controller" class="sref">ahci_pci_reset_controller /a>( a href="+code=host" class="sref">host /a>);n1246 /a>        if ( a href="+code=rc" class="sref">rc /a>)n1247 /a>                return  a href="+code=rc" class="sref">rc /a>;n1248 /a>n1249 /a>         a href="+code=ahci_pci_init_controller" class="sref">ahci_pci_init_controller /a>( a href="+code=host" class="sref">host /a>);n1250 /a>         a href="+code=ahci_pci_print_info" class="sref">ahci_pci_print_info /a>( a href="+code=host" class="sref">host /a>);n1251 /a>n1252 /a>         a href="+code=pci_set_master" class="sref">pci_set_master /a>( a href="+code=pdev" class="sref">pdev /a>);n1253 /a>        return  a href="+code=ata_host_activate" class="sref">ata_host_activate /a>( a href="+code=host" class="sref">host /a>,  a href="+code=pdev" class="sref">pdev /a>-> a href="+code=irq" class="sref">irq /a>,  a href="+code=ahci_interrupt" class="sref">ahci_interrupt /a>,  a href="+code=IRQF_SHARED" class="sref">IRQF_SHARED /a>,n1254 /a>                                 & a href="+code=ahci_sht" class="sref">ahci_sht /a>);n1255 /a>}n1256 /a>n1257 /a> a href="+code=module_pci_driver" class="sref">module_pci_driver /a>( a href="+code=ahci_pci_driver" class="sref">ahci_pci_driver /a>);n1258 /a>n1259 /a> a href="+code=MODULE_AUTHOR" class="sref">MODULE_AUTHOR /a>( spai class="string">"Jeff Garzik" /spaio);n1260 /a> a href="+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTION /a>( spai class="string">"AHCI SATA low-level driver" /spaio);n1261 /a> a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE /a>( spai class="string">"GPL" /spaio);n1262 /a> a href="+code=MODULE_DEVICE_TABLE" class="sref">MODULE_DEVICE_TABLE /a>( a href="+code=pci" class="sref">pci /a>,  a href="+code=ahci_pci_tbl" class="sref">ahci_pci_tbl /a>);n1263 /a> a href="+code=MODULE_VERSION" class="sref">MODULE_VERSION /a>( a href="+code=DRV_VERSION" class="sref">DRV_VERSION /a>);n1264 /a>
lxr.linux.no kindly hosted by Redpill Linpro AS /a>, provider of Linux consulting and operations services since 1995.