Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
lpfc_bsg.c File Reference
#include <linux/interrupt.h>
#include <linux/mempool.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport_fc.h>
#include <scsi/scsi_bsg_fc.h>
#include <scsi/fc/fc_fs.h>
#include "lpfc_hw4.h"
#include "lpfc_hw.h"
#include "lpfc_sli.h"
#include "lpfc_sli4.h"
#include "lpfc_nl.h"
#include "lpfc_bsg.h"
#include "lpfc_disc.h"
#include "lpfc_scsi.h"
#include "lpfc.h"
#include "lpfc_logmsg.h"
#include "lpfc_crtn.h"
#include "lpfc_debugfs.h"
#include "lpfc_vport.h"
#include "lpfc_version.h"

Go to the source code of this file.

Data Structures

struct  lpfc_bsg_event
 
struct  lpfc_bsg_iocb
 
struct  lpfc_bsg_mbox
 
struct  lpfc_bsg_menlo
 
struct  bsg_job_data
 
struct  event_data
 
struct  lpfc_dmabufext
 

Macros

#define MENLO_DID   0x0000FC0E
 
#define TYPE_EVT   1
 
#define TYPE_IOCB   2
 
#define TYPE_MBOX   3
 
#define TYPE_MENLO   4
 
#define BUF_SZ_4K   4096
 
#define SLI_CT_ELX_LOOPBACK   0x10
 
#define ELX_LOOPBACK_HEADER_SZ   (size_t)(&((struct lpfc_sli_ct_request *)NULL)->un)
 

Enumerations

enum  ELX_LOOPBACK_CMD { ELX_LOOPBACK_XRI_SETUP, ELX_LOOPBACK_DATA }
 

Functions

int lpfc_bsg_ct_unsol_event (struct lpfc_hba *phba, struct lpfc_sli_ring *pring, struct lpfc_iocbq *piocbq)
 
void lpfc_bsg_issue_mbox_cmpl (struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq)
 
int lpfc_bsg_request (struct fc_bsg_job *job)
 
int lpfc_bsg_timeout (struct fc_bsg_job *job)
 

Macro Definition Documentation

#define BUF_SZ_4K   4096

Definition at line 127 of file lpfc_bsg.c.

#define ELX_LOOPBACK_HEADER_SZ   (size_t)(&((struct lpfc_sli_ct_request *)NULL)->un)

Definition at line 135 of file lpfc_bsg.c.

#define MENLO_DID   0x0000FC0E

Definition at line 94 of file lpfc_bsg.c.

#define SLI_CT_ELX_LOOPBACK   0x10

Definition at line 128 of file lpfc_bsg.c.

#define TYPE_EVT   1

Definition at line 105 of file lpfc_bsg.c.

#define TYPE_IOCB   2

Definition at line 106 of file lpfc_bsg.c.

#define TYPE_MBOX   3

Definition at line 107 of file lpfc_bsg.c.

#define TYPE_MENLO   4

Definition at line 108 of file lpfc_bsg.c.

Enumeration Type Documentation

Enumerator:
ELX_LOOPBACK_XRI_SETUP 
ELX_LOOPBACK_DATA 

Definition at line 130 of file lpfc_bsg.c.

Function Documentation

int lpfc_bsg_ct_unsol_event ( struct lpfc_hba phba,
struct lpfc_sli_ring pring,
struct lpfc_iocbq piocbq 
)

lpfc_bsg_ct_unsol_event - process an unsolicited CT command : : :

This function is called when an unsolicited CT command is received. It forwards the event to any processes registered to receive CT events.

Definition at line 773 of file lpfc_bsg.c.

void lpfc_bsg_issue_mbox_cmpl ( struct lpfc_hba phba,
LPFC_MBOXQ_t pmboxq 
)

lpfc_bsg_issue_mbox_cmpl - lpfc_bsg_issue_mbox mbox completion handler : Pointer to HBA context object. : Pointer to mailbox command.

This is completion handler function for mailbox commands issued from lpfc_bsg_issue_mbox function. This function is called by the mailbox event handler function with no lock held. This function will wake up thread waiting on the wait queue pointed by context1 of the mailbox.

Definition at line 3147 of file lpfc_bsg.c.

int lpfc_bsg_request ( struct fc_bsg_job job)

lpfc_bsg_request - handle a bsg request from the FC transport : fc_bsg_job to handle

Definition at line 5084 of file lpfc_bsg.c.

int lpfc_bsg_timeout ( struct fc_bsg_job job)

lpfc_bsg_timeout - handle timeout of a bsg request from the FC transport : fc_bsg_job that has timed out

This function just aborts the job's IOCB. The aborted IOCB will return to the waiting function which will handle passing the error back to userspace

Definition at line 5119 of file lpfc_bsg.c.