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

Go to the source code of this file.

Macros

#define KMSG_COMPONENT   "zfcp"
 
#define pr_fmt(fmt)   KMSG_COMPONENT ": " fmt
 
#define QBUFF_PER_PAGE   (PAGE_SIZE / sizeof(struct qdio_buffer))
 

Functions

 module_param_named (datarouter, enable_multibuffer, bool, 0400)
 
 MODULE_PARM_DESC (datarouter,"Enable hardware data router support")
 
int zfcp_qdio_sbals_from_sg (struct zfcp_qdio *qdio, struct zfcp_qdio_req *q_req, struct scatterlist *sg)
 
int zfcp_qdio_sbal_get (struct zfcp_qdio *qdio)
 
int zfcp_qdio_send (struct zfcp_qdio *qdio, struct zfcp_qdio_req *q_req)
 
void zfcp_qdio_close (struct zfcp_qdio *qdio)
 
int zfcp_qdio_open (struct zfcp_qdio *qdio)
 
void zfcp_qdio_destroy (struct zfcp_qdio *qdio)
 
int zfcp_qdio_setup (struct zfcp_adapter *adapter)
 
void zfcp_qdio_siosl (struct zfcp_adapter *adapter)
 

Macro Definition Documentation

#define KMSG_COMPONENT   "zfcp"

Definition at line 9 of file zfcp_qdio.c.

#define pr_fmt (   fmt)    KMSG_COMPONENT ": " fmt

Definition at line 10 of file zfcp_qdio.c.

#define QBUFF_PER_PAGE   (PAGE_SIZE / sizeof(struct qdio_buffer))

Definition at line 17 of file zfcp_qdio.c.

Function Documentation

module_param_named ( datarouter  ,
enable_multibuffer  ,
bool  ,
0400   
)
MODULE_PARM_DESC ( datarouter  ,
"Enable hardware data router support  
)
void zfcp_qdio_close ( struct zfcp_qdio qdio)

zfcp_close_qdio - close qdio queues for an adapter : pointer to structure zfcp_qdio

Definition at line 348 of file zfcp_qdio.c.

void zfcp_qdio_destroy ( struct zfcp_qdio qdio)

Definition at line 453 of file zfcp_qdio.c.

int zfcp_qdio_open ( struct zfcp_qdio qdio)

zfcp_qdio_open - prepare and initialize response queue : pointer to struct zfcp_qdio Returns: 0 on success, otherwise -EIO

Definition at line 381 of file zfcp_qdio.c.

int zfcp_qdio_sbal_get ( struct zfcp_qdio qdio)

zfcp_qdio_sbal_get - get free sbal in request queue, wait if necessary : pointer to struct zfcp_qdio

The req_q_lock must be held by the caller of this function, and this function may only be called from process context; it will sleep when waiting for a free sbal.

Returns: 0 on success, -EIO if there is no free sbal after waiting.

Definition at line 245 of file zfcp_qdio.c.

int zfcp_qdio_sbals_from_sg ( struct zfcp_qdio qdio,
struct zfcp_qdio_req q_req,
struct scatterlist sg 
)

zfcp_qdio_sbals_from_sg - fill SBALs from scatter-gather list : pointer to struct zfcp_qdio : pointer to struct zfcp_qdio_req : scatter-gather list : upper bound for number of SBALs to be used Returns: zero or -EINVAL on error

Definition at line 202 of file zfcp_qdio.c.

int zfcp_qdio_send ( struct zfcp_qdio qdio,
struct zfcp_qdio_req q_req 
)

zfcp_qdio_send - set PCI flag in first SBALE and send req to QDIO : pointer to struct zfcp_qdio : pointer to struct zfcp_qdio_req Returns: 0 on success, error otherwise

Definition at line 275 of file zfcp_qdio.c.

int zfcp_qdio_setup ( struct zfcp_adapter adapter)

Definition at line 471 of file zfcp_qdio.c.

void zfcp_qdio_siosl ( struct zfcp_adapter adapter)

zfcp_qdio_siosl - Trigger logging in FCP channel : The zfcp_adapter where to trigger logging

Call the cio siosl function to trigger hardware logging. This wrapper function sets a flag to ensure hardware logging is only triggered once before going through qdio shutdown.

The triggers are always run from qdio tasklet context, so no additional synchronization is necessary.

Definition at line 504 of file zfcp_qdio.c.