Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Enumerations | Functions | Variables
mpt2sas_ctl.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/compat.h>
#include <linux/poll.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include "mpt2sas_base.h"
#include "mpt2sas_ctl.h"

Go to the source code of this file.

Data Structures



enum  block_state {
  NON_BLOCKING, BLOCKING, need_more, block_done,
  finish_started, finish_done


u8 mpt2sas_ctl_done (struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
void mpt2sas_ctl_add_to_event_log (struct MPT2SAS_ADAPTER *ioc, Mpi2EventNotificationReply_t *mpi_reply)
u8 mpt2sas_ctl_event_callback (struct MPT2SAS_ADAPTER *ioc, u8 msix_index, u32 reply)
void mpt2sas_ctl_reset_handler (struct MPT2SAS_ADAPTER *ioc, int reset_phase)
void mpt2sas_enable_diag_buffer (struct MPT2SAS_ADAPTER *ioc, u8 bits_to_register)
void mpt2sas_ctl_init (void)
void mpt2sas_ctl_exit (void)


struct device_attributempt2sas_host_attrs []
struct device_attributempt2sas_dev_attrs []

Enumeration Type Documentation

enum block_state - blocking state : non blocking : blocking

These states are for ioctls that need to wait for a response from firmware, so they probably require sleep.


Definition at line 78 of file mpt2sas_ctl.c.

Function Documentation

void mpt2sas_ctl_add_to_event_log ( struct MPT2SAS_ADAPTER ioc,
Mpi2EventNotificationReply_t mpi_reply 

mpt2sas_ctl_add_to_event_log - add event : per adapter object : reply message frame

Return nothing.

Definition at line 348 of file mpt2sas_ctl.c.

u8 mpt2sas_ctl_done ( struct MPT2SAS_ADAPTER ioc,
u16  smid,
u8  msix_index,
u32  reply 

mpt2sas_ctl_done - ctl module completion routine : per adapter object : system request message index : MSIX table index supplied by the OS : reply message frame(lower 32bit addr) Context: none.

The callback handler when using ioc->ctl_cb_idx.

Return 1 meaning mf should be freed from _base_interrupt 0 means the mf is freed from this function.

Definition at line 274 of file mpt2sas_ctl.c.

u8 mpt2sas_ctl_event_callback ( struct MPT2SAS_ADAPTER ioc,
u8  msix_index,
u32  reply 

mpt2sas_ctl_event_callback - firmware event handler (called at ISR time) : per adapter object : MSIX table index supplied by the OS : reply message frame(lower 32bit addr) Context: interrupt.

This function merely adds a new work task into ioc->firmware_event_thread. The tasks are worked from _firmware_event_work in user context.

Return 1 meaning mf should be freed from _base_interrupt 0 means the mf is freed from this function.

Definition at line 404 of file mpt2sas_ctl.c.

void mpt2sas_ctl_exit ( void  )

mpt2sas_ctl_exit - exit point for ctl

Definition at line 3065 of file mpt2sas_ctl.c.

void mpt2sas_ctl_init ( void  )

mpt2sas_ctl_init - main entry point for ctl.

Definition at line 3050 of file mpt2sas_ctl.c.

void mpt2sas_ctl_reset_handler ( struct MPT2SAS_ADAPTER ioc,
int  reset_phase 

mpt2sas_ctl_reset_handler - reset callback handler (for ctl) : per adapter object : phase

The handler for doing any required cleanup or initialization.


Definition at line 447 of file mpt2sas_ctl.c.

void mpt2sas_enable_diag_buffer ( struct MPT2SAS_ADAPTER ioc,
u8  bits_to_register 

mpt2sas_enable_diag_buffer - enabling diag_buffers support driver load time : per adapter object : bitwise field where trace is bit 0, and snapshot is bit 1

This is called when command line option diag_buffer_enable is enabled at driver load time.

Definition at line 1530 of file mpt2sas_ctl.c.

Variable Documentation

struct device_attribute* mpt2sas_dev_attrs[]
Initial value:
= {

Definition at line 3021 of file mpt2sas_ctl.c.

struct device_attribute* mpt2sas_host_attrs[]
Initial value:
= {

Definition at line 2954 of file mpt2sas_ctl.c.