Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
libahci.c File Reference
#include <linux/kernel.h>
#include <linux/gfp.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
#include <linux/libata.h>
#include "ahci.h"
#include "libata.h"

Go to the source code of this file.

Functions

 EXPORT_SYMBOL_GPL (ahci_ignore_sss)
 
 module_param_named (skip_host_reset, ahci_skip_host_reset, int, 0444)
 
 MODULE_PARM_DESC (skip_host_reset,"skip global host reset (0=don't skip, 1=skip)")
 
 module_param_named (ignore_sss, ahci_ignore_sss, int, 0444)
 
 MODULE_PARM_DESC (ignore_sss,"Ignore staggered spinup flag (0=don't ignore, 1=ignore)")
 
 EXPORT_SYMBOL_GPL (ahci_shost_attrs)
 
 EXPORT_SYMBOL_GPL (ahci_sdev_attrs)
 
 EXPORT_SYMBOL_GPL (ahci_ops)
 
 EXPORT_SYMBOL_GPL (ahci_pmp_retry_srst_ops)
 
 EXPORT_SYMBOL_GPL (ahci_em_messages)
 
 module_param (ahci_em_messages, int, 0444)
 
 MODULE_PARM_DESC (ahci_em_messages,"AHCI Enclosure Management Message control (0 = off, 1 = on)")
 
 module_param (devslp_idle_timeout, int, 0644)
 
 MODULE_PARM_DESC (devslp_idle_timeout,"device sleep idle timeout")
 
void ahci_save_initial_config (struct device *dev, struct ahci_host_priv *hpriv, unsigned int force_port_map, unsigned int mask_port_map)
 
 EXPORT_SYMBOL_GPL (ahci_save_initial_config)
 
void ahci_start_engine (struct ata_port *ap)
 
 EXPORT_SYMBOL_GPL (ahci_start_engine)
 
int ahci_stop_engine (struct ata_port *ap)
 
 EXPORT_SYMBOL_GPL (ahci_stop_engine)
 
int ahci_reset_controller (struct ata_host *host)
 
 EXPORT_SYMBOL_GPL (ahci_reset_controller)
 
int ahci_reset_em (struct ata_host *host)
 
 EXPORT_SYMBOL_GPL (ahci_reset_em)
 
void ahci_init_controller (struct ata_host *host)
 
 EXPORT_SYMBOL_GPL (ahci_init_controller)
 
unsigned int ahci_dev_classify (struct ata_port *ap)
 
 EXPORT_SYMBOL_GPL (ahci_dev_classify)
 
void ahci_fill_cmd_slot (struct ahci_port_priv *pp, unsigned int tag, u32 opts)
 
 EXPORT_SYMBOL_GPL (ahci_fill_cmd_slot)
 
int ahci_kick_engine (struct ata_port *ap)
 
 EXPORT_SYMBOL_GPL (ahci_kick_engine)
 
int ahci_do_softreset (struct ata_link *link, unsigned int *class, int pmp, unsigned long deadline, int(*check_ready)(struct ata_link *link))
 
int ahci_check_ready (struct ata_link *link)
 
 EXPORT_SYMBOL_GPL (ahci_check_ready)
 
 EXPORT_SYMBOL_GPL (ahci_do_softreset)
 
irqreturn_t ahci_interrupt (int irq, void *dev_instance)
 
 EXPORT_SYMBOL_GPL (ahci_interrupt)
 
int ahci_port_resume (struct ata_port *ap)
 
 EXPORT_SYMBOL_GPL (ahci_port_resume)
 
void ahci_print_info (struct ata_host *host, const char *scc_s)
 
 EXPORT_SYMBOL_GPL (ahci_print_info)
 
void ahci_set_em_messages (struct ahci_host_priv *hpriv, struct ata_port_info *pi)
 
 EXPORT_SYMBOL_GPL (ahci_set_em_messages)
 
 MODULE_AUTHOR ("Jeff Garzik")
 
 MODULE_DESCRIPTION ("Common AHCI SATA low-level routines")
 
 MODULE_LICENSE ("GPL")
 

Variables

int ahci_ignore_sss
 
struct device_attributeahci_shost_attrs []
 
struct device_attributeahci_sdev_attrs []
 
struct ata_port_operations ahci_ops
 
struct ata_port_operations ahci_pmp_retry_srst_ops
 
int ahci_em_messages = 1
 
int devslp_idle_timeout = 1000
 

Function Documentation

int ahci_check_ready ( struct ata_link link)

Definition at line 1329 of file libahci.c.

unsigned int ahci_dev_classify ( struct ata_port ap)

Definition at line 1158 of file libahci.c.

