Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
lpfc_vport.h File Reference

Go to the source code of this file.

Data Structures

struct  vport_info
 
struct  vport_data
 
struct  vport_cmd_tag
 

Macros

#define VPORT_API_VERSION_1   0x01
 
#define VPORT_TYPE_PHYSICAL   0
 
#define VPORT_TYPE_VIRTUAL   1
 
#define VPORT_STATE_OFFLINE   0
 
#define VPORT_STATE_ACTIVE   1
 
#define VPORT_STATE_FAILED   2
 
#define VPORT_FAIL_UNKNOWN   0
 
#define VPORT_FAIL_LINKDOWN   1
 
#define VPORT_FAIL_FAB_UNSUPPORTED   2
 
#define VPORT_FAIL_FAB_NORESOURCES   3
 
#define VPORT_FAIL_FAB_LOGOUT   4
 
#define VPORT_FAIL_ADAP_NORESOURCES   5
 
#define VPORT_CNT_INVALID   0xFFFFFFFF
 
#define VPORT_OPT_AUTORETRY   0x01
 
#define VPORT_OK   0
 
#define VPORT_ERROR   -1
 
#define VPORT_INVAL   -2
 
#define VPORT_NOMEM   -3
 
#define VPORT_NORESOURCES   -4
 
#define DID_VPORT_ERROR   0x0f
 
#define VPORT_INFO   0x1
 
#define VPORT_CREATE   0x2
 
#define VPORT_DELETE   0x4
 

Functions

int lpfc_vport_create (struct fc_vport *, bool)
 
int lpfc_vport_delete (struct fc_vport *)
 
int lpfc_vport_getinfo (struct Scsi_Host *, struct vport_info *)
 
int lpfc_vport_tgt_remove (struct Scsi_Host *, uint, uint)
 
struct lpfc_vport ** lpfc_create_vport_work_array (struct lpfc_hba *)
 
void lpfc_destroy_vport_work_array (struct lpfc_hba *, struct lpfc_vport **)
 
void lpfc_vport_set_state (struct lpfc_vport *vport, enum fc_vport_state new_state)
 
void lpfc_vport_reset_stat_data (struct lpfc_vport *)
 
void lpfc_alloc_bucket (struct lpfc_vport *)
 
void lpfc_free_bucket (struct lpfc_vport *)
 

Macro Definition Documentation

#define DID_VPORT_ERROR   0x0f

Definition at line 98 of file lpfc_vport.h.

#define VPORT_API_VERSION_1   0x01

Definition at line 26 of file lpfc_vport.h.

#define VPORT_CNT_INVALID   0xFFFFFFFF

Definition at line 60 of file lpfc_vport.h.

#define VPORT_CREATE   0x2

Definition at line 101 of file lpfc_vport.h.

#define VPORT_DELETE   0x4

Definition at line 102 of file lpfc_vport.h.

#define VPORT_ERROR   -1

Definition at line 82 of file lpfc_vport.h.

#define VPORT_FAIL_ADAP_NORESOURCES   5

Definition at line 48 of file lpfc_vport.h.

#define VPORT_FAIL_FAB_LOGOUT   4

Definition at line 47 of file lpfc_vport.h.

#define VPORT_FAIL_FAB_NORESOURCES   3

Definition at line 46 of file lpfc_vport.h.

#define VPORT_FAIL_FAB_UNSUPPORTED   2

Definition at line 45 of file lpfc_vport.h.

#define VPORT_FAIL_LINKDOWN   1

Definition at line 44 of file lpfc_vport.h.

#define VPORT_FAIL_UNKNOWN   0

Definition at line 43 of file lpfc_vport.h.

#define VPORT_INFO   0x1

Definition at line 100 of file lpfc_vport.h.

#define VPORT_INVAL   -2

Definition at line 83 of file lpfc_vport.h.

#define VPORT_NOMEM   -3

Definition at line 84 of file lpfc_vport.h.

#define VPORT_NORESOURCES   -4

Definition at line 85 of file lpfc_vport.h.

#define VPORT_OK   0

Definition at line 81 of file lpfc_vport.h.

#define VPORT_OPT_AUTORETRY   0x01

Definition at line 68 of file lpfc_vport.h.

#define VPORT_STATE_ACTIVE   1

Definition at line 38 of file lpfc_vport.h.

#define VPORT_STATE_FAILED   2

Definition at line 39 of file lpfc_vport.h.

#define VPORT_STATE_OFFLINE   0

Definition at line 37 of file lpfc_vport.h.

#define VPORT_TYPE_PHYSICAL   0

Definition at line 33 of file lpfc_vport.h.

#define VPORT_TYPE_VIRTUAL   1

Definition at line 34 of file lpfc_vport.h.

Function Documentation

void lpfc_alloc_bucket ( struct lpfc_vport vport)

lpfc_alloc_bucket - Allocate data buffer required for statistical data : Pointer to vport object.

This function allocates data buffer required for all the FC nodes of the vport to collect statistical data.

Definition at line 833 of file lpfc_vport.c.

struct lpfc_vport** lpfc_create_vport_work_array ( struct lpfc_hba )
read

Definition at line 766 of file lpfc_vport.c.

void lpfc_destroy_vport_work_array ( struct lpfc_hba ,
struct lpfc_vport **   
)

Definition at line 792 of file lpfc_vport.c.

void lpfc_free_bucket ( struct lpfc_vport vport)

lpfc_free_bucket - Free data buffer required for statistical data : Pointer to vport object.

Th function frees statistical data buffer of all the FC nodes of the vport.

Definition at line 866 of file lpfc_vport.c.

int lpfc_vport_create ( struct fc_vport ,
bool   
)

Definition at line 291 of file lpfc_vport.c.

int lpfc_vport_delete ( struct fc_vport )

Definition at line 564 of file lpfc_vport.c.

int lpfc_vport_getinfo ( struct Scsi_Host ,
struct vport_info  
)
void lpfc_vport_reset_stat_data ( struct lpfc_vport vport)

lpfc_vport_reset_stat_data - Reset the statistical data for the vport : Pointer to vport object.

This function resets the statistical data for the vport. This function is called with the host_lock held

Definition at line 811 of file lpfc_vport.c.

void lpfc_vport_set_state ( struct lpfc_vport vport,
enum fc_vport_state  new_state 
)
inline

Definition at line 49 of file lpfc_vport.c.

int lpfc_vport_tgt_remove ( struct Scsi_Host ,
uint  ,
uint   
)