linux/drivers/ata/acard-ahci.c
<<
>>
Prefs
   1
   2/*
   3 *  acard-ahci.c - ACard AHCI SATA support
   4 *
   5 *  Maintained by:  Jeff Garzik <jgarzik@pobox.com>
   6 *                  Please ALWAYS copy linux-ide@vger.kernel.org
   7 *                  on emails.
   8 *
   9 *  Copyright 2010 Red Hat, Inc.
  10 *
  11 *
  12 *  This program is free software; you can redistribute it and/or modify
  13 *  it under the terms of the GNU General Public License as published by
  14 *  the Free Software Foundation; either version 2, or (at your option)
  15 *  any later version.
  16 *
  17 *  This program is R37d i8our ohopndeh2, t">will be useful,ent"> *
   8 *
   9 *
  10  11 *
  12 *
   3 *  This ; sendehe iv i COPYING.  If no Rewriisttoent"> *
  14 *  the Free Software Fou, 675nt"ss Ave, Cambridge, MA 02139, USA emails.
  15  16 *
  17 *
   8 *
   9/*
  10/*
  11/*
  12/*
   3/*
  14/*
   1
 #include Garz 1
ef="./e@vger.h6"> box.  1
 #include Garz 1
ef="./andule.h6"> box.  1
 #include Garz 1
ef="./pcarh6"> box.  1
 #include Garz 1
ef="./initrh6"> box.  1
 #include Garz 1
ef="./blkdevrh6"> box.  1
 #include Garz 1
ef="./delayrh6"> box.  1
 #include Garz 1
ef="./in anruptrh6"> box.  1
 #include Garz 1
ef="./dma-mappingrh6"> box.  1
 #include Garz 1
ef="./devublrh6"> box.  1
 #include Garz 1
ef="./dmarh6"> box.  1
 #include Garz 1
ef="./gfprh6"> box.  1
 #include Garz 1
scsirscsi_hostrh6"> box.  1
 #include Garz 1
scsirscsi_cmndrh6"> box.  1
 #include Garz 1
ef="./libriv.h6"> box.  1
 #include Gquorz 1
rhcarh6"> bquorz  1
   1
 #deflasfs">
	  DRV_NAME6">          14 *
 #deflasfs">
	  DRV_VERSION6">       14 *
   1
  15/*
  16  17/*
   1
 #deflasfs">
	  ACARD_ ACa_RX_FIS_SZ6">  128
   1
 enum {  1
          ">
	  AACa_PCa_BAR6">             = 5,  1
 }z  1
   1
 enum  ">
	  bo/at_ids6">  {  1
          ">
	  bo/at_rs/at_/aca6"> ,  1
 }z  1
   1
 m iuct  ">
	  rs/at_sg6">  {  1
          ">
	  __le3"6">                    ">
	  rddr6"> z  1
          ">
	  __le3"6">                    ">
	  addr_ha6"> z  1
          ">
	  __le3"6">                    ">
	  reserefd6"> z  1
          ">
	  __le3"6">                    ">
	  size6"> z     14/*
 }z  1
   1
 m "../ void  ">
	  rs/at_/aca_qcrn ap6"> (m iuct  ">
	  rta_queued_cmd6">  * ">
	  qc6"> )z  1
 m "../  ">
	  bool6">   ">
	  rs/at_/aca_qcrfill_rtf6"> (m iuct  ">
	  rta_queued_cmd6">  * ">
	  qc6"> )z  1
 m "../ int  ">
	  rs/at_/aca_ATA _m "rt6"> (m iuct  ">
	  rta_ATA su>  * ">
	  rp6"> )z  1
 m "../ int  ">
	  rs/at_/aca_init_las6"> (m iuct  ">
	  pca_devsu>  * ">
	  pdevsu> , const m iuct  ">
	  pca_device_idsu>  * ">
	  s="6"> )z  1
   1
 #ifdef  ">
	  CONFIG_PM1">   1
 m "../ int  ">
	  rs/at_/aca_Aca_device_suspend6"> (m iuct  ">
	  pca_devsu>  * ">
	  pdevsu> ,  ">
	  pm_message_"6">   ">
	  mesg6"> )z  1
 m "../ int  ">
	  rs/at_/aca_Aca_device_searms6"> (m iuct  ">
	  pca_devsu>  * ">
	  pdevsu> )z  1
 #endif  1
   1
 m "../ m iuct  ">
	  scsi_host_temp*  a6">   ">
	  rs/at_/aca_sht6">  = {  1
          ">
	  AACa_SHT6"> ( 14 *),  1
 }z  1
   1
 m "../ m iuct  ">
	  rta_ATA _opere Fous6">   ">
	  rs/at_ops6">  = {  1
         . ">
	  inherits6">                = & ">
	  raca_ops6"> ,  1
         . ">
	  qcrn ap6">                 =  ">
	  rs/at_/aca_qcrn ap6"> ,  1
         . ">
	  qcrfill_rtf6">             =  ">
	  rs/at_/aca_qcrfill_rtf6"> ,  1
         . ">
	  ATA _m "rt6">              =  ">
	  rs/at_/aca_ATA _m "rt6"> ,  1
 }z  1
   1
 #deflasfs">
	  AACa_HFLAGS6"> ( ">
	  flagssu> )      . ">
	  Ahre  a_driv6">    = (void *)( ">
	  flagssu> )  1
   1
 m "../ const m iuct  ">
	  rta_ATA _info6">   ">
	  rs/at_/aca_ATA _info6"> [] = {  1
         [ ">
	  bo/at_rs/at_/aca6"> ] =  1
         {  1
                 s">
	  AACa_HFLAGS6">      ( ">
	  AACa_HFLAG_NO_NCQsu> ),  1
                 . ">
	  flagssu>           =  ">
	  AACa_FLAG_COMMON6"> ,  1
                 . ">
	  Aio_mask6">        =  ">
	  ATA_PIO46"> ,  1
                 . ">
	  udma_mask6">       =  ">
	  ATA_UDMA66"> ,  1
                 . ">
	  pTA _ops6">        = & ">
	  rs/at_ops6"> ,  1
         },  1
 }z  1
   1
 m "../ const m iuct  ">
	  pca_device_idsu>   ">
	  rs/at_/aca_Aca_tbl6"> [] = {  1
          14/*
         {  ">
	  PCa_VDEVICE6"> ( ">
	  ARTOPsu> , 0x000d),  ">
	  bo/at_rs/at_/aca6">  },  14/*
 
         { }     14/*
 }z  1
   1
 m "../ m iuct  ">
	  pca_dhref=su>   ">
	  rs/at_/aca_Aca_dhref=6">  = {  1
         . ">
	  "lin6">                    =  ">
	  DRV_NAME6"> ,  1
         . ">
	  id_tab i6">                =  ">
	  rs/at_/aca_Aca_tbl6"> ,  1
         . ">
	  probi6">                   =  ">
	  rs/at_/aca_init_las6"> ,  1
         . ">
	  removs6">                  =  ">
	  rta_Aca_removs_las6"> ,  1
 #ifdef  ">
	  CONFIG_PM1">   1
         . ">
	  suspend6">                 =  ">
	  rs/at_/aca_Aca_device_suspend6"> ,  1
         . ">
	  searms6">                  =  ">
	  rs/at_/aca_Aca_device_searms6"> ,  1
 #endif  1
 }z  1
   1
 #ifdef  ">
	  CONFIG_PM1">   1
 m "../ int  ">
	  rs/at_/aca_Aca_device_suspend6"> (m iuct  ">
	  pca_devsu>  * ">
	  pdevsu> ,  ">
	  pm_message_"6">   ">
	  mesg6"> )
 {  1
         m iuct  ">
	  rta_hthosu>  * ">
	  hthosu>  =  ">
	  dev_get_dhvdriv6"> (& ">
	  pdevsu> -box.c">
	  devsu> )z  1
         m iuct  ">
	  raca_host_Ahresu>  * ">
	  hAhresu>  =  ">
	  hthosu> -box.c">
	  Ahre  a_driv6"> z  1
         void  ">
	  __iomemsu>  * ">
	  mmiosu>  =  ">
	  hAhresu> -box.c">
	  mmiosu> z  1
          ">
	  u3"6">   ">
	  ctlsu> z  1
   1
         if ( ">
	  mesg6"> . ">
	  svs="6">  &  ">
	  PM_EVENT_SUSPEND6">  &&  1
              ">
	  hAhresu> -box.c">
	  flagssu>  &  ">
	  AACa_HFLAG_NO_SUSPENDsu> ) {  1
                  ">
	  dev_er=6"> (& ">
	  pdevsu> -box.c">
	  devsu> ,  1
                          14 *);  1
                 ubmit="-c">
	  EIOsu> z  1
         }  1
   1
         if ( ">
	  mesg6"> . ">
	  svs="6">  &  ">
	  PM_EVENT_SLEEPsu> ) {  1
                  14/*
  15/*
  16
  17/*
                  ">
	  ctlsu>  =  ">
	  readl6"> ( ">
	  mmiosu>  +  ">
	  HOST_CTLsu> )z  1
                  ">
	  ctlsu>  &= ~ ">
	  HOST_IRQ_ENsu> z  1
                  ">
	  wriisl6"> ( ">
	  ctlsu> ,  ">
	  mmiosu>  +  ">
	  HOST_CTLsu> )z  1
                  ">
	  readl6"> ( ">
	  mmiosu>  +  ">
	  HOST_CTLsu> )z  14/*
         }  1
 
         ubmit=" ">
	  rta_Aca_device_suspend6"> ( ">
	  pdevsu> ,  ">
	  mesg6"> )z  1
 }  1
   1
 m "../ int  ">
	  rs/at_/aca_Aca_device_searms6"> (m iuct  ">
	  pca_devsu>  * ">
	  pdevsu> )  1
 {  1
         m iuct  ">
	  rta_hthosu>  * ">
	  hthosu>  =  ">
	  dev_get_dhvdriv6"> (& ">
	  pdevsu> -box.c">
	  devs"> )z  1
         int  ">
	  rcsu> z  1
   1
          ">
	  rcsu>  =  ">
	  rta_Aca_device_do_searms6"> ( ">
	  pdevsu> )z  1
         if ( ">
	  rcsu> )  1
                 ubmit=" ">
	  rcsu> z  1
   1
         if ( ">
	  pdevsu> -box.c">
	  devs"> . ">
	  pTwf=s"> . ">
	  pTwf=_m ".e6"> . ">
	  svs="6">  ==  ">
	  PM_EVENT_SUSPEND6"> ) {  1
                  ">
	  rcsu>  =  ">
	  rhca_reset_="firollf=6"> ( ">
	  hthosu> )z  1
                 if ( ">
	  rcsu> )  1
                         ubmit=" ">
	  rcsu> z  1
   1
                  ">
	  rhca_init_="firollf=6"> ( ">
	  hthosu> )z  1
         }  1
 
          ">
	  rta_htho_searms6"> ( ">
	  hthosu> )z  1
   1
         ubmit="0z  1
 }  1
 #endif  1
   1
 m "../ int  ">
	  rs/at_/aca_="ffigure_dma_masks6"> (m iuct  ">
	  pca_devsu>  * ">
	  pdevsu> , int  ">
	  using_dacsu> )  1
 {  1
         int  ">
	  rcsu> z  1
 
         if ( ">
	  using_dacsu>  &&  1
             ! ">
	  pca_set_dma_mask6"> ( ">
	  pdevsu> ,  ">
	  DMA_BIT_MASK6"> (64))) {  1
                  ">
	  rcsu>  =  ">
	  pca_set_consisile__dma_mask6"> ( ">
	  pdevsu> ,  ">
	  DMA_BIT_MASK6"> (64));  1
                 if ( ">
	  rcsu> ) {  1
                          ">
	  rcsu>  =  ">
	  pca_set_consisile__dma_mask6"> ( ">
	  pdevsu> ,  ">
	  DMA_BIT_MASK6"> (32));  1
                         if ( ">
	  rcsu> ) {  1
                                  ">
	  dev_er=6"> (& ">
	  pdevsu> -box.c">
	  devsu> ,  1
                                             14 *);  1
                                 ubmit=" ">
	  rcsu> z  1
                         }  1
                 }  1
         } else {  1
                  ">
	  rcsu>  =  ">
	  pca_set_dma_mask6"> ( ">
	  pdevsu> ,  ">
	  DMA_BIT_MASK6"> (32));  1
                 if ( ">
	  rcsu> ) {  1
                          ">
	  dev_er=6"> (& ">
	  pdevsu> -box.c">
	  devsu> ,  14 *);  1
                         ubmit=" ">
	  rcsu> z  1
                 }  1
                  ">
	  rcsu>  =  ">
	  pca_set_consisile__dma_mask6"> ( ">
	  pdevsu> ,  ">
	  DMA_BIT_MASK6"> (32));  1
                 if ( ">
	  rcsu> ) {  1
                          ">
	  dev_er=6"> (& ">
	  pdevsu> -box.c">
	  devsu> ,  1
                                  14 *);  1
                         ubmit=" ">
	  rcsu> z  1
                 }  1
         }  1
         ubmit="0z  1
 }  1
   1
 m "../ void  ">
	  rs/at_/aca_Aca_pisn _info6"> (m iuct  ">
	  rta_hthosu>  * ">
	  hthosu> )  1
 {  1
         m iuct  ">
	  pca_devsu>  * ">
	  pdevsu>  =  ">
	  to_pca_dev6"> ( ">
	  hthosu> -box.c">
	  devs"> )z  1
          ">
	  u161">   ">
	  ccsu> z  1
         const char * ">
	  scc_ssu> z  1
   1
          ">
	  pca_read_="ffig_word6"> ( ">
	  pdevsu> , 0x0a, & ">
	  ccsu> )z  1
         if ( ">
	  ccsu>  ==  ">
	  PCI_CLASS_STORAGE_IDEsu> )  1
                  ">
	  scc_ssu>  =  14 *z  1
         else if ( ">
	  ccsu>  ==  ">
	  PCI_CLASS_STORAGE_SATAsu> )  1
                  ">
	  scc_ssu>  =  14 *z  1
         else if ( ">
	  ccsu>  ==  ">
	  PCI_CLASS_STORAGE_RAIDsu> )  1
                  ">
	  scc_ssu>  =  14 *z  1
         else  1
                  ">
	  scc_ssu>  =  14 *z  1
   1
          ">
	  rhca_pisn _info6"> ( ">
	  hthosu> ,  ">
	  scc_ssu> )z  1
 }  1
   1
 m "../ unsigned int  ">
	  rs/at_/aca_fill_sg6"> (m iuct  ">
	  rta_queued_cmd6">  * ">
	  qc6"> , void * ">
	  cmd_tblsu> )  1
 {  1
         m iuct  ">
	  scatterlist6">  * ">
	  sg6"> z  1
         m iuct  ">
	  rs/at_sg6">  * ">
	  rs/at_sg6">  =  ">
	  cmd_tblsu>  +  ">
	  AACa_CMD_TBL_HDR_SZ6"> z  1
         unsigned int  ">
	  sisu> ,  ">
	  ultt_sa6">  = 0z  1
   1
          ">
	  VPRINTK6"> ( 14 *);  1
   1
          15/*
  17  17/*
          ">
	  for_each_sg6"> ( ">
	  qc6"> -box.c">
	  sg6"> ,  ">
	  sg6"> ,  ">
	  qc6"> -box.c">
	  n_elem6"> ,  ">
	  sisu> ) {  1
                 s">
	  dma_addr_t1">   ">
	  rddr6">  =  ">
	  sg_dma_address6"> ( ">
	  sg6"> );  1
                  ">
	  u3"6">   ">
	  sg_len6">  =  ">
	  sg_dma_len6"> ( ">
	  sg6"> );  1
   1
                  15/*
  16/*
  17/*
  17/*
  17/*
                  ">
	  rs/at_sg6"> [ ">
	  sisu> ]. ">
	  rddr6">  =  ">
	  cpu_to_le3"6"> ( ">
	  rddr6">  & 0xffffffff);  1
                  ">
	  rs/at_sg6"> [ ">
	  sisu> ]. ">
	  addr_ha6">  =  ">
	  cpu_to_le3"6"> (( ">
	  rddr6">  &ox.&ox. 16) &ox.&ox. 16);  1
                 s">
	  rs/at_sg6"> [ ">
	  sisu> ]. ">
	  sizs6">  =  ">
	  cpu_to_le3"6"> ( ">
	  sg_len6"> );  1
                  ">
	  ultt_sa6">  =  ">
	  sisu> ;  1
         }  1
   1
          ">
	  rs/at_sg6"> [ ">
	  ultt_sa6"> ]. ">
	  sizs6">  |=  ">
	  cpu_to_le3"6"> (1 &lx.&lx. 31)z  14/*
   1
         ubmit=" ">
	  sisu> ;  1
 }  1
   1
 m "../ void  ">
	  rs/at_/aca_qcrn ap6"> (m iuct  ">
	  rta_queued_cmd6">  * ">
	  qc6"> )  1
 {  1
         m iuct  ">
	  rta_ATA 6">  * ">
	  rp6">  =  ">
	  qc6"> -box.c">
	  rp6"> ;  1
         m iuct  ">
	  raca_pTA _Ahre6">  * ">
	  pp6">  =  ">
	  rp6"> -box.c">
	  Ahre  a_driv6"> z  1
         int  ">
	  is_rivpa6">  =  ">
	  rta_is_rivpa6"> ( ">
	  qc6"> -box.c">
	  tf6"> . ">
	  protocol6"> );  1
         void * ">
	  cmd_tblsu> ;  1
          ">
	  u3"6">   ">
	  optssu> ;  1
         const  ">
	  u3"6">   ">
	  cmd_fis_len6">  = 5z  14/*
         unsigned int  ">
	  n_elem6"> ;  1
   1
          14/*
  17/*
  17  17/*
          ">
	  cmd_tblsu>  =  ">
	  pp6"> -box.c">
	  cmd_tblsu>  +  ">
	  qc6"> -box.c">
	  tag6">  *  ">
	  AACa_CMD_TBL_SZ6"> z  1
   1
          ">
	  rta_tf_to_fis6"> (& ">
	  qc6"> -box.c">
	  tf6"> ,  ">
	  qc6"> -box.c">
	  devs"> -box.c">
	  clak6"> -box.c">
	  pmp6"> , 1,  ">
	  cmd_tblsu> )z  1
         if ( ">
	  is_rivpa6"> ) {  1
                  ">
	  memse 6"> ( ">
	  cmd_tblsu>  +  ">
	  AACa_CMD_TBL_CDB6"> , 0, 32)z  1
                  ">
	  memcpy6"> ( ">
	  cmd_tblsu>  +  ">
	  AACa_CMD_TBL_CDB6"> ,  ">
	  qc6"> -box.c">
	  cdb6"> ,  ">
	  qc6"> -box.c">
	  devs"> -box.c">
	  cdb_lensu> )z  1
         }  1
   1
          ">
	  n_elem6">  = 0z  1
         if ( ">
	  qc6"> -box.c">
	  flagssu>  &  ">
	  ATA_QCFLAG_DMAMAP6"> )  1
                  ">
	  n_elem6">  =  ">
	  rs/at_/aca_fill_sg6"> ( ">
	  qc6"> ,  ">
	  cmd_tblsu> )z  1
   1
          14/*
  17/*
  17/*
  17/*
  17/*
          ">
	  optssu>  =  ">
	  cmd_fis_len6">  | ( ">
	  qc6"> -box.c">
	  devs"> -box.c">
	  clak6"> -box.c">
	  pmp6">  &lx.&lx. 12)z  1
         if ( ">
	  qc6"> -box.c">
	  tf6"> . ">
	  flagssu>  &  ">
	  ATA_TFLAG_WRITE6"> )  1
                  ">
	  optssu>  |=  ">
	  AACa_CMD_WRITE6"> z  1
         if ( ">
	  is_rivpa6"> )  1
                  ">
	  optssu>  |=  ">
	  AACa_CMD_ATAPI6">  |  ">
	  AACa_CMD_PREFETCH6"> z  1
   1
          ">
	  raca_fill_cmd_slot6"> ( ">
	  pp6"> ,  ">
	  qc6"> -box.c">
	  tag6"> ,  ">
	  optssu> )z  1
 }  1
   1
 m "../  ">
	  bool6">   ">
	  rs/at_/aca_qcrfill_rtf6"> (m iuct  ">
	  rta_queued_cmd6">  * ">
	  qc6"> )  1
 {  1
         m iuct  ">
	  raca_pTA _Ahre6">  * ">
	  pp6">  =  ">
	  qc6"> -box.c">
	  rp6"> -box.c">
	  Ahre  a_driv6"> z  1
          ">
	  u86">  * ">
	  rx_fissu>  =  ">
	  pp6"> -box.c">
	  rx_fissu> z  1
   1
         if ( ">
	  pp6"> -box.c">
	  fbs_enab id6"> )  1
                  ">
	  rx_fissu>  +=  ">
	  qc6"> -box.c">
	  devs"> -box.c">
	  clak6"> -box.c">
	  pmp6">  *  ">
	  ACARD_AACa_RX_FIS_SZsu> z  1
   1
          14/*
  17/*
  17/*
  17/*
  17  17/*
         if ( ">
	  qc6"> -box.c">
	  tf6"> . ">
	  protocol6">  ==  ">
	  ATA_PROT_PIOsu>  &&  ">
	  qc6"> -box.c">
	  dma_di=6">  ==  ">
	  DMA_FROM_DEVICEsu>  &&
             !( ">
	  qc6"> -box.c">
	  flagssu>  &  ">
	  ATA_QCFLAG_FAILED6"> )) {  1
                  ">
	  rta_tf_from_fis6"> ( ">
	  rx_fissu>  +  ">
	  RX_FIS_PIO_SETUP6"> , & ">
	  qc6"> -box.c">
	  searlt_tfsu> )z  1
                  ">
	  qc6"> -box.c">
	  searlt_tfsu> . ">
	  clasandsu>  = ( ">
	  rx_fissu>  +  ">
	  RX_FIS_PIO_SETUP6"> )[15]z  1
pp6"> -bo06ame3186">R" 25ame=2566">          ">
	  pca_read_="ffig_wcaca_REG6"> ( ">
	  rx_fissu>  +  ">
	  RX_FIS_PIO_SETUP6"> , & ">
	  
	  
	  rcsu> z  1<3e=scc_sre3ults" camf">scc_ssu>  = 314
	  pmp6"> ">
	  optssu> )z  1scc_ssu>  = 314sg6"> );  1<3drivers/a3a/acard-a22ci.c#L1422 id3"L14"3class="L16" class="line" 15ame=1561">   1
   1
	  
         if ( ">
	  scc_ssu>  =  143/a>flagssu> a>
 {  1ata/a
	  rac* ">
	  pdevsu>  =  camf">pp6">  =  ">
	  qc6"> -box.c">
	  hthosu> ,  3>
	  328 id="L16" clss="line" 302me=30"6">n>

	  
	  
	  rac* ">
	  pdevsu>  =           ">
	  qc6"> -box.c">
	    +  ">"drivers/ata/acard-a22hc3.c#L832" id="L8" class="line" 15name1581"> {  1
  mf">qc6"> -box.c">
	  
protocol6">m
qc6"> , void * ">
3  

	  scatterlist3">  *33>
	  rcsu> z  1<3u>  +  ">3	  Ahre  a_s="line" 303me=3036">         m iuct  ">
codm_kzalloesults" camf">rxcodm_kzalloeame=2566">           ">
	    ) , & ">
	  sisu> ,  ">
	  <3 code33  )IO_SETUP6"> , & ">
	  
VPRINTK6"> ( 14<3a> *);  1<3a>
  check FBS capabilityn.
 339/a>        HOST_CAP_FBS   )"> . ">
	            id="L3" class="line" 266	  flagssu> "line" 233ame2396">  17


	/acard-a3bas       ">
	            id="L3" class="line" 266a26hci.c#L926" id="L9" class="line" 23024 id="L30" class="line" 24ame=2436">  34ts" camf">rddr6">  & 0xffffffff)> ;  1

card        if ( ">
card ame=2566">          sd-a3mmia>

>

" 266a26hci.c#L926" id="L9" class="line" 230=scc_sre3mresults" camf">n_elem6"3 ,  "3
	   *z ci 
	  
_FBSCclasandresults" PORT ">
_FBSCc">  )IO_SETUP6"> , & ">
	  sg_dma_address3"> ( 3>
	  Ahre  a_s="line" 303me=3036">  rivers/ata/acard-a30ci.csuprd-a0 id="L16" class=ci.csuprd-a0 e=rxd      m iuct  ">
tru
	  
	  pmp6">g_dma_len3esults" camf">sg_dma_len3"> ( 34TEresults" camf">ATA_bquorzSATAGquorz nt"> *z"         f">cH>qc6"YES_FBS cH>qc6"YES_FBS">  )" flagssu> "saresult3="drivers/ata/acard-a24c3.c#L132"" id="L4" class="linresults" camf">Ahre  a_acar1
           ">
	  dev_er=6"> (& ">
	  <3"L15" cla3s="line" 24ame=2456">   3     34=is_rivparesults" camlass="linresults" camf">Ahre  a_a_pTA _Ahre6">  * ">
	  

  16ATA_QCFLAresults" camf">Ahre  a_s="line" 303me=3036">  rivers/ata/acard-a30ci.csuprd-a0 id="L16" class=ci.csuprd-a0 e=rxd      m iuct  ">
tru
	  
	  pmp6">g>
 )[15]z  1
Ahre  a_acarwar29" id="L2" clasacarwar2ame=2566">           ">
	  dev_er=6"> (& ">
	  <3"L9" clas3="line" 24name2496">  173/a>Ahre  a_a_pTA _Ahre6">  * ">
	  
cpu_to_3e3"6"> ( ">
	  cdb_lensu> )z  1
 (3 ">
	           }  1<3 id="L2" 3amf">cpu_to_le3"6"> ( ">3	     1
flagssu> ode=ultt_3aresults" camf">ultt_sa63>  = 35TEresults" camf">ATA_TFLAG_WRITE6"> /atasza href="drivers/atasz
	  d      m iuct  ">
 f">cPORT PRIV_FBS"> - +  ">
	   - + ox.c">
	  pmp6">f="driver3/ata/acard-a25ci.c#L14253 id="35results" camf">ATA_QCFLAG_DMAMAP6"> lts" casza href="driverslts" caszard-d      m iuct  ">
 vs"> -box.c">
	  clak6"> -box.c * 16">
	  pmp6">fL15" cla3="drivers/ata/acard-a25h3i.c#L32"" id="L5" cl1946">                 }  1
cpu_3o_le3"6"> (1 &lx.&lx. 313z  1435ults" camf">ATA_QCFLAG_FAILED6"> )) /atasza href="drivers/atasz
	  d      m iuct  ">
 f">cPORT PRIV_> - +  ">
	   - + ox.c">
	  pmp6">f>
searlt_tfsu> )lts" casza href="driverslts" caszard-d      m iuct  ">
 vs"> -box.c">
	  clak6"> -box.c">
	  pmp6">fclass="c3" 25name2586">         u3mit="359=cdb_lenresults" camf">cdb_lensu> )z  1

 }  1<3a>


cmam_alloe_coher2317 href="drivers/atm_alloe_coher231ame=2566">           ">
	  
	  
 , & ">
	  rta_queued_cmd3">  *362de=sg_lenresass=g_dacsu>  &&m
 , & ">
	  
  &&ENOMEM"line" 303me=30ENOMEMard-a26hci.c#L926" id="L9" class="line" 23
	  qc6">3-box.36_drivresults" camf">Ahre  a_{  1

	 ai.c#L224" id="/atasza href="drivers/atasz
	  _PIO_SETUP6"> , & ">
	   -box.c">
	  rx_fissu> z  1tf6"> . ">
	  3a cod3=protocolresulass="line" 308me=3086">   1
         void * ">
3  /*27hci. itemn>
  17u3"6">3  ">
36       14/*<32 bytes ers/n>
  17cmd_fis_len6">  = 5z  3436l in clasandeslot informaform.ent">/*
Ahre  a_c#L527" id="L5" class="line" 27ame=2756">      a>

m

	  /a>
pmp6"2 id5.2ame=316c = a ">
	  pmp6"2 i1i>
	  1;#L926" id="L9" class="line" 23">cpu_to_3e3 class="l3ne" 27ame=2716">        3 14cdb_lensu> )z  1

          ">
SLOT" 2>
	  /a>
pmp6"2 id5.2ame=316c = a  code=qc mm* Fill in clasanderab 3 info37hc3.c#L236
	  
	 vs="line" 306me=3a6ts" camf"SLOT" 27ame=2756">          ">
SLOT" 2>
	  /a>
pmp6"2 id5.2ame=316c = a a_{  13 17

	 ai.c">
	  pp63> -bo37_PIO_SETUP6"> , & ">
	   -box.c">
	    + 3">
	  tf6"> . ">
	  3a cSeco
 -box.c">
	   ,  ">
	  /*27hci. itemn>
/*<32 bytes ers/n>
p3p6"> 3 1,  ">
	  
m
qc6"> -box.c">
	  Ahacard-a273ci.c#L927" id="L9" class3"line38class="c3">cmd_fis_len6">  = 5z  3436l in clasandeslot informaform.qc idPOrivers/ata/acard-aqc idPOrivass="line" 23ef="drive3="drivers/ata/acard-a27c]. ">
	  /a>
pmp6"2 id5.2ame=316c = aACa_CMD_T3L_CDB6"> ,  ">
	  rx_fissu>  +  ">
	  cdb6"3 ,  ">
	  
devs3> -box.c">
	  cdb_lensu> )z  1ltsdrivers/ata/acard-a27c]. ">
	 vs="line" 306me=3a6c=scc_sre3"drivers/ata/acard-a2hci3c#L1133
	  pmp6"> ">
="drivers3ata/acard-a28hci.c#L428"3id="L3" class="line" , & ">
	   -box.c">
	                   3">
	 38ef="drivers/ata/acard-a24ci.c#L142""* Thir -box.c">
	    + 3ode=rs/at_/aca_fill_sgre3ults"38de=tfresu3ts" camf">tf6"> . ">
	  3a ca
 -box.c">
	  cmd_tblsu>3)z  13/a>
/*<32 bytes ers/n>

	  
m
Ah28hci.c#L32"" id="L8" class="line"32nnam39class="c3">cmd_fis_len6">  = 5z  3436l in clasandeslot informaform.ent"vicacard-a26hci.c#L926" idvicacarass="line" 23ef="drive3="drivers/ata/acard-a27c]. ">
	  /a>
pmp6"2 id5.2ame=316c = a928" id="39" class="line" 28name2836">  39_fisresults" camf">rx_fissu>  +  ">
	    13
	   -box.c">
	  cmd_39a rms TF andent">/*
rx_fi/acard-a3hci.c#L123" id="L12" class="line" 3nid="L3" c3ass="line" 29ame=2936"> 3     39* rms host shoulderaks TF and E_S ".u This27"rd-abe changed lad *acard-a3hci.c#L123" id="L12" class="line" 3ni"drivers3amf">ATA_TFLAG_WRITE6"> 3  1
/*<32 bytes ers/n>
optssu>  |= 3">
	 3  = 5z  3436l in clasandeslot informaform.indr_mas2" camf">fbs_enaindr_mas2ass="line" 23ef="driveDEFf">cpuIRQ" camf">fbs_enaDEFf">cpuIRQ>
	  /a>
pmp6"2 id5.2ame=316c = a9lsu>  + 329" id="L6" class="line"329ame32966">                  ">
	  optssu>  |=  ">
	  <3 code3AACa_CMD_ATAPIresults" camf">Ane" 302me=30"6"> {  1

	  rp6"> -b /a>
pmp6"2 id5.2ame=316c = a98ci.c#L13 
pmp6"2 id5.2ame=316c = 4code=ppre4ults" camf">pp6"> ,  ">
4  
	  gage ">gpp6s, DMAtaini.n class="comment">/*<32 bytes ers/n>
tag6"> ,  ">4	        a> , & ">
	  

 m ".4/  ">
	  b  m iuct  ">
 vs"> -box.c">
	  rs/at_/aca_q4rfill40/atasza href="drivers/atasz
	  ra4a_pTA ptsresults" camf">optssu> )z  1
	  cmd_t* ">
	  
 -box.c">
	  u86">  * ">
	     bo  1
	  
n>

	 c">
	ard-a30ci.c#L1330 id c">
	ard-a> -b /a>
pmp6"2 id5.2ame=316c = 4305i.c#L1430" id="L5" class="line"4305me4066">         if ( ">
	  cHed-a22ci   
	    = 314cHe>  = 314
	  qc6"> -box.4">
	 40esults" camf">cmd_tif ( ">
	  cHed-a22ci  Z33_drivresults" c29" id="L4" clas>>
	  <[]a c{       m iuct  ">
cmap29" id="L4" clas>
	  <"L9" class="line"NUL>           ">
	NUL>6">  }              ">
	  rac* ">
	    =  camf">pp6">  =  ">
	  qc6"> -box.c">
	  
cmapta/acard-a2hc3.c#Lp136"6">n>

	  
	  ACARD_AACa_RX_FIS_SZsu4 z  14106">         if ( ">
	  scc_ssu>  =  143/a>flagssu> a>

	            14<4a>         if ( ">
	  
	   m ".4ul execuform  te
     22cic id="L2" camf">  22cic	  <"L9" class="line"29" id="L4" class	  <"L9" class="line"r3>
	  
	  

	 ai.4 ==  ">
	4   =WARN_ON>
	       TA_MAX_QUEUE code16"> line" 306me=3a6ts" cMAX_CMD 34TEresults" camf">AMAX_CMD __iom
                  ">
	  rta_4f_from_fis6"> ( ">
	  Ad-a2mmmt_    ion_on=  camf">pp6">  =Ad-a2mmmt_    ion_on= NOMEM      m iuct  ">
cmapta/acard-a2hc3.c#Lp136"6">n>

	  
	  
 -box.c">
	  
pmp6"2 id5.2ame=316c = 4ts" camf"4clasandsu>  = ( ">
	  
	   ,source   ">
	  optssu> ;  4ults" cam4">caca_REG6"> ( ">
	        a>

	  rx_f_u>  =  camf">pp6">  =rcimf">rx_f_u>  = NOMEM"line" 303me=30pta/acard-a2hc3.c#Lp136m
RX_F42 ia>

	  rcsu> z  1<3e=scc_sre3u4ts" c42amf">rta_queued_cmd3">  *3629" class="line"r3>
	  
	  
	  pmp6"> ">4	  
	  ">cmtrollsul often implea co SFF27" patiss="literface/acard-a3hci.c#L123" id="L12" class="line" 34drive61">4  1
	  "BARs ju=prors/ase/acard-a3hci.c#L123" id="L12" class="line" 34ders/ata/4.c#L326" id="L3" class="4ine" 42de=tfresu3ts" camf">tf6"> . ">
	  3a ">
	  optssu> ;  4umf">rta_4pTA _Ahreresults" camf">4ac* "42ACa_CMD_ATAPIresults" camf">r3>
	  
	  pp6">  =rcimfiomap_regions_reque43/allNOMEM"line" 303me=30pta/acard-a2hc3.c#Lp136, 1  ">
	  _BAR34TEresults" camf">AP">_BARci.c"L9" class="line"DRV_NAME7ame=2756">    DRV_NAMEm

	  r3>
	  
	  43v_er=s=sulata/acard-a>
	    =  camf">pp6">  =rcimfpin_u>  = NOMEM"line" 303me=30pta/acard-a2hc3.c#Lp136m

	 4

3    *3629" class="line"r3>
	  
	  flagssu> a>
  *33>
	  rcsu> z  1<3u>  +  ">3	  flagssu> a>
         m iuct  ">
codm_kzalloesults" camf">rxcodm_kzalloeame=2566">           ">4	    )flagssu> a>
           ">4	rive61">4; ">
	  sisu> ,  ">
	  <3 code33  )IO_SETUP6"> , & ">
	  4a code=qc4=c_sresul3="drivers/ata/4card-43c6"> -box.c">
	  
tru
	  
	  pmp6">g|= (class="lilong)line" 306me=3a6p29" id="L4" clas>
	  
	    &am4;&ENOMEM"line" 303me=30E4OMEMa43a code=devresults" camf">devs"> -box.c">
4uorz nt">4*);  1<3a>

tru
	  
	  pmp6">g_dma_len3esults" camf">sg_dma_leNO_MSi.c#L529" id="L5" cladma_leNO_MSi>
           ">4  )"> . "4
	  rx_f_ms29" id="L4" clas>e=s">rx_f_ms2NOMEM"line" 303me=30pta/acard-a2hc3.c#Lp136m

44_fisresults" camf">rx_fissu>  +  ">
	          4 sd-a441

tru
	  
	  rddr6">  &u> "line" 233ame2396">  17rcimfiomap_ href camf">pp6">  =rcimfiomap_ hrefc MEM"line" 303me=30pta/acard-a2hc3.c#Lp136mci.c#L1425" id="ts" cP">_BAR34TEresults" camf">AP">_BARci.c               ">
	   *z 4i   rivers/ata/acard-430ci.4suprd-a0 id="L , & ">
	  cmfiga ">
	  optssu> ;  4code=cdbr4sults" ca.c#L163" id="L14" cla4s="line" 3name
	  cmfig" camf">scc_ssu>  = sava_oritial_>cmfigNOMEM      m iuct  ">
cmapta/acard-a2hc3.c#Lp136"6">n>

	  
tru
	  
4>           ">
	  n_elem6">  = 4_rivpares4lts" camlass="linresults4 camf44amf">rs/at_/aca_fill_sg6"> ( ">
	  
	  optssu> ;  4csu>  &am4036">  rivers/ata/acard-430ci.44mf">qc6"> -box.c">
	    check FBS capabilityn.
fbs_enaid=3L8" cNCQ>
           ">4 
	  pmp6">g>

	  pmp6">g|= line" 306me=3a6tTA_ma_leNCQ" camf">fbs_enatTA_ma_leNCQrivers/ath
	             ">
	  pmp6">fclass="c3"4lass="com4mmmmmmm lass="linresults4 camf45ers/ata/acard"dri
  check FBS capabilityn.

           ">4cd-a3na>
4a href="drivsd-a3no" 266426hci45mia>

	  pmp6">g|= line" 306me=3a6tTA_ma_lePMid="L9" class="ltTA_ma_lePMirivers/ath
	    = set_em_messageFIS_PIO_SETUPresu  = set_em_messageFc MEM"line" 303me=30  m iuct  ">
tru
	  
cmap29" id="L4" clas>
	  
 4atasza href="drivers/ata4z
	  45hci.c#L9m

	 ai.4AMAP6"> l4s" casza href="driverslt4" cas4ard-d      m ica_fill_sg6"> ( ">
	  rx_fiss	  optssu> ;  4" camf">c4ak6"> -box.c * 16">
	  <4 code45de=tfresu3ts" camf">tf6"> . ">
	  3a c22ci, at othera imes,l" ats="l" 3n_sgt possiss="22ci, soss	  optssu> ;  4"su>  &am46"> )) /atasza href="dri4ers/a45m*hci.c -note:ent">/*27hci. itemn>
optssu> ;  4" )lts" casza href="driv4rslts45camf">u3"6">3  ">
36       14clak6"> -box.c2 *362de=sg_lenresass=g_dacsu>  &&md/g_lenpresucc_sresul3s2ame=2566">        1m_alle=rs/atr016">g_2c22ci, a
0  = set1"45-nrr016">g_2c22ci, a
0id="L9" clas>  = set_em_messageFIS_PIO_SETUPresu camf45ers/ata/acard"dri
id="L9" clas>  = set_em_messageFIS_PIO_SETUPresu camf45ers/ata/acard""driv4rsline" 303me=30  driv4rsa_len3  ">
tru
	  
	  pmp6"2 id5.2ame=316c = a ">
	  cHed-a22ci4a> -box.4">
	 40esults =ppresuccsava_oritial_>cmfig" camf">scc_ssu>  = sava_oritial_>cmfigNOMEM      m iuct  ">
cmapta/acard-a2hc3.c#Lp13e=ppred-a22cig_2c22ci, a
0
tru
	  
 , &         ">4	  qc6">4-box.46results" camf">ATA_TF ">4	rive61">4; ">
	  sisu> ,  ">
	  <3 code33
<46href="drimacard-">
	 ai.4 == a>
 {  1ata/acHed-a22cppresucc_sresul3s" camf">scc_ssu>  =  143/a> 46"L13" classd-a3mmia>
   4
optsox.c">
4uorz nt">4*);  1<3a>
  check FBS capabSSityn.
g_2c22ci, a
06" ca/acard-a3hci.c#L1L823" id=3L8" cPMid=
erarequir20 macory: 32-drivea hre4="dri46eame=2566">           ">4 

	  

	   scc_ssu>  =  143/a>
36    4  144*<32 bytes ersine" 303me=3036">  rivers/ata/acard-a30c4#L1name2646"3         unsigned int4 "3
	47"L13" classd-a3mmia>
  =a_CMDCid="L9" clas>  = setcamf_INF-a3hci.c#L143" icamf_INF-L13" mmm41hc3.c#L236
	  uVPRINTK>
	  
	  /a>
4a pkm4">pmp6"2 id5.2ame=316c = a ">
	  p4p6"2 i1i>
	  1;#L926" id4"L9" 4lass="line" 23">
	L9" clas>  = set" 26name2686">     22aca0me=2317">  check " 26name2686">     22a_reque43/allNOMEM"li a>
g_2c22ci, a
0  check " 26name2686">     22++	      4     ">
SLOT" 2>
	  /a>
4a pkm47f">cpu_to_le3"6"> ( "ssu> )z  1scc_ssu>  = 314sg6"> );  1<3aca_p f">cHed-a22cpa>
g_2c22ci, a
0     22136mci.c#L1425" id="ts" cP">_BAR34T756">    4     ">
SLOT" 2>
	  /a>
4a pkm4">pmp6"2 id5.2ame=316c = a a_{  13 17
<47eame=2566">            1  = set1s" camf">sg6"> );  1<3card-a2hc3.c#Lp13ne" 303me=30pta/acard-a2hc3.c#Lp136, 1  "-1omus34arlt_tfresults" camf"_FabarPRINTK>
	   47&
  = set1s" camf">sg6"> );  1<3card-a2hc3.c#Lp13ne" 303me=30pta/acard-a2hc3.c#Lp136, 1  ode=rcVPRINTKNOMEM" class="c3m mmmmmmr086">   4ox.d-0" careac d="driver4p6"> 47  1435ults" camf">ATAAAAAAAAAAAAAAAAAAAA0x100 class="line" 24am
	  
	  47"L13" classd-a3mmia>
 -boxe=rpame2646"3         unsigned int4 "3
	48eame=2566">           
	  /a>
4a pkm48"L13" classd-a3mmia>
<  ">
	    13 ,  ">
	4 rx_L12" class="line" 34=clakresu4ttttttttaplata/pm_s/lic0E= NOT_AVAILABLE;class="line" 29ame=2903">  13 pkmf">p4/ata/acard-a2hci3c#L11334/a>
	      4/ata/acard-a2hci3c#L11334/a>cpu_to_le3"6"> ( ">/not-3lts42 clef="dricNOMEMard-a26hci.c#L926" id="L9" class="line" 4r56">    4 href="3river38">
	  ATA_TFoptsox.c">
4uorz nt">4*);  1<3a>
     22)n3esults" camf">sg_dma_leNO_MSi.c#L529", & "4
	   48
g_2c22ci, a
0 1<3acasuccsava_oritial_>cm3ultdummyts" c_op>g_2c22ci, a
0scc_ssu>  =  143/a> 48&
 classd-a3mmia>
 m ".4/  ">
	 ts  void 4-gathera hrefc d="driver4p6"> 48rd      m iuct  ">
	    &am4;&ENOMEvers/ata/4card-a28hci.n class="com4ent">4*<32 bytes ers/Ah28h">rta_4pTA _Ahreresults" camf">4ac* "42ACL4" clas>
	a codeureci.c 34g_2c22ci, a
0
	a codeureci.c 34ne" 233ame2396">  17rcimfiomap_ href camf">pp6"card-a2hc3.c#Lp136"6">n>

	    check FBS capabmp;&m


	  /a>
4a pkm49"L13" classd-a3mmia>

	 4
  39_fisresul4s" ca49FP_KERNEL_FIS_PIO_SETUP64">
3    *3629" class=, & "4
	   49rd      m iuct  ">
	  rx_fi/acard-a3hci4c#L1249vers/atasz
	  rta_4pTA _Ahreresults" camf">4ac* "42ACLs>
	rea26hSS_STORAGEg_2c22ci, a
0  = set_	  
    4changed lad *acard-a3hci4c#L1249eame=2566">      ia>

	 4
49eame=2566">           ">4	ri3    *3629" class=,ommmm" i4enaDEFf">cpuIRQ>
	  /a>
4a pkm4">pmp6"2 id5.2ame=316c = a9lsu>  + 329" id4"L6" clas4="line"329ame32966">    4     4       ">
	    = set_	  
rp6"> -b /a>
4a pkm49<32 bytes ers/n>

	 >
	 _CMD_ode=pdevs=p29" id="L4" clas>
	 >
	 _CMD_ode=id="L9" clas>  = set_	  

5a pkm50rd      m iuct  ">
	   5age ">gpp5s, DMAtaini.n class="com5ent">50<370drivresults" camf">Ahre  45-a26h34  17rcimfiomap_ href camf">pp6"a3mia>
gpp5sname2836">  39_fisresul5330 i50FP_KERNEL_FIS/n>
 { -box.4">
	 40esults { id="L9" clas>  = set_	  scc_ssu>  = sava_oritial_>cmfigNOMEMirq 26name2686">   rq6" ccard-a2hc3.c#Lp131"45-es39a rmsg_2c22ci, a
0  34ts" camf">rIRQF_SHARE>, 1  ode=rcVPRINTKNOMEM" class="c3m mmmmm5 b  m i5ct  "50">n_elem6"3 ,  "3
	  cm34" clas>
	shsg_2c22ci, a
0
	shspp6"a3mia>
rx_fi/acard-a3hci5ef="d5ivers/ classd-a3mmia>
 m ".4/  ">
	5evs=L9" c5ass="line" 2<3a>
pmp6"2 id5.2ame=316c = a a_{  1
	  3riverslts"4casodule	 >
	e=316c"drivers/ata/a  odule	 >
	e=316cid="L9" clas>  = set14" clas>
	 >
	e=316c"drivers/ata/a 14" clas>
	 >
	e=316cpp6"a3mia>
cpuIRQ>
	  /a>
5a pkm50>pmp6"2 id5.2ame=316c = a9lsu>  + 329" id5s="line" 58ame=2bo  1
	9" clas>  = setMODULE_AUTHO0pta/acard-a2hc3MODULE_AUTHO0id="L9s34arlt_tfresults" camf"_FJeff GarzikPRINTK>
	  
	NUL>6">  }     5     5  ">
	9" clas>  = setMODULE_DESCRIPT>n>

	 MODULE_DESCRIPT>n>id="L9s34arlt_tfresults" camf"_FACs="CI_CLASATA low-level NTKNOMPRINTK>
	  
	  9" clas>  = setMODULE_LICENSts" cP">_BAR34TEMODULE_LICENStid="L9s34arlt_tfresults" camf"_FGPLPRINTK>
	  gpp5amf">flagssu> a>
9" clas>  = setMODULE_DEVICE_TABLE

	 MODULE_DEVICE_TABLEne" 233ame2396">  17rcotocolsers4amp_s4pr6" ccard-a2hc3.c#Lp1314" clas>
	 >
	  
	 >
	  
9" clas>  = setMODULE_>"6">n>

	 MODULE_>"6">n>ne" 233ame2396">  176"6">n>

	  5"line"r3>5	  
The original LXR softwmlasby hrefhhci.c"L9http:// ( "> forge.net/projects/lxEg>LXR " 30usuly6" ccat"linexperi03meal ATAPIresby hhci.c"L9mailto:lxE@rcrux.no">lxE@rcrux.no6" c. lxE.rcrux.no kindlyss="ledsby hhci.c"L9http://www.redpill-rcrpro.no">Redpill Lcrpro AS6" ccaprovidere45dLcruxde=qcult*27hcnd operat cod serata/siverce 1995.