Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
aic94xx.h File Reference
#include <linux/slab.h>
#include <linux/ctype.h>
#include <scsi/libsas.h>

Go to the source code of this file.

Macros

#define ASD_DRIVER_NAME   "aic94xx"
 
#define ASD_DRIVER_DESCRIPTION   "Adaptec aic94xx SAS/SATA driver"
 
#define asd_printk(fmt,...)   printk(KERN_NOTICE ASD_DRIVER_NAME ": " fmt, ## __VA_ARGS__)
 
#define ENTER
 
#define EXIT
 
#define ASD_DPRINTK(fmt,...)
 
#define AIC94XX_SCB_TIMEOUT   (5*HZ)
 

Functions

int asd_read_ocm (struct asd_ha_struct *asd_ha)
 
int asd_read_flash (struct asd_ha_struct *asd_ha)
 
int asd_dev_found (struct domain_device *dev)
 
void asd_dev_gone (struct domain_device *dev)
 
void asd_invalidate_edb (struct asd_ascb *ascb, int edb_id)
 
int asd_execute_task (struct sas_task *, int num, gfp_t gfp_flags)
 
void asd_set_dmamode (struct domain_device *dev)
 
int asd_abort_task (struct sas_task *)
 
int asd_abort_task_set (struct domain_device *, u8 *lun)
 
int asd_clear_aca (struct domain_device *, u8 *lun)
 
int asd_clear_task_set (struct domain_device *, u8 *lun)
 
int asd_lu_reset (struct domain_device *, u8 *lun)
 
int asd_I_T_nexus_reset (struct domain_device *dev)
 
int asd_query_task (struct sas_task *)
 
int asd_clear_nexus_port (struct asd_sas_port *port)
 
int asd_clear_nexus_ha (struct sas_ha_struct *sas_ha)
 
int asd_control_phy (struct asd_sas_phy *phy, enum phy_func func, void *arg)
 

Variables

struct kmem_cacheasd_dma_token_cache
 
struct kmem_cacheasd_ascb_cache
 

Macro Definition Documentation

#define AIC94XX_SCB_TIMEOUT   (5*HZ)

Definition at line 57 of file aic94xx.h.

#define ASD_DPRINTK (   fmt,
  ... 
)

Definition at line 53 of file aic94xx.h.

#define ASD_DRIVER_DESCRIPTION   "Adaptec aic94xx SAS/SATA driver"

Definition at line 36 of file aic94xx.h.

#define ASD_DRIVER_NAME   "aic94xx"

Definition at line 35 of file aic94xx.h.

#define asd_printk (   fmt,
  ... 
)    printk(KERN_NOTICE ASD_DRIVER_NAME ": " fmt, ## __VA_ARGS__)

Definition at line 38 of file aic94xx.h.

#define ENTER

Definition at line 46 of file aic94xx.h.

#define EXIT

Definition at line 47 of file aic94xx.h.

Function Documentation

int asd_abort_task ( struct sas_task task)

asd_abort_task – ABORT TASK TMF : the task to be aborted

Before calling ABORT TASK the task state flags should be ORed with SAS_TASK_STATE_ABORTED (unless SAS_TASK_STATE_DONE is set) under the task_state_lock IRQ spinlock, then ABORT TASK must be called.

Implements the ABORT TASK TMF, I_T_L_Q nexus. Returns: SAS TMF responses (see sas_task.h), -ENOMEM, -SAS_QUEUE_FULL.

When ABORT TASK returns, the caller of ABORT TASK checks first the task->task_state_flags, and then the return value of ABORT TASK.

If the task has task state bit SAS_TASK_STATE_DONE set, then the task was completed successfully prior to it being aborted. The caller of ABORT TASK has responsibility to call task->task_done() xor free the task, depending on their framework. The return code is TMF_RESP_FUNC_FAILED in this case.

Else the SAS_TASK_STATE_DONE bit is not set, If the return code is TMF_RESP_FUNC_COMPLETE, then the task was aborted successfully. The caller of ABORT TASK has responsibility to call task->task_done() to finish the task, xor free the task depending on their framework. else the ABORT TASK returned some kind of error. The task was not cancelled. Nothing can be assumed. The caller of ABORT TASK may wish to retry.

Definition at line 405 of file aic94xx_tmf.c.

int asd_abort_task_set ( struct domain_device ,
u8 lun 
)

Definition at line 657 of file aic94xx_tmf.c.

int asd_clear_aca ( struct domain_device ,
u8 lun 
)

Definition at line 666 of file aic94xx_tmf.c.

int asd_clear_nexus_ha ( struct sas_ha_struct sas_ha)

Definition at line 134 of file aic94xx_tmf.c.

int asd_clear_nexus_port ( struct asd_sas_port port)

Definition at line 143 of file aic94xx_tmf.c.

int asd_clear_task_set ( struct domain_device ,
u8 lun 
)

Definition at line 675 of file aic94xx_tmf.c.

int asd_control_phy ( struct asd_sas_phy phy,
enum phy_func  func,
void arg 
)

Definition at line 899 of file aic94xx_scb.c.

int asd_dev_found ( struct domain_device dev)

Definition at line 323 of file aic94xx_dev.c.

void asd_dev_gone ( struct domain_device dev)

Definition at line 348 of file aic94xx_dev.c.

int asd_execute_task ( struct sas_task ,
int  num,
gfp_t  gfp_flags 
)

Definition at line 545 of file aic94xx_task.c.

int asd_I_T_nexus_reset ( struct domain_device dev)

Definition at line 181 of file aic94xx_tmf.c.

void asd_invalidate_edb ( struct asd_ascb ascb,
int  edb_id 
)

asd_invalidate_edb – invalidate an EDB and if necessary post the ESCB : pointer to Empty SCB : index [0,6] to the empty data buffer which is to be invalidated

After an EDB has been invalidated, if all EDBs in this ESCB have been invalidated, the ESCB is posted back to the sequencer. Context is tasklet/IRQ.

Definition at line 382 of file aic94xx_scb.c.

int asd_lu_reset ( struct domain_device ,
u8 lun 
)

Definition at line 684 of file aic94xx_tmf.c.

int asd_query_task ( struct sas_task task)

asd_query_task – send a QUERY TASK TMF to an I_T_L_Q nexus task: pointer to sas_task struct of interest

Returns: TMF_RESP_FUNC_COMPLETE if the task is not in the task set, or TMF_RESP_FUNC_SUCC if the task is in the task set.

Normally the management layer sets the task to aborted state, and then calls query task and then abort task.

Definition at line 703 of file aic94xx_tmf.c.

int asd_read_flash ( struct asd_ha_struct asd_ha)

asd_read_flash - read flash memory : pointer to the host adapter structure

Definition at line 1047 of file aic94xx_sds.c.

int asd_read_ocm ( struct asd_ha_struct asd_ha)

asd_read_ocm - read on chip memory (OCM) : pointer to the host adapter structure

Definition at line 354 of file aic94xx_sds.c.

void asd_set_dmamode ( struct domain_device dev)

Definition at line 112 of file aic94xx_dev.c.

Variable Documentation

struct kmem_cache* asd_ascb_cache

Definition at line 638 of file aic94xx_init.c.

struct kmem_cache* asd_dma_token_cache

Definition at line 637 of file aic94xx_init.c.