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

Go to the source code of this file.

Macros

#define FC_LIBFC_LOGGING   0x01 /* General logging, not categorized */
 
#define FC_LPORT_LOGGING   0x02 /* lport layer logging */
 
#define FC_DISC_LOGGING   0x04 /* discovery layer logging */
 
#define FC_RPORT_LOGGING   0x08 /* rport layer logging */
 
#define FC_FCP_LOGGING   0x10 /* I/O path logging */
 
#define FC_EM_LOGGING   0x20 /* Exchange Manager logging */
 
#define FC_EXCH_LOGGING   0x40 /* Exchange/Sequence logging */
 
#define FC_SCSI_LOGGING   0x80 /* SCSI logging (mostly error handling) */
 
#define FC_CHECK_LOGGING(LEVEL, CMD)
 
#define FC_LIBFC_DBG(fmt, args...)
 
#define FC_LPORT_DBG(lport, fmt, args...)
 
#define FC_DISC_DBG(disc, fmt, args...)
 
#define FC_RPORT_ID_DBG(lport, port_id, fmt, args...)
 
#define FC_RPORT_DBG(rdata, fmt, args...)   FC_RPORT_ID_DBG((rdata)->local_port, (rdata)->ids.port_id, fmt, ##args)
 
#define FC_FCP_DBG(pkt, fmt, args...)
 
#define FC_EXCH_DBG(exch, fmt, args...)
 
#define FC_SCSI_DBG(lport, fmt, args...)
 

Functions

void fc_fcp_ddp_setup (struct fc_fcp_pkt *fsp, u16 xid)
 
void fc_fcp_ddp_done (struct fc_fcp_pkt *fsp)
 
int fc_setup_exch_mgr (void)
 
void fc_destroy_exch_mgr (void)
 
int fc_setup_rport (void)
 
void fc_destroy_rport (void)
 
int fc_setup_fcp (void)
 
void fc_destroy_fcp (void)
 
const charfc_els_resp_type (struct fc_frame *)
 
void fc_fc4_add_lport (struct fc_lport *)
 
void fc_fc4_del_lport (struct fc_lport *)
 
void fc_fc4_conf_lport_params (struct fc_lport *, enum fc_fh_type)
 
u32 fc_copy_buffer_to_sglist (void *buf, size_t len, struct scatterlist *sg, u32 *nents, size_t *offset, u32 *crc)
 

Variables

unsigned int fc_debug_logging
 
struct fc4_provfc_active_prov []
 
struct fc4_provfc_passive_prov []
 
struct mutex fc_prov_mutex
 
struct fc4_prov fc_rport_t0_prov
 
struct fc4_prov fc_lport_els_prov
 
struct fc4_prov fc_rport_fcp_init
 

Macro Definition Documentation

#define FC_CHECK_LOGGING (   LEVEL,
  CMD 
)
Value:
do { \
do { \
CMD; \
} while (0); \
} while (0)

Definition at line 34 of file fc_libfc.h.

#define FC_DISC_DBG (   disc,
  fmt,
  args... 
)
Value:
printk(KERN_INFO "host%u: disc: " fmt, \
fc_disc_lport(disc)->host->host_no, \
##args))

Definition at line 52 of file fc_libfc.h.

#define FC_DISC_LOGGING   0x04 /* discovery layer logging */

Definition at line 25 of file fc_libfc.h.

#define FC_EM_LOGGING   0x20 /* Exchange Manager logging */

Definition at line 28 of file fc_libfc.h.

#define FC_EXCH_DBG (   exch,
  fmt,
  args... 
)
Value:
printk(KERN_INFO "host%u: xid %4x: " fmt, \
(exch)->lp->host->host_no, \
exch->xid, ##args))

Definition at line 85 of file fc_libfc.h.

#define FC_EXCH_LOGGING   0x40 /* Exchange/Sequence logging */

Definition at line 29 of file fc_libfc.h.

#define FC_FCP_DBG (   pkt,
  fmt,
  args... 
)
Value:
{ \
if ((pkt)->seq_ptr) { \
struct fc_exch *_ep = NULL; \
_ep = fc_seq_exch((pkt)->seq_ptr); \
printk(KERN_INFO "host%u: fcp: %6.6x: " \
"xid %04x-%04x: " fmt, \
(pkt)->lp->host->host_no, \
(pkt)->rport->port_id, \
(_ep)->oxid, (_ep)->rxid, ##args); \
} else { \
printk(KERN_INFO "host%u: fcp: %6.6x: " fmt, \
(pkt)->lp->host->host_no, \
(pkt)->rport->port_id, ##args); \
} \
})

Definition at line 67 of file fc_libfc.h.

#define FC_FCP_LOGGING   0x10 /* I/O path logging */

Definition at line 27 of file fc_libfc.h.

#define FC_LIBFC_DBG (   fmt,
  args... 
)
Value:

