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

Go to the source code of this file.

Macros

#define DEV_IS_GONE(pm8001_dev)   ((!pm8001_dev || (pm8001_dev->dev_type == NO_DEVICE)))
 
#define PM8001_TASK_TIMEOUT   20
 

Functions

int pm8001_tag_alloc (struct pm8001_hba_info *pm8001_ha, u32 *tag_out)
 
void pm8001_tag_init (struct pm8001_hba_info *pm8001_ha)
 
int pm8001_mem_alloc (struct pci_dev *pdev, void **virt_addr, dma_addr_t *pphys_addr, u32 *pphys_addr_hi, u32 *pphys_addr_lo, u32 mem_size, u32 align)
 
int pm8001_phy_control (struct asd_sas_phy *sas_phy, enum phy_func func, void *funcdata)
 
void pm8001_scan_start (struct Scsi_Host *shost)
 
int pm8001_scan_finished (struct Scsi_Host *shost, unsigned long time)
 
u32 pm8001_get_ncq_tag (struct sas_task *task, u32 *tag)
 
int pm8001_queue_command (struct sas_task *task, const int num, gfp_t gfp_flags)
 
void pm8001_ccb_free (struct pm8001_hba_info *pm8001_ha, u32 ccb_idx)
 
void pm8001_ccb_task_free (struct pm8001_hba_info *pm8001_ha, struct sas_task *task, struct pm8001_ccb_info *ccb, u32 ccb_idx)
 
struct pm8001_devicepm8001_alloc_dev (struct pm8001_hba_info *pm8001_ha)
 
int pm8001_dev_found (struct domain_device *dev)
 
void pm8001_dev_gone (struct domain_device *dev)
 
void pm8001_open_reject_retry (struct pm8001_hba_info *pm8001_ha, struct sas_task *task_to_close, struct pm8001_device *device_to_close)
 
int pm8001_I_T_nexus_reset (struct domain_device *dev)
 
int pm8001_lu_reset (struct domain_device *dev, u8 *lun)
 
int pm8001_query_task (struct sas_task *task)
 
int pm8001_abort_task (struct sas_task *task)
 
int pm8001_abort_task_set (struct domain_device *dev, u8 *lun)
 
int pm8001_clear_aca (struct domain_device *dev, u8 *lun)
 
int pm8001_clear_task_set (struct domain_device *dev, u8 *lun)
 

Macro Definition Documentation

#define DEV_IS_GONE (   pm8001_dev)    ((!pm8001_dev || (pm8001_dev->dev_type == NO_DEVICE)))

pm8001_task_exec - queue the task(ssp, smp && ata) to the hardware. : the task to be execute. : if can_queue great than 1, the task can be queued up. for SMP task, we always execute one one time. : gfp_flags. : if it is task management task. : the task management IU

Definition at line 354 of file pm8001_sas.c.

#define PM8001_TASK_TIMEOUT   20

Definition at line 666 of file pm8001_sas.c.

Function Documentation

int pm8001_abort_task ( struct sas_task task)

Definition at line 1075 of file pm8001_sas.c.

int pm8001_abort_task_set ( struct domain_device dev,
u8 lun 
)

Definition at line 1151 of file pm8001_sas.c.

struct pm8001_device* pm8001_alloc_dev ( struct pm8001_hba_info pm8001_ha)
read

pm8001_alloc_dev - find a empty pm8001_device : our hba card information

Definition at line 547 of file pm8001_sas.c.

void pm8001_ccb_free ( struct pm8001_hba_info pm8001_ha,
u32  ccb_idx 
)

Definition at line 499 of file pm8001_sas.c.

void pm8001_ccb_task_free ( struct pm8001_hba_info pm8001_ha,
struct sas_task task,
struct pm8001_ccb_info ccb,
u32  ccb_idx 
)

pm8001_ccb_task_free - free the sg for ssp and smp command, free the ccb. : our hba card information : the ccb which attached to ssp task : the task to be free. : ccb index.

Definition at line 511 of file pm8001_sas.c.

int pm8001_clear_aca ( struct domain_device dev,
u8 lun 
)

Definition at line 1161 of file pm8001_sas.c.

int pm8001_clear_task_set ( struct domain_device dev,
u8 lun 
)

Definition at line 1172 of file pm8001_sas.c.

int pm8001_dev_found ( struct domain_device dev)

Definition at line 646 of file pm8001_sas.c.

void pm8001_dev_gone ( struct domain_device dev)

Definition at line 867 of file pm8001_sas.c.

u32 pm8001_get_ncq_tag ( struct sas_task task,
u32 tag 
)

Definition at line 281 of file pm8001_sas.c.

int pm8001_I_T_nexus_reset ( struct domain_device dev)

Standard mandates link reset for ATA (type 0) and hard reset for SSP (type 1) , only for RECOVERY

Definition at line 959 of file pm8001_sas.c.

int pm8001_lu_reset ( struct domain_device dev,
u8 lun 
)

Definition at line 999 of file pm8001_sas.c.

int pm8001_mem_alloc ( struct pci_dev pdev,
void **  virt_addr,
dma_addr_t pphys_addr,
u32 pphys_addr_hi,
u32 pphys_addr_lo,
u32  mem_size,
u32  align 
)

pm8001_mem_alloc - allocate memory for pm8001. : pci device. : the allocated virtual address : the physical address high byte address. : the physical address low byte address. : memory size.

Definition at line 116 of file pm8001_sas.c.

void pm8001_open_reject_retry ( struct pm8001_hba_info pm8001_ha,
struct sas_task task_to_close,
struct pm8001_device device_to_close 
)

Definition at line 885 of file pm8001_sas.c.

int pm8001_phy_control ( struct asd_sas_phy sas_phy,
enum phy_func  func,
void funcdata 
)

pm8001_phy_control - this function should be registered to sas_domain_function_template to provide libsas used, note: this is just control the HBA phy rather than other expander phy if you want control other phy, you should use SMP command. : which phy in HBA phys. : the operation. : always NULL.

Definition at line 162 of file pm8001_sas.c.

int pm8001_query_task ( struct sas_task task)

Definition at line 1025 of file pm8001_sas.c.

int pm8001_queue_command ( struct sas_task task,
const int  num,
gfp_t  gfp_flags 
)

pm8001_queue_command - register for upper layer used, all IO commands sent to HBA are from this interface. : the task to be execute. : if can_queue great than 1, the task can be queued up. for SMP task, we always execute one one time : gfp_flags

Definition at line 493 of file pm8001_sas.c.

int pm8001_scan_finished ( struct Scsi_Host shost,
unsigned long  time 
)

Definition at line 257 of file pm8001_sas.c.

void pm8001_scan_start ( struct Scsi_Host shost)

pm8001_scan_start - we should enable all HBA phys by sending the phy_start command to HBA. : the scsi host data.

Definition at line 246 of file pm8001_sas.c.

int pm8001_tag_alloc ( struct pm8001_hba_info pm8001_ha,
u32 tag_out 
)
inline

pm8001_tag_alloc - allocate a empty tag for task used. : our hba struct : the found empty tag .

Definition at line 87 of file pm8001_sas.c.

void pm8001_tag_init ( struct pm8001_hba_info pm8001_ha)

Definition at line 101 of file pm8001_sas.c.