Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
fc_libfc.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/scatterlist.h>
#include <linux/crc32.h>
#include <linux/module.h>
#include <scsi/libfc.h>
#include <scsi/fc_encode.h>
#include "fc_libfc.h"

Go to the source code of this file.

Functions

 MODULE_AUTHOR ("Open-FCoE.org")
 
 MODULE_DESCRIPTION ("libfc")
 
 MODULE_LICENSE ("GPL v2")
 
 module_param_named (debug_logging, fc_debug_logging, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (debug_logging,"a bit mask of logging levels")
 
 DEFINE_MUTEX (fc_prov_mutex)
 
 EXPORT_SYMBOL (fc_lport_notifier_head)
 
 module_init (libfc_init)
 
 module_exit (libfc_exit)
 
u32 fc_copy_buffer_to_sglist (void *buf, size_t len, struct scatterlist *sg, u32 *nents, size_t *offset, u32 *crc)
 
void fc_fill_hdr (struct fc_frame *fp, const struct fc_frame *in_fp, enum fc_rctl r_ctl, u32 f_ctl, u16 seq_cnt, u32 parm_offset)
 
 EXPORT_SYMBOL (fc_fill_hdr)
 
void fc_fill_reply_hdr (struct fc_frame *fp, const struct fc_frame *in_fp, enum fc_rctl r_ctl, u32 parm_offset)
 
 EXPORT_SYMBOL (fc_fill_reply_hdr)
 
void fc_fc4_conf_lport_params (struct fc_lport *lport, enum fc_fh_type type)
 
void fc_lport_iterate (void(*notify)(struct fc_lport *, void *), void *arg)
 
 EXPORT_SYMBOL (fc_lport_iterate)
 
int fc_fc4_register_provider (enum fc_fh_type type, struct fc4_prov *prov)
 
 EXPORT_SYMBOL (fc_fc4_register_provider)
 
void fc_fc4_deregister_provider (enum fc_fh_type type, struct fc4_prov *prov)
 
 EXPORT_SYMBOL (fc_fc4_deregister_provider)
 
void fc_fc4_add_lport (struct fc_lport *lport)
 
void fc_fc4_del_lport (struct fc_lport *lport)
 

Variables

unsigned int fc_debug_logging
 
struct blocking_notifier_head fc_lport_notifier_head
 
struct fc4_provfc_active_prov [FC_FC4_PROV_SIZE]
 
struct fc4_provfc_passive_prov [FC_FC4_PROV_SIZE]
 

Function Documentation

DEFINE_MUTEX ( fc_prov_mutex  )
EXPORT_SYMBOL ( fc_lport_notifier_head  )
EXPORT_SYMBOL ( fc_fill_hdr  )
EXPORT_SYMBOL ( fc_fill_reply_hdr  )
EXPORT_SYMBOL ( fc_lport_iterate  )
EXPORT_SYMBOL ( fc_fc4_register_provider  )
EXPORT_SYMBOL ( fc_fc4_deregister_provider  )
u32 fc_copy_buffer_to_sglist ( void buf,
size_t  len,
struct scatterlist sg,
u32 nents,
size_t offset,
u32 crc 
)

fc_copy_buffer_to_sglist() - This routine copies the data of a buffer into a scatter-gather list (SG list).

: pointer to the data buffer. : the byte-length of the data buffer. : pointer to the pointer of the SG list. : pointer to the remaining number of entries in the SG list. : pointer to the current offset in the SG list. : pointer to the 32-bit crc value. If crc is NULL, CRC is not calculated.

Definition at line 111 of file fc_libfc.c.

void fc_fc4_add_lport ( struct fc_lport lport)

fc_fc4_add_lport() - add new local port to list and run notifiers. : The new local port.

Definition at line 311 of file fc_libfc.c.

void fc_fc4_conf_lport_params ( struct fc_lport lport,
enum fc_fh_type  type 
)

fc_fc4_conf_lport_params() - Modify "service_params" of specified lport if there is service provider (target provider) registered with libfc for specified "fc_ft_type" : Local port which service_params needs to be modified : FC-4 type, such as FC_TYPE_FCP

Definition at line 241 of file fc_libfc.c.

void fc_fc4_del_lport ( struct fc_lport lport)

fc_fc4_del_lport() - remove local port from list and run notifiers. : The new local port.

Definition at line 324 of file fc_libfc.c.

void fc_fc4_deregister_provider ( enum fc_fh_type  type,
struct fc4_prov prov 
)

fc_fc4_deregister_provider() - deregister FC-4 upper-level provider. : FC-4 type, such as FC_TYPE_FCP : structure describing provider including ops vector.

Definition at line 294 of file fc_libfc.c.

int fc_fc4_register_provider ( enum fc_fh_type  type,
struct fc4_prov prov 
)

fc_fc4_register_provider() - register FC-4 upper-level provider. : FC-4 type, such as FC_TYPE_FCP : structure describing provider including ops vector.

Returns 0 on success, negative error otherwise.

Definition at line 271 of file fc_libfc.c.

void fc_fill_hdr ( struct fc_frame fp,
const struct fc_frame in_fp,
enum fc_rctl  r_ctl,
u32  f_ctl,
u16  seq_cnt,
u32  parm_offset 
)

fc_fill_hdr() - fill FC header fields based on request : reply frame containing header to be filled in : request frame containing header to use in filling in reply : R_CTL value for header : F_CTL value for header, with 0 pad : sequence count for the header, ignored if frame has a sequence : parameter / offset value

Definition at line 166 of file fc_libfc.c.

void fc_fill_reply_hdr ( struct fc_frame fp,
const struct fc_frame in_fp,
enum fc_rctl  r_ctl,
u32  parm_offset 
)

fc_fill_reply_hdr() - fill FC reply header fields based on request : reply frame containing header to be filled in : request frame containing header to use in filling in reply : R_CTL value for reply : parameter / offset value

Definition at line 222 of file fc_libfc.c.

void fc_lport_iterate ( void(*)(struct fc_lport *, void *)  notify,
void arg 
)

Definition at line 253 of file fc_libfc.c.

MODULE_AUTHOR ( "Open-FCoE.org"  )
MODULE_DESCRIPTION ( "libfc"  )
module_exit ( libfc_exit  )
module_init ( libfc_init  )
MODULE_LICENSE ( "GPL v2 )
module_param_named ( debug_logging  ,
fc_debug_logging  ,
int  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( debug_logging  ,
"a bit mask of logging levels"   
)

Variable Documentation

struct fc4_prov* fc_active_prov[FC_FC4_PROV_SIZE]
Initial value:

Definition at line 48 of file fc_libfc.c.

unsigned int fc_debug_logging

Definition at line 35 of file fc_libfc.c.

struct blocking_notifier_head fc_lport_notifier_head
Initial value:

Definition at line 41 of file fc_libfc.c.

struct fc4_prov* fc_passive_prov[FC_FC4_PROV_SIZE]
Initial value:

Definition at line 56 of file fc_libfc.c.