Definition at line 42 of file fc_libfc.h.

#define FC_LIBFC_LOGGING   0x01 /* General logging, not categorized */

Definition at line 23 of file fc_libfc.h.

#define FC_LPORT_DBG (   lport,
  fmt,
  args... 
)
Value:
printk(KERN_INFO "host%u: lport %6.6x: " fmt, \
(lport)->host->host_no, \
(lport)->port_id, ##args))

Definition at line 46 of file fc_libfc.h.

#define FC_LPORT_LOGGING   0x02 /* lport layer logging */

Definition at line 24 of file fc_libfc.h.

#define FC_RPORT_DBG (   rdata,
  fmt,
  args... 
)    FC_RPORT_ID_DBG((rdata)->local_port, (rdata)->ids.port_id, fmt, ##args)

Definition at line 64 of file fc_libfc.h.

#define FC_RPORT_ID_DBG (   lport,
  port_id,
  fmt,
  args... 
)
Value:
printk(KERN_INFO "host%u: rport %6.6x: " fmt, \
(lport)->host->host_no, \
(port_id), ##args))

Definition at line 58 of file fc_libfc.h.

#define FC_RPORT_LOGGING   0x08 /* rport layer logging */

Definition at line 26 of file fc_libfc.h.

#define FC_SCSI_DBG (   lport,
  fmt,
  args... 
)
Value:
printk(KERN_INFO "host%u: scsi: " fmt, \
(lport)->host->host_no, ##args))

Definition at line 91 of file fc_libfc.h.

#define FC_SCSI_LOGGING   0x80 /* SCSI logging (mostly error handling) */

Definition at line 30 of file fc_libfc.h.

Function Documentation

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_destroy_exch_mgr ( void  )

fc_destroy_exch_mgr() - Destroy an exchange manager

Definition at line 2545 of file fc_exch.c.

void fc_destroy_fcp ( void  )

Definition at line 2252 of file fc_fcp.c.

void fc_destroy_rport ( void  )

fc_destroy_rport() - Destroy the rport_event_queue

Definition at line 2025 of file fc_rport.c.

const char* fc_els_resp_type ( struct fc_frame fp)

fc_els_resp_type() - Return a string describing the ELS response : The frame pointer or possible error code

Definition at line 91 of file fc_elsct.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_fcp_ddp_done ( struct fc_fcp_pkt fsp)

fc_fcp_ddp_done() - Calls a LLD's ddp_done routine to release any DDP related resources for a fcp_pkt : The FCP packet that DDP had been used on

Definition at line 322 of file fc_fcp.c.

void fc_fcp_ddp_setup ( struct fc_fcp_pkt fsp,
u16  xid 
)

fc_fcp_ddp_setup() - Calls a LLD's ddp_setup routine to set up DDP context : The FCP packet that will manage the DDP frames : The XID that will be used for the DDP exchange

Definition at line 304 of file fc_fcp.c.

int fc_setup_exch_mgr ( void  )

fc_setup_exch_mgr() - Setup an exchange manager

Definition at line 2504 of file fc_exch.c.

int fc_setup_fcp ( void  )

Definition at line 2236 of file fc_fcp.c.

int fc_setup_rport ( void  )

fc_setup_rport() - Initialize the rport_event_queue

Definition at line 2014 of file fc_rport.c.

Variable Documentation

struct fc4_prov* fc_active_prov[]

Definition at line 48 of file fc_libfc.c.

unsigned int fc_debug_logging

Definition at line 35 of file fc_libfc.c.

struct fc4_prov fc_lport_els_prov

Definition at line 941 of file fc_lport.c.

struct fc4_prov* fc_passive_prov[]

Definition at line 56 of file fc_libfc.c.

struct mutex fc_prov_mutex
struct fc4_prov fc_rport_fcp_init

Definition at line 1981 of file fc_rport.c.

struct fc4_prov fc_rport_t0_prov

Definition at line 2007 of file fc_rport.c.