int ahci_do_softreset ( struct ata_link link,
unsigned int class,
int  pmp,
unsigned long  deadline,
int(*)(struct ata_link *link check_ready 
)

Definition at line 1263 of file libahci.c.

void ahci_fill_cmd_slot ( struct ahci_port_priv pp,
unsigned int  tag,
u32  opts 
)

Definition at line 1174 of file libahci.c.

void ahci_init_controller ( struct ata_host host)

Definition at line 1121 of file libahci.c.

irqreturn_t ahci_interrupt ( int  irq,
void dev_instance 
)

Definition at line 1746 of file libahci.c.

int ahci_kick_engine ( struct ata_port ap)

Definition at line 1188 of file libahci.c.

int ahci_port_resume ( struct ata_port ap)

Definition at line 2094 of file libahci.c.

void ahci_print_info ( struct ata_host host,
const char scc_s 
)

Definition at line 2216 of file libahci.c.

int ahci_reset_controller ( struct ata_host host)

Definition at line 815 of file libahci.c.

int ahci_reset_em ( struct ata_host host)

Definition at line 936 of file libahci.c.

void ahci_save_initial_config ( struct device dev,
struct ahci_host_priv hpriv,
unsigned int  force_port_map,
unsigned int  mask_port_map 
)

ahci_save_initial_config - Save and fixup initial config values : target AHCI device : host private area to store config values : force port map to a specified value : mask out particular bits from port map

Some registers containing configuration info might be setup by BIOS and might be cleared on reset. This function saves the initial values of those registers into such that they can be restored after controller reset.

If inconsistent, config values are fixed up by this function.

LOCKING: None.

Definition at line 399 of file libahci.c.

void ahci_set_em_messages ( struct ahci_host_priv hpriv,
struct ata_port_info pi 
)

Definition at line 2289 of file libahci.c.

void ahci_start_engine ( struct ata_port ap)

Definition at line 567 of file libahci.c.

int ahci_stop_engine ( struct ata_port ap)

Definition at line 580 of file libahci.c.

EXPORT_SYMBOL_GPL ( ahci_ignore_sss  )
EXPORT_SYMBOL_GPL ( ahci_shost_attrs  )
EXPORT_SYMBOL_GPL ( ahci_sdev_attrs  )
EXPORT_SYMBOL_GPL ( ahci_ops  )
EXPORT_SYMBOL_GPL ( ahci_pmp_retry_srst_ops  )
EXPORT_SYMBOL_GPL ( ahci_em_messages  )
EXPORT_SYMBOL_GPL ( ahci_save_initial_config  )
EXPORT_SYMBOL_GPL ( ahci_start_engine  )
EXPORT_SYMBOL_GPL ( ahci_stop_engine  )
EXPORT_SYMBOL_GPL ( ahci_reset_controller  )
EXPORT_SYMBOL_GPL ( ahci_reset_em  )
EXPORT_SYMBOL_GPL ( ahci_init_controller  )
EXPORT_SYMBOL_GPL ( ahci_dev_classify  )
EXPORT_SYMBOL_GPL ( ahci_fill_cmd_slot  )
EXPORT_SYMBOL_GPL ( ahci_kick_engine  )
EXPORT_SYMBOL_GPL ( ahci_check_ready  )
EXPORT_SYMBOL_GPL ( ahci_do_softreset  )
EXPORT_SYMBOL_GPL ( ahci_interrupt  )
EXPORT_SYMBOL_GPL ( ahci_port_resume  )
EXPORT_SYMBOL_GPL ( ahci_print_info  )
EXPORT_SYMBOL_GPL ( ahci_set_em_messages  )
MODULE_AUTHOR ( "Jeff Garzik"  )
MODULE_DESCRIPTION ( "Common AHCI SATA low-level routines )
MODULE_LICENSE ( "GPL"  )
module_param ( ahci_em_messages  ,
int  ,
0444   
)
module_param ( devslp_idle_timeout  ,
int  ,
0644   
)
module_param_named ( skip_host_reset  ,
ahci_skip_host_reset  ,
int  ,
0444   
)
module_param_named ( ignore_sss  ,
ahci_ignore_sss  ,
int  ,
0444   
)
MODULE_PARM_DESC ( skip_host_reset  ,
"skip global host reset (0=don't skip, 1=skip)"   
)
MODULE_PARM_DESC ( ignore_sss  ,
"Ignore staggered spinup flag (0=don't ignore, 1=ignore)"   
)
MODULE_PARM_DESC ( ahci_em_messages  ,
"AHCI Enclosure Management Message control (0 = off, 1 = on)"   
)
MODULE_PARM_DESC ( devslp_idle_timeout  ,
"device sleep idle timeout  
)

Variable Documentation

int ahci_em_messages = 1

Definition at line 191 of file libahci.c.

int ahci_ignore_sss

Definition at line 51 of file libahci.c.

Definition at line 148 of file libahci.c.

struct ata_port_operations ahci_pmp_retry_srst_ops
Initial value:
= {
.inherits = &ahci_ops,
.softreset = ahci_pmp_retry_softreset,
}

Definition at line 185 of file libahci.c.

struct device_attribute* ahci_sdev_attrs[]
Initial value:

Definition at line 141 of file libahci.c.

struct device_attribute* ahci_shost_attrs[]
Initial value:
= {
&dev_attr_ahci_host_caps,
&dev_attr_ahci_host_cap2,
&dev_attr_ahci_host_version,
&dev_attr_ahci_port_cmd,
&dev_attr_em_buffer,
&dev_attr_em_message_supported,
}

Definition at line 127 of file libahci.c.

int devslp_idle_timeout = 1000

Definition at line 198 of file libahci.